The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fib::algorithms::nDn::cHyperplane< tFactors > Class Template Reference

#include <cHyperplane.h>

Collaboration diagram for fib::algorithms::nDn::cHyperplane< tFactors >:

List of all members.

Public Member Functions

 cHyperplane ()
 cHyperplane (const vector< tFactors > &vecInBase, const vector< vector< tFactors > > &vecInDirections)
 cHyperplane (const nLinearInequation::cInequation< tFactors > &inequation)
 cHyperplane (const nLinearInequation::cInequation< tFactors > &inequation, unsigned int uiNumberOfDimensions)
vector< tFactors > getBase () const
void setBase (const vector< tFactors > &vecInBase)
vector< tFactors > getDirection (const unsigned int uiDirection) const
vector< vector< tFactors > > getDirections () const
unsigned int getNumberOfDirections () const
bool addDirection (const vector< tFactors > &vecInDirection)
unsigned int addDirections (vector< vector< tFactors > > vecInDirections)
bool deleteDirection (unsigned int uiDirection)
unsigned int getNumberOfDimensions () const
unsigned int setNumberOfDimensions (unsigned int uiDimensionality)
void makeDirectionsIndependent ()
void convertToFormOne ()
cHyperplane< tFactors > * evalueIntersection (const cHyperplane< tFactors > &hyperplane) const
bool equal (const cHyperplane< tFactors > &hyperplane) const
void print (ostream &outputStream) const

Protected Types

enum  typeFillType { ALL, NONE, SOME }
typedef vector< vector
< tFactors > > 
typeDirection
typedef typeDirection::iterator typeItrDirection
typedef
typeDirection::const_iterator 
typeConstItrDirection

Protected Member Functions

bool compareVectorVectorDouble (const vector< vector< tFactors > > &vector1, const vector< vector< tFactors > > &vector2) const
bool createHyperplaneFromInequiation (const nLinearInequation::cInequation< tFactors > &inequation, unsigned int uiInNumberOfDimensions)

Protected Attributes

vector< tFactors > vecBase
typeDirection vecDirections
typeFillType fillType
bool bDirectionsLinearIndependent
bool bInFormOne

Detailed Description

template<class tFactors>
class fib::algorithms::nDn::cHyperplane< tFactors >

Definition at line 66 of file cHyperplane.h.


Member Typedef Documentation

template<class tFactors>
typedef typeDirection::const_iterator fib::algorithms::nDn::cHyperplane< tFactors >::typeConstItrDirection
protected

The type for const iterators for the direction vectors.

See also:
typeDirection
vecDirections

Definition at line 87 of file cHyperplane.h.

template<class tFactors>
typedef vector< vector< tFactors > > fib::algorithms::nDn::cHyperplane< tFactors >::typeDirection
protected

The type for the direction vectors.

See also:
vecDirections

Definition at line 73 of file cHyperplane.h.

template<class tFactors>
typedef typeDirection::iterator fib::algorithms::nDn::cHyperplane< tFactors >::typeItrDirection
protected

The type for iterators for the direction vectors.

See also:
typeDirection
vecDirections

Definition at line 80 of file cHyperplane.h.


Member Enumeration Documentation

template<class tFactors>
enum fib::algorithms::nDn::cHyperplane::typeFillType
protected

This type specifies how much the hyperplane fills of the dimensions.

Values:

  • ALL: the hyperplane fills the whool space
  • NONE: the hyperplane fills nothing of the space (it didn't exists)
  • SOME: the hyperplane fills some of the space
Enumerator:
ALL 
NONE 
SOME 

Definition at line 107 of file cHyperplane.h.


Constructor & Destructor Documentation

template<class tFactors>
fib::algorithms::nDn::cHyperplane< tFactors >::cHyperplane ( )

standardconstructor

template<class tFactors>
fib::algorithms::nDn::cHyperplane< tFactors >::cHyperplane ( const vector< tFactors > &  vecInBase,
const vector< vector< tFactors > > &  vecInDirections 
)

parameterconstructor

Parameters:
vecInBasethe base vector (B) for the hyperplane
See also:
vecBase
Parameters:
vecInDirectionsthe direction vectors (D_i) for the hyperplane
See also:
vecDirections
template<class tFactors>
fib::algorithms::nDn::cHyperplane< tFactors >::cHyperplane ( const nLinearInequation::cInequation< tFactors > &  inequation)

parameterconstructor The number of dimensions will be the number of factors in the inequation.

Parameters:
inequationthe inequiation which defines this hyperplane; if the inequal sign of the inequation would be replaced by an equal sign, all points which fulfill the equiation are on the hyperplane
template<class tFactors>
fib::algorithms::nDn::cHyperplane< tFactors >::cHyperplane ( const nLinearInequation::cInequation< tFactors > &  inequation,
unsigned int  uiNumberOfDimensions 
)

parameterconstructor

Parameters:
inequationthe inequiation which defines this hyperplane; if the inequal sign of the inequation would be replaced by an equal sign, all points which fulfill the equiation are on the hyperplane
uiNumberOfDimensionsthe number of dimensions the hyperplane should be placed in

Member Function Documentation

template<class tFactors>
bool fib::algorithms::nDn::cHyperplane< tFactors >::addDirection ( const vector< tFactors > &  vecInDirection)

This method adds the given direction vector vecInDirection to this hyperplane.

See also:
vecDirections
Parameters:
vecInDirectionthe direction vector to add
Returns:
true if the direction was added else false
template<class tFactors>
unsigned int fib::algorithms::nDn::cHyperplane< tFactors >::addDirections ( vector< vector< tFactors > >  vecInDirections)

This method adds the given direction vectors vecInDirections to this hyperplane.

See also:
vecDirections
Parameters:
vecInDirectionsthe direction vectors to add
Returns:
the number of inserted direction vectors
template<class tFactors>
bool fib::algorithms::nDn::cHyperplane< tFactors >::compareVectorVectorDouble ( const vector< vector< tFactors > > &  vector1,
const vector< vector< tFactors > > &  vector2 
) const
protected

This functions compares two vectors of vectors with double numbers. Realy small differences betwean the vector element numbers will be ignored.

Parameters:
vector1the first vector of vectors to compare
vector2the second vector of vectors to compare
Returns:
true if the first vector of vectors is equal to the second, else false
template<class tFactors>
void fib::algorithms::nDn::cHyperplane< tFactors >::convertToFormOne ( )

This method will convert the given hyperplane into the form One form. Form One is a special hyperplane form, wich is uniqe and simpler to handle. Hyperplane form: Y = B + D_1 * x_1 + D_2 * x_2 + ... + D_d * x_d In form One:

  • B point on the hyperplane as the base vector, with |B| minimal
  • D_i are the independent hyperplane direction vectors D_i = ( h_i.1, ..., h_i.{o_i}, ..., h_i.d )^T with h_i.1= ...= h_i.o_i - 1} = 0, h_i.{o_i} = 1 and o_{i-1} < o_i, for 1 < i (o_{i-1} is for D_{i-1} )
template<class tFactors>
bool fib::algorithms::nDn::cHyperplane< tFactors >::createHyperplaneFromInequiation ( const nLinearInequation::cInequation< tFactors > &  inequation,
unsigned int  uiInNumberOfDimensions 
)
protected

This method recreates this hyperplane from the given inequation.

Parameters:
inequationthe inequiation which defines this hyperplane; if the inequal sign of the inequation would be replaced by an equal sign, all points which fulfill the equiation are on the hyperplane
uiInNumberOfDimensionsthe number of dimensions the hyperplane should be placed in
template<class tFactors>
bool fib::algorithms::nDn::cHyperplane< tFactors >::deleteDirection ( unsigned int  uiDirection)

This method deletes the uiDirection'th direction vector of this hyperplane.

See also:
vecDirections
Parameters:
uiDirectionthe number of the direction vector to delete (counting begins with 1)
Returns:
true if the uiDirection'th direction vector of this hyperplane was deleted, else false
template<class tFactors>
bool fib::algorithms::nDn::cHyperplane< tFactors >::equal ( const cHyperplane< tFactors > &  hyperplane) const

This method checks if this hyperplane is equal to the given hyperplane. Two hyperplanes are equal, if thy contain the same points.

Parameters:
hyperplanethe hyperplane , for wich to check if its equal to this hyperplane
Returns:
true if the given hyperplane is equal to this hyperplane else false
template<class tFactors>
cHyperplane< tFactors >* fib::algorithms::nDn::cHyperplane< tFactors >::evalueIntersection ( const cHyperplane< tFactors > &  hyperplane) const

This method evalues the intersection of the given hyperplane with this hyperplan. If no intersection exists NULL is returned. Attention: You have to care, that the returned object is deleted.

Parameters:
hyperplanethe hyperplane, with wich this hyperplane should be intersected
Returns:
the intersection hyperplane of this and the given hyperplane or NULL, if no intersection exists
template<class tFactors>
vector< tFactors > fib::algorithms::nDn::cHyperplane< tFactors >::getBase ( ) const
Returns:
the base of this hyperplane (
See also:
vecBase)
template<class tFactors>
vector< tFactors > fib::algorithms::nDn::cHyperplane< tFactors >::getDirection ( const unsigned int  uiDirection) const

This method returns the uiDirection'th direction vector of this hyperplane.

See also:
vecDirections
Parameters:
uiDirectionthe number of the direction vector to return (counting begins with 1)
Returns:
the uiDirection'th direction vector of this hyperplane or a vector with no elements, if no such direction exists
template<class tFactors>
vector< vector< tFactors > > fib::algorithms::nDn::cHyperplane< tFactors >::getDirections ( ) const
Returns:
a vector with all direction vectors of this hyperplane (
See also:
vecDirections)
template<class tFactors>
unsigned int fib::algorithms::nDn::cHyperplane< tFactors >::getNumberOfDimensions ( ) const
Returns:
the number of dimensions this hyperplane is contained in (
See also:
vecDirections,
vecBase); the number of dimensions of this hyperplane are the numbers of elements in its vectors
template<class tFactors>
unsigned int fib::algorithms::nDn::cHyperplane< tFactors >::getNumberOfDirections ( ) const
Returns:
the number of direction vectors of this hyperplane (
See also:
vecDirections); if the direction vectors are linear independent the returned value is also the dimensionality of this hyperplane
template<class tFactors>
void fib::algorithms::nDn::cHyperplane< tFactors >::makeDirectionsIndependent ( )

This method will remove all not independent vectors from the direction vectors (a_i). So that the remaining direction vectors are linear undependent.

template<class tFactors>
void fib::algorithms::nDn::cHyperplane< tFactors >::print ( ostream &  outputStream) const

This method print the hyperplane in a readebel form to the given output stream outputSream.

Parameters:
outputSreamthe stream wher to print this inequation to
template<class tFactors>
void fib::algorithms::nDn::cHyperplane< tFactors >::setBase ( const vector< tFactors > &  vecInBase)

This method sets the base of this hyperplane to the given vecInBase.

See also:
vecBase
Parameters:
vecInBasethe base this hyperplane should have
template<class tFactors>
unsigned int fib::algorithms::nDn::cHyperplane< tFactors >::setNumberOfDimensions ( unsigned int  uiDimensionality)

This method sets the number of dimensions this hyperplane is contained in. (

See also:
vecDirections,
vecBase); The number of dimensions of this hyperplane are the numbers of elements in its vectors.
Parameters:
uiDimensionalitythe number of dimensions of this hyperplane
Returns:
the number of dimensions of this hyperplane

Member Data Documentation

template<class tFactors>
bool fib::algorithms::nDn::cHyperplane< tFactors >::bDirectionsLinearIndependent
protected

The directions of this hyperplane are linear independent.

Definition at line 119 of file cHyperplane.h.

template<class tFactors>
bool fib::algorithms::nDn::cHyperplane< tFactors >::bInFormOne
protected

The the hyperplane is in form One. Form One is a special hyperplane form, wich is uniqe and simpler to handle. Hyperplane form: Y = B + D_1 * x_1 + D_2 * x_2 + ... + D_d * x_d In form One:

  • B point on the hyperplane as the base vector, with |B| minimal
  • D_i are the independent hyperplane direction vectors D_i = ( h_i.1, ..., h_i.{o_i}, ..., h_i.d )^T with h_i.1= ...= h_i.o_i - 1} = 0, h_i.{o_i} = 1 and o_{i-1} < o_i, for 1 < i (o_{i-1} is for D_{i-1} )

Definition at line 132 of file cHyperplane.h.

template<class tFactors>
typeFillType fib::algorithms::nDn::cHyperplane< tFactors >::fillType
protected

This object specifies how much the hyperplane fills of the dimensions.

See also:
typeFillType

Definition at line 113 of file cHyperplane.h.

template<class tFactors>
vector< tFactors > fib::algorithms::nDn::cHyperplane< tFactors >::vecBase
protected

A point on the hyperplane as the base vector (B).

Definition at line 92 of file cHyperplane.h.

template<class tFactors>
typeDirection fib::algorithms::nDn::cHyperplane< tFactors >::vecDirections
protected

The (independent) direction vectors (D_i) for the hyperplane.

Definition at line 97 of file cHyperplane.h.


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