File weight_vector_out_of_sample.hpp

template<typename WeightVector>
class OutOfSampleWeightVector
#include <weight_vector_out_of_sample.hpp>

An one-dimensional vector that provides random access to a fixed number of weights that are obtained from another vector by setting zero weights to one and non-zero weights to zero.

Template Parameters:

WeightVector – The type of the other vector

Public Functions

OutOfSampleWeightVector(const WeightVector &vector)
Parameters:

vector – A reference to an object of template type WeightVector that provides access to the original weights

uint32 getNumElements() const

Returns the number of elements in the vector.

Returns:

The number of elements

bool operator[](uint32 pos) const

Returns the weight at a specific position.

Parameters:

pos – The position

Returns:

The weight at the specified position

Private Members

const WeightVector &vector_