#ifndef FUNC_RANK_H_
#define FUNC_RANK_H_

#include <functions/Function.h>

/**
 * @short Sort function
 * Calculates the ranks of the elements of a vector in ascending order
 * <pre>
 * y <- sort(x[])
 * </pre>
 */
class Rank : public Function
{
public:
  Rank ();
  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_RANK_H_ */


syntax highlighted by Code2HTML, v. 0.9.1