#ifndef FUNC_SORT_H_
#define FUNC_SORT_H_

#include <functions/Function.h>

/**
 * @short Sort function
 * Sorts the elements of a vector in ascending order
 * <pre>
 * y <- sort(x[])
 * </pre>
 */
class Sort : public Function
{
public:
  Sort ();
  void evaluate (SArray & value, std::vector <SArray const *> const &args) const;
  bool checkParameterDim (std::vector<SArray const *> const &args) const;
  Index dim (std::vector <SArray const *> const &args) const;
  bool isDiscreteValued(std::vector<SArray const *> const &flags) const;
};

#endif /* FUNC_SORT_H_ */


syntax highlighted by Code2HTML, v. 0.9.1