File point.h

Functions

template<typename K>
point<K> operator*(const typename K::FT &k, point<K> const &p)
template<typename K>
class point
#include <point.h>

This class manipulates a point parameterized by a number type e.g. double

Template Parameters:

K – Numerical Type

Public Types

typedef Eigen::Matrix<typename K::FT, Eigen::Dynamic, 1> Coeff
typedef K::FT FT

Public Functions

inline point()
inline point(const unsigned int dim)
inline point(const unsigned int dim, iter begin, iter endit)
inline point(const Coeff &coeffs)
inline point(const unsigned int dim, std::vector<typename K::FT> cofs)
inline void add(const Coeff &coeffs)
inline const Coeff &getCoefficients() const
inline int dimension() const
inline void set_dimension(const unsigned int dim)
inline void set_coord(const unsigned int i, FT coord)
inline void set_coeffs(const Coeff &coeffs2)
inline void set_to_origin()
inline FT operator[](const unsigned int i) const
inline FT *pointerToData()
inline FT sum() const
inline void operator+=(const point &p)
inline void operator+=(const Coeff &coeffs)
inline void operator-=(const point &p)
inline void operator-=(const Coeff &coeffs)
inline void operator=(const Coeff &coeffs)
inline point operator+(const point &p) const
inline point operator-(const point &p) const
inline point operator*(const FT k) const
inline void operator*=(const FT k)
inline void operator/=(const FT k)
inline bool operator==(point &p) const
inline FT distance(point const &p)
inline FT dot(const point &p) const
inline FT dot(const Coeff &coeffs) const
inline FT squared_length() const
inline FT length() const
inline void print() const

Public Static Functions

static inline point all_ones(int dim)

Private Types

typedef std::vector<typenameK::FT>::iterator iter

Private Members

unsigned int d
Eigen::Matrix<typename K::FT, Eigen::Dynamic, 1> coeffs