Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
WeightedVector< T > Class Template Reference
Inheritance diagram for WeightedVector< T >:
Inheritance graph
[legend]
Collaboration diagram for WeightedVector< T >:
Collaboration graph
[legend]

Public Member Functions

 WeightedVector (typename std::vector< T >::size_type size=0)
 
void resize (typename std::vector< T >::size_type n, typename std::vector< T >::value_type t=typename std::vector< T >::value_type())
 
void toStream (std::ostream &ostr) const
 

Static Public Member Functions

static double defaultDistance2 (const WeightedVector< T > &a, const WeightedVector< T > &b)
 
static void euclideanMixingFunction (const WeightedVector< T > &a, const WeightedVector< T > &b, double coeff, WeightedVector< T > &m)
 Given vectors a and a and a mixing coefficient coeff , outputs mixture vector m. More...
 

Public Attributes

std::vector< T > weight
 

Member Function Documentation

◆ euclideanMixingFunction()

static void euclideanMixingFunction ( const WeightedVector< T > &  a,
const WeightedVector< T > &  b,
double  coeff,
WeightedVector< T > &  m 
)
inlinestatic

Given vectors a and a and a mixing coefficient coeff , outputs mixture vector m.

Does not check vector lengths.

◆ toStream()

void toStream ( std::ostream &  ostr) const
inline

data


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