MyMediaLite  3.11
Static Public Member Functions | List of all members
VectorExtensions Class Reference

Extensions for vector-like data More...

Static Public Member Functions

static double EuclideanNorm (this ICollection< float > vector)
 Compute the Euclidean norm of a collection of floats More...
 
static void Init (this IList< float > vector, float val)
 Initialize a collection of floats with one value More...
 
static void InitNormal (this IList< float > vector, double mean, double stddev)
 Initialize a collection of floats with values from a normal distribution More...
 
static float ScalarProduct (IList< float > v1, IList< float > v2)
 Compute scalar product (dot product) of two vectors More...
 

Detailed Description

Extensions for vector-like data

Member Function Documentation

static double EuclideanNorm ( this ICollection< float >  vector)
inlinestatic

Compute the Euclidean norm of a collection of floats

Parameters
vectorthe vector to compute the norm for
Returns
the Euclidean norm of the vector
static void Init ( this IList< float >  vector,
float  val 
)
inlinestatic

Initialize a collection of floats with one value

Parameters
vectorthe vector to initialize
valthe value to set each element to
static void InitNormal ( this IList< float >  vector,
double  mean,
double  stddev 
)
inlinestatic

Initialize a collection of floats with values from a normal distribution

Parameters
vectorthe vector to initialize
meanthe mean of the normal distribution
stddevthe standard deviation of the normal distribution
static float ScalarProduct ( IList< float >  v1,
IList< float >  v2 
)
inlinestatic

Compute scalar product (dot product) of two vectors

Returns
the scalar product of the arguments
Parameters
v1the first vector
v2the second vector

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