All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
NetworKit::Point< T > Class Template Reference

Formerly marked as deprecated: To take advantage of automatic mapping between C++ and Python data structures, use standard library containers (std::pair, std::tuple..) instead. More...

#include <Point.h>

Public Member Functions

 Point ()
 
 Point (T x, T y)
 
 Point (count dimension)
 
 Point (std::vector< T > &values)
 
virtual ~Point ()
 
count getDimensions () const
 
distance (const Point< T > &p) const
 
squaredDistance (const Point< T > &p) const
 
Pointoperator+= (const Point< T > &p)
 
Pointoperator-= (const Point< T > &p)
 
Pointscale (const T factor)
 
Point operator- (const Point< T > &other)
 
Point operator+ (const Point< T > &other)
 
Point operator* (const double scalar) const
 
bool operator== (const Point< T > &other) const
 
bool operator!= (const Point< T > &other) const
 
void operator= (const Point< T > &other)
 
length () const
 
squaredLength () const
 
T & operator[] (const index i)
 
T & at (const index i)
 
operator[] (const index i) const
 
at (const index i) const
 
std::string toString ()
 Default point to string conversion. More...
 
std::string toCsvString ()
 Point to comma separated string. More...
 
std::string toSsvString ()
 Point to space separated string. More...
 
std::string genericToString (const std::string &start, const std::string &sep, const std::string &end)
 

Protected Attributes

std::vector< T > data
 

Detailed Description

template<class T>
class NetworKit::Point< T >

Formerly marked as deprecated: To take advantage of automatic mapping between C++ and Python data structures, use standard library containers (std::pair, std::tuple..) instead.

DEPRECATION removed since suggested solution does not work when dimension is not known at compile time.

Points in any dimension of templated type.

Constructor & Destructor Documentation

template<class T>
NetworKit::Point< T >::Point ( )
inline
template<class T>
NetworKit::Point< T >::Point ( x,
y 
)
inline
template<class T>
NetworKit::Point< T >::Point ( count  dimension)
inline
template<class T>
NetworKit::Point< T >::Point ( std::vector< T > &  values)
inline
template<class T>
virtual NetworKit::Point< T >::~Point ( )
inlinevirtual

Member Function Documentation

template<class T >
T & NetworKit::Point< T >::at ( const index  i)
inline
template<class T >
T NetworKit::Point< T >::at ( const index  i) const
inline
template<class T>
T NetworKit::Point< T >::distance ( const Point< T > &  p) const
template<class T >
std::string NetworKit::Point< T >::genericToString ( const std::string &  start,
const std::string &  sep,
const std::string &  end 
)
inline
template<class T>
count NetworKit::Point< T >::getDimensions ( ) const
inline
template<class T >
T NetworKit::Point< T >::length ( ) const
template<typename T>
bool NetworKit::Point< T >::operator!= ( const Point< T > &  other) const
template<typename T >
Point< T > NetworKit::Point< T >::operator* ( const double  scalar) const
template<class T>
Point< T > NetworKit::Point< T >::operator+ ( const Point< T > &  other)
template<class T>
Point< T > & NetworKit::Point< T >::operator+= ( const Point< T > &  p)
template<class T>
Point< T > NetworKit::Point< T >::operator- ( const Point< T > &  other)
template<class T>
Point< T > & NetworKit::Point< T >::operator-= ( const Point< T > &  p)
template<typename T>
void NetworKit::Point< T >::operator= ( const Point< T > &  other)
template<typename T>
bool NetworKit::Point< T >::operator== ( const Point< T > &  other) const
template<class T >
T & NetworKit::Point< T >::operator[] ( const index  i)
inline
template<class T >
T NetworKit::Point< T >::operator[] ( const index  i) const
inline
template<class T>
Point< T > & NetworKit::Point< T >::scale ( const T  factor)
template<class T>
T NetworKit::Point< T >::squaredDistance ( const Point< T > &  p) const
template<class T >
T NetworKit::Point< T >::squaredLength ( ) const
template<class T >
std::string NetworKit::Point< T >::toCsvString ( )
inline

Point to comma separated string.

template<class T >
std::string NetworKit::Point< T >::toSsvString ( )
inline

Point to space separated string.

template<class T >
std::string NetworKit::Point< T >::toString ( )

Default point to string conversion.

Member Data Documentation

template<class T>
std::vector<T> NetworKit::Point< T >::data
protected

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