MyMediaLite  3.09
Static Public Member Functions
VectorExtensions Class Reference

Extensions for vector-like data. More...

List of all members.

Static Public Member Functions

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

Detailed Description

Extensions for vector-like data.


Member Function Documentation

static double EuclideanNorm ( this ICollection< float >  vector) [inline, static]

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 
) [inline, static]

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 
) [inline, static]

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 
) [inline, static]

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: