Into

Modules

Documentation

namespace referencePiiSampleSet

Contains functions and definitions for accessing sample sets in an abstract way.

Into uses PiiMatrix as the default sample set type, but most learning and classification algorithms are written so that they don't expect a specific sample set type. Instead, functions in this namespace are used to access the sample set. If you want to use a different type to hold your sample sets, you need to create an overloaded version for each function in this namespace and specialize the PiiSampleSet::Traits structure.

Classes

struct

Defines the traits of any PiiMatrix when used as a sample set.

Functions

template<class T>
void
( )

Adds sample to the and of a sample set.

template<class T>
int
( )

Returns the number of samples a sample set can hold without reallocation.

template<class T>
void
( )

Clears a sample set.

template<class SampleSet>
SampleSet
(
  • int sampleCount
  • int featureCount
)

Creates a new sample set with sampleCount samples and featureCount features.

template<class T>
bool
( )

Returns true if set1 is equal to set2, and false otherwise.

template<class T>
int
( )

Returns the number of features in a sample set.

template<class T>
void
( )

Removes the sample at index.

template<class T>
void
(
  • PiiMatrix< T > & samples
  • int sampleCount
  • int featureCount = -1
)

Reserves space for sampleCount samples with featureCount features.

template<class T>
void
(
  • PiiMatrix< T > & samples
  • int sampleCount
  • int featureCount = -1
)

Resizes a sample set to hold sampleCount samples with featureCount features.

template<class T>
T *
( )
template<class T>
const T *
( )

Returns the sample at index.

template<class T>
int
( )

Returns the number of samples in a sample set.

template<class T>
void
(
  • PiiMatrix< T > & samples
  • int index
  • const T * features
)

Replaces the feature vector at index in samples with features.

Function details

  • template<class T>

    void append

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Adds sample to the and of a sample set.

  • template<class T>

    int capacity

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Returns the number of samples a sample set can hold without reallocation.

  • template<class T>

    void clear

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Clears a sample set.

  • template<class SampleSet>

    SampleSet create

    (
    • int sampleCount
    • int featureCount
    )
    [inline]

    #include <PiiSampleSet.h>

    Creates a new sample set with sampleCount samples and featureCount features.

  • template<class T>

    bool equals

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Returns true if set1 is equal to set2, and false otherwise.

  • template<class T>

    int featureCount

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Returns the number of features in a sample set.

  • template<class T>

    void remove

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Removes the sample at index.

  • template<class T>

    void reserve

    (
    • PiiMatrix< T > & samples
    • int sampleCount
    • int featureCount = -1
    )
    [inline]

    #include <PiiSampleSet.h>

    Reserves space for sampleCount samples with featureCount features.

    If featureCount is -1, the number of features will not be changed.

  • template<class T>

    void resize

    (
    • PiiMatrix< T > & samples
    • int sampleCount
    • int featureCount = -1
    )
    [inline]

    #include <PiiSampleSet.h>

    Resizes a sample set to hold sampleCount samples with featureCount features.

    If featureCount is -1, the number of features will not be changed.

  • template<class T>

    T * sampleAt

    ( )
    [inline]

    #include <PiiSampleSet.h>

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

  • template<class T>

    const T * sampleAt

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Returns the sample at index.

  • template<class T>

    int sampleCount

    ( )
    [inline]

    #include <PiiSampleSet.h>

    Returns the number of samples in a sample set.

  • template<class T>

    void setSampleAt

    (
    • PiiMatrix< T > & samples
    • int index
    • const T * features
    )
    [inline]

    #include <PiiSampleSet.h>

    Replaces the feature vector at index in samples with features.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.