BICO 1.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Pages
Public Member Functions | Private Attributes | List of all members
CluE::Point Class Reference

Weighted point of arbitrary dimension. More...

`#include <point.h>`

Inheritance diagram for CluE::Point:
Collaboration diagram for CluE::Point:

## Public Member Functions
| Point (size_t dimension=0, double pointWeight=1.0)
| Constructs a weighted point. More...
| Point (std::vector< double > coords, double pointWeight=1.0)
| Constructs a weighted point. More...
| Point (std::vector< Point * > const &)
| Constructs a point of gravity. More...
| Point (Point const &p)
| Copy constructor. More...
virtual | ~Point ()
Point & | operator+= (Point const &x)
Point & | operator-= (Point const &x)
Point | operator+ (Point const &x) const
Point | operator- (Point const &x) const
double & | operator[] (size_t index)
double | operator[] (size_t index) const
size_t | dimension () const
virtual double | getWeight () const
virtual void | setWeight (double w)
double | squaredL1distance (Point const &) const
double | l1distance (Point const &) const
double | squaredL2distance (Point const &) const
double | l2distance (Point const &) const
double | lpdistance (Point const &, double p) const
double | squaredLpDistance (Point const &, double p) const
double | kullbackleibler (Point const &) const

## Private Attributes
std::vector< double > | coordinates
double | weight

## Detailed Description

Weighted point of arbitrary dimension.

Definition at line 17 of file point.h.

## Constructor & Destructor Documentation

CluE::Point::Point | ( | size_t | dimension = `0`,
|  | double | pointWeight = `1.0`
| ) |  |
| inline

Constructs a weighted point.

Definition at line 23 of file point.h.

CluE::Point::Point | ( | std::vector< double > | coords,
|  | double | pointWeight = `1.0`
| ) |  |
| inline

Constructs a weighted point.

Definition at line 30 of file point.h.

Point::Point | ( | std::vector< Point * > const & | v | ) |

Constructs a point of gravity.

Exceptions

  InvalidArgumentException | [0] Can't consolidate points with different dimensions!

Definition at line 14 of file point.cpp.

CluE::Point::Point | ( | Point const & | p | ) |
| inline

Copy constructor.

Definition at line 43 of file point.h.

virtual CluE::Point::~Point | ( |  | ) |
| inline virtual

Definition at line 47 of file point.h.

## Member Function Documentation

Point & Point::operator+= | ( | Point const & | x | ) |

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 48 of file point.cpp.

Point & Point::operator-= | ( | Point const & | x | ) |

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 61 of file point.cpp.

Point Point::operator+ | ( | Point const & | x | ) | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 74 of file point.cpp.

Point Point::operator- | ( | Point const & | x | ) | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 79 of file point.cpp.

double& CluE::Point::operator[] | ( | size_t | index | ) |
| inline

Accesses one particular coordinate entry.

Definition at line 74 of file point.h.

double CluE::Point::operator[] | ( | size_t | index | ) | const
| inline

Returns one particular coordinate entry.

Definition at line 82 of file point.h.

size_t CluE::Point::dimension | ( |  | ) | const
| inline

Definition at line 87 of file point.h.

virtual double CluE::Point::getWeight | ( |  | ) | const
| inline virtual

Implements CluE::WeightedObject.

Definition at line 92 of file point.h.

virtual void CluE::Point::setWeight | ( | double | w | ) |
| inline virtual

Implements CluE::WeightedObject.

Definition at line 97 of file point.h.

double Point::squaredL1distance | ( | Point const & | p | ) | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 97 of file point.cpp.

double Point::l1distance | ( | Point const & | p | ) | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 84 of file point.cpp.

double Point::squaredL2distance | ( | Point const & | p | ) | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 103 of file point.cpp.

double Point::l2distance | ( | Point const & | p | ) | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 119 of file point.cpp.

double Point::lpdistance | ( | Point const & | p,
|  | double | p
| ) |  | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 124 of file point.cpp.

double Point::squaredLpDistance | ( | Point const & | p,
|  | double | p
| ) |  | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!

Definition at line 142 of file point.cpp.

double Point::kullbackleibler | ( | Point const & | p | ) | const

Exceptions

  InvalidArgumentException | [0] Incompatible dimensions!
  InvalidRuntimeConfigurationException | [1] Point has coordinate <= 0.

Definition at line 147 of file point.cpp.

## Member Data Documentation

std::vector<double> CluE::Point::coordinates
| private

Definition at line 139 of file point.h.

double CluE::Point::weight
| private

Definition at line 140 of file point.h.

The documentation for this class was generated from the following files:

- src/point/point.h
- src/point/point.cpp