ncut::Ncut Class Reference

Ncut represents one ncut of a similarity matrix. More...

#include <ncutCore.h>

List of all members.

Public Member Functions

const Matrixsimilarity () const
 Get a pointer to the similarity matrix.
double assoc (unsigned int i) const
 Get the total association of element with index i.
const double * assoc () const
 Get a pointer to the total association array.
unsigned int dim () const
 Get the dimension of this ncut.
double eigVal (unsigned int i) const
 Get the eigenvalue of the eigenvector with index i.
const double * eigVal () const
 Get a pointer to the eigenvalue array.
double eigVec (unsigned int i) const
 Get the eigenvector component with index i.
const double * eigVec () const
 Get a pointer to the eigenvectors array.
unsigned int nConv () const
 Get the number of converged eigenvectors.
int calculate (unsigned int nEigVecs, double *initVec=NULL)
 Calculate one minimal ncut.
 Ncut (const Matrix *similarity)
 Ncut can be constructed from a similarity matrix.
 Ncut (const Ncut &clone)
 Ncut copy constructor.
virtual ~Ncut ()
 Ncut destructor.
virtual Ncutoperator= (const Ncut &clone)
 Ncut assignment operator.

Protected Attributes

const Matrixsimilarity_
unsigned int dim_
double * assoc_
double * eigVal_
double * eigVec_
unsigned int nConv_


Detailed Description

Ncut represents one ncut of a similarity matrix.

This class is used by NcutNode to calculate the ncuts and construct the tree accordingly. Do not use Ncut directly, use the functions provided by the class Segmentation.

Author:
Ich


Constructor & Destructor Documentation

ncut::Ncut::Ncut const Matrix similarity  ) 
 

Ncut can be constructed from a similarity matrix.

Parameters:
similarity A pointer to the similarity matrix on which the ncut will be calculated.

ncut::Ncut::Ncut const Ncut clone  ) 
 

Ncut copy constructor.

Parameters:
clone The ncut to be cloned.
Creates a completely independent copy of clone.


Member Function Documentation

const double* ncut::Ncut::assoc  )  const [inline]
 

Get a pointer to the total association array.

Returns:
Pointer to the total association array.

double ncut::Ncut::assoc unsigned int  i  )  const [inline]
 

Get the total association of element with index i.

Parameters:
i element index
Returns:
Total association of element with index i.

int ncut::Ncut::calculate unsigned int  nEigVecs,
double *  initVec = NULL
 

Calculate one minimal ncut.

Parameters:
nEigVecs The desired number of eigenvectors.
initVec An initialization vector for arpack, defaults to NULL.
Returns:
0 if successful.
Calculates the minimal ncut of the similarity matrix pointed to by the member similarity and tries to produce nEigVecs eigenvectors and eigenvalues, but nEigVecs eigenvectors are not guaranteed. Use nConv to obtain the actual number of calculated eigenvectors.

unsigned int ncut::Ncut::dim  )  const [inline]
 

Get the dimension of this ncut.

Returns:
Dimension of this ncut.

const double* ncut::Ncut::eigVal  )  const [inline]
 

Get a pointer to the eigenvalue array.

Returns:
Pointer to the eigenvalue array.

double ncut::Ncut::eigVal unsigned int  i  )  const [inline]
 

Get the eigenvalue of the eigenvector with index i.

Parameters:
i eigenvector index
Returns:
Eigenvalue of the eigenvector with index i.

const double* ncut::Ncut::eigVec  )  const [inline]
 

Get a pointer to the eigenvectors array.

Returns:
Pointer to the eigenvectors array.

double ncut::Ncut::eigVec unsigned int  i  )  const [inline]
 

Get the eigenvector component with index i.

Parameters:
i component index, the components of all eigenvectors are in this array.
Returns:
Eigenvector component with index i.

unsigned int ncut::Ncut::nConv  )  const [inline]
 

Get the number of converged eigenvectors.

Returns:
Number of converged eigenvectors.

Ncut & ncut::Ncut::operator= const Ncut clone  )  [virtual]
 

Ncut assignment operator.

Parameters:
clone An Ncut to be cloned.
Returns:
This object.

const Matrix* ncut::Ncut::similarity  )  const [inline]
 

Get a pointer to the similarity matrix.

Returns:
Pointer to the similarity matrix.


Member Data Documentation

double* ncut::Ncut::assoc_ [protected]
 

an array containing the total association of each node

unsigned int ncut::Ncut::dim_ [protected]
 

the dimension of the ncut (= similarity matrix dimension)

double* ncut::Ncut::eigVal_ [protected]
 

an array of the calculated eigenvalues (its length is nConv_)

double* ncut::Ncut::eigVec_ [protected]
 

an array of the calculated eigenvectors (its length is nConv_ * dim_)

unsigned int ncut::Ncut::nConv_ [protected]
 

the actual number of converged eigenvalues and -vectors

const Matrix* ncut::Ncut::similarity_ [protected]
 

the similarity matrix on which the ncut is calculated


The documentation for this class was generated from the following file:
Generated on Thu Jun 22 14:47:21 2006 for ncut.kdevelop by  doxygen 1.4.6