Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Feature< D > Class Template Reference

Feature vector class. It is essentialy a matrix where, the first dimention refers to the feature and the other dimension to the element. More...

#include <Feature.hpp>

Collaboration diagram for Bial::Feature< D >:
Collaboration graph

Public Member Functions

 Feature (size_t elements, size_t features)
 Basic constructor. More...
 
template<class D2 >
 Feature (const Feature< D2 > &feat, const Sample &sample)
 Constructor of sub sample of given feature vector with desired samples. More...
 
Vector< D > operator[] (size_t elm) const
 Returns reference to feature vector of element elm. More...
 
Vector< D > operator() (size_t elm) const
 Returns reference to feature vector of element elm. More...
 
void operator() (size_t elm, Vector< D > ftr_vct)
 Copies ftr_vct data to element elm. More...
 
const D & operator() (size_t elm, size_t ftr) const
 Returns feature ftr of element elm. More...
 
D & operator() (size_t elm, size_t ftr)
 Returns reference to feature ftr of element elm. More...
 
size_t Elements () const
 Returns the number of elements. More...
 
size_t size () const
 Returns the number of vectors multiplied by the number of features. More...
 
size_t Size () const
 Returns the number of vectors multiplied by the number of features. More...
 
const Vector< size_t > & Index () const
 Returns a constant reference to the index vector. More...
 
Vector< size_t > & Index ()
 Returns a reference to the index vector. More...
 
const size_t & Index (size_t elm) const
 Returns index of element elm. More...
 
size_t & Index (size_t elm)
 Returns a reference to feature index element elm. More...
 
const Vector< int > & Label () const
 Returns a constant reference to the label vector. More...
 
Vector< int > & Label ()
 Returns a reference to the label vector. More...
 
const int & Label (size_t elm) const
 Returns label of element elm. More...
 
int & Label (size_t elm)
 Returns a reference to feature label element elm. More...
 
size_t Labels () const
 Returns the number of labels in the feature vector. More...
 
void Labels (size_t max)
 Sets the maximum label value in feature vector. More...
 
size_t Features () const
 Returns the number of features. More...
 
const Matrix< D > & FeatureVector () const
 Returns a reference from this feature vectors. More...
 
Matrix< D > & FeatureVector ()
 Returns a reference from this feature vectors. More...
 
const D * data () const
 Returns a reference from this feature vectors. More...
 
D * data ()
 Returns a reference from this feature vectors. More...
 
template<class O >
O & Print (O &os) const
 Prints feature vector containts to output stream os. More...
 

Friends

template<class D2 >
class Feature
 

Detailed Description

template<class D>
class Bial::Feature< D >

Feature vector class. It is essentialy a matrix where, the first dimention refers to the feature and the other dimension to the element.

Definition at line 28 of file Feature.hpp.

Constructor & Destructor Documentation

template<class D>
Bial::Feature< D >::Feature ( size_t  elements,
size_t  features 
)

Basic constructor.

Date
2012/Jun/26
Parameters
elementsNumber of elements.
featuresNumber of features.
Returns
none.
Warning
none.
template<class D>
template<class D2 >
Bial::Feature< D >::Feature ( const Feature< D2 > &  feat,
const Sample sample 
)

Constructor of sub sample of given feature vector with desired samples.

Date
2014/Oct/22
Parameters
featBase feature vector for sampling.
sampleVector with sample indexes.
Returns
none.
Warning
Does not check if requested samples are in original feature vector range.

Member Function Documentation

template<class D>
const D* Bial::Feature< D >::data ( ) const

Returns a reference from this feature vectors.

Date
2012/Aug/13
Parameters
none.
Returns
A reference from this feature vectors.
Warning
none.
template<class D>
D* Bial::Feature< D >::data ( )

Returns a reference from this feature vectors.

Date
2015/Mar/10
Parameters
none.
Returns
A reference from this feature vectors.
Warning
none.
template<class D>
size_t Bial::Feature< D >::Elements ( ) const

Returns the number of elements.

Date
2012/Jun/29
Parameters
none.
Returns
The number of elements.
Warning
none.
template<class D>
size_t Bial::Feature< D >::Features ( ) const

Returns the number of features.

Date
2012/Jun/29
Parameters
none.
Returns
The number of features.
Warning
none.
template<class D>
const Matrix< D >& Bial::Feature< D >::FeatureVector ( ) const

Returns a reference from this feature vectors.

Date
2012/Aug/13
Parameters
none.
Returns
A reference from this feature vectors.
Warning
none.
template<class D>
Matrix< D >& Bial::Feature< D >::FeatureVector ( )

Returns a reference from this feature vectors.

Date
2015/Mar/10
Parameters
none.
Returns
A reference from this feature vectors.
Warning
none.
template<class D>
const Vector< size_t >& Bial::Feature< D >::Index ( ) const

Returns a constant reference to the index vector.

Date
2012/Jun/29
Parameters
none.
Returns
A constant reference to the index vector.
Warning
none.
template<class D>
Vector< size_t >& Bial::Feature< D >::Index ( )

Returns a reference to the index vector.

Date
2012/Aug/13
Parameters
none.
Returns
A reference to the index vector.
Warning
Input vector size must be compatible.
template<class D>
const size_t& Bial::Feature< D >::Index ( size_t  elm) const

Returns index of element elm.

Date
2012/Jun/29
Parameters
elmThe index to be accessed.
Returns
Feature index element elm.
Warning
none.
template<class D>
size_t& Bial::Feature< D >::Index ( size_t  elm)

Returns a reference to feature index element elm.

Date
2012/Jun/29
Parameters
elmThe index to be accessed.
Returns
Reference to feature index element elm.
Warning
none.
template<class D>
const Vector< int >& Bial::Feature< D >::Label ( ) const

Returns a constant reference to the label vector.

Date
2012/Jun/29
Parameters
none.
Returns
A constant reference to the label vector.
Warning
none.
template<class D>
Vector< int >& Bial::Feature< D >::Label ( )

Returns a reference to the label vector.

Date
2012/Aug/13
Parameters
none.
Returns
A reference to the label vector.
Warning
Input vector size must be compatible.
template<class D>
const int& Bial::Feature< D >::Label ( size_t  elm) const

Returns label of element elm.

Date
2012/Jun/29
Parameters
elmThe label to be accessed.
Returns
Feature label element elm.
Warning
none.
template<class D>
int& Bial::Feature< D >::Label ( size_t  elm)

Returns a reference to feature label element elm.

Date
2012/Jun/29
Parameters
elmThe label to be accessed.
Returns
Reference to feature label element elm.
Warning
none.
template<class D>
size_t Bial::Feature< D >::Labels ( ) const

Returns the number of labels in the feature vector.

Date
2012/Jun/29
Parameters
none.
Returns
Number of labels in the feature vector.
Warning
none.
template<class D>
void Bial::Feature< D >::Labels ( size_t  max)

Sets the maximum label value in feature vector.

Date
2012/Jun/29
Parameters
maxMaximum label value in feature vector.
Returns
none.
Warning
none.
template<class D>
Vector< D > Bial::Feature< D >::operator() ( size_t  elm) const

Returns reference to feature vector of element elm.

Date
2012/Jul/14
Parameters
elmThe element to be accessed.
Returns
Reference to feature vector of element elm.
Warning
none.
template<class D>
void Bial::Feature< D >::operator() ( size_t  elm,
Vector< D >  ftr_vct 
)

Copies ftr_vct data to element elm.

Date
2014/Oct/14
Parameters
elmThe element to be accessed.
ftr_vctA feature vector.
Returns
none.
Warning
none.
template<class D>
const D& Bial::Feature< D >::operator() ( size_t  elm,
size_t  ftr 
) const

Returns feature ftr of element elm.

Date
2012/Jun/29
Parameters
elmThe element to be accessed.
ftrThe feature to be accessed.
Returns
Feature ftr of element elm.
Warning
none.
template<class D>
D& Bial::Feature< D >::operator() ( size_t  elm,
size_t  ftr 
)

Returns reference to feature ftr of element elm.

Date
2012/Jun/29
Parameters
elmThe element to be accessed.
ftrThe feature to be accessed.
Returns
Reference to feature ftr of element elm.
Warning
none.
template<class D>
Vector< D > Bial::Feature< D >::operator[] ( size_t  elm) const

Returns reference to feature vector of element elm.

Date
2012/Jul/14
Parameters
elmThe element to be accessed.
Returns
Reference to feature vector of element elm.
Warning
none.
template<class D>
template<class O >
O& Bial::Feature< D >::Print ( O &  os) const

Prints feature vector containts to output stream os.

Date
2012/Aug/07
Parameters
osan output stream.
Returns
The output stream.
Warning
Only enebled features are printed.
template<class D>
size_t Bial::Feature< D >::size ( ) const

Returns the number of vectors multiplied by the number of features.

Date
2015/Mar/12
Parameters
none.
Returns
The number of vectors multiplied by the number of features.
Warning
none.
template<class D>
size_t Bial::Feature< D >::Size ( ) const

Returns the number of vectors multiplied by the number of features.

Date
2015/Mar/12
Parameters
none.
Returns
The number of vectors multiplied by the number of features.
Warning
none.

Friends And Related Function Documentation

template<class D>
template<class D2 >
friend class Feature
friend

Definition at line 37 of file Feature.hpp.


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