kmeans::Cluster< T > Class Template Reference

List of all members.

Detailed Description

template<class T>
class kmeans::Cluster< T >

Defines a cluster based on a statistic.

Has to satisfy the same requirements as KSSegment.

Author:
Lakshman
Version:
Id
Cluster.h,v 1.5 2009/06/02 20:17:47 lakshman Exp


Public Member Functions

int minx () const
int maxx () const
int miny () const
int maxy () const
int top_rt () const
int top_lt () const
int bot_rt () const
int bot_lt () const
void set_minx (int a)
 WARNING! by changing this, the cluster might become inconsistent!
void set_maxx (int a)
void set_miny (int a)
void set_maxy (int a)
void set_top_rt (int a)
void set_top_lt (int a)
void set_bot_rt (int a)
void set_bot_lt (int a)
float cx () const
 The center of gravity.
float cy () const
 The center of gravity.
cval () const
 The center of gravity in measurement space.
float geo_cx () const
 The geometric center of gravity.
float geo_cy () const
 The geometric center of gravity.
geo_cval () const
 The geometric center of gravity in measurement space.
int size () const
 Number of pixels in region.
 Cluster ()
void update (int x, int y, const T &value=T(), float wt=1.0)
 Add a new pixel.
void update (const Cluster< T > &other)
 Add another cluster.
float contains (const Cluster< T > &other) const
 Percentage of other region contained within this one.
float contained_within (const Cluster< T > &other) const
 Percentage of this one contained in other region.
float computeArea () const
 Returns computed area between the bounds.
float relativeDist (const Cluster< T > &other) const
 Relative distance between this cluster and the other cluster.

Friends

std::ostream & operator<< (std::ostream &dout, const Cluster< T > &obj)


Constructor & Destructor Documentation

template<class T>
kmeans::Cluster< T >::Cluster (  ) 


Member Function Documentation

template<class T>
int kmeans::Cluster< T >::bot_lt (  )  const [inline]

template<class T>
int kmeans::Cluster< T >::bot_rt (  )  const [inline]

template<class T>
float kmeans::Cluster< T >::computeArea (  )  const

Returns computed area between the bounds.

template<class T>
float kmeans::Cluster< T >::contained_within ( const Cluster< T > &  other  )  const [inline]

Percentage of this one contained in other region.

template<class T>
float kmeans::Cluster< T >::contains ( const Cluster< T > &  other  )  const

Percentage of other region contained within this one.

template<class T>
T kmeans::Cluster< T >::cval (  )  const [inline]

The center of gravity in measurement space.

template<class T>
float kmeans::Cluster< T >::cx (  )  const [inline]

The center of gravity.

template<class T>
float kmeans::Cluster< T >::cy (  )  const [inline]

The center of gravity.

template<class T>
T kmeans::Cluster< T >::geo_cval (  )  const [inline]

The geometric center of gravity in measurement space.

template<class T>
float kmeans::Cluster< T >::geo_cx (  )  const [inline]

The geometric center of gravity.

template<class T>
float kmeans::Cluster< T >::geo_cy (  )  const [inline]

The geometric center of gravity.

template<class T>
int kmeans::Cluster< T >::maxx (  )  const [inline]

template<class T>
int kmeans::Cluster< T >::maxy (  )  const [inline]

template<class T>
int kmeans::Cluster< T >::minx (  )  const [inline]

template<class T>
int kmeans::Cluster< T >::miny (  )  const [inline]

template<class T>
float kmeans::Cluster< T >::relativeDist ( const Cluster< T > &  other  )  const

Relative distance between this cluster and the other cluster.

The whole idea that a.relativeDist(b) is 0 if a contains b. Otherwise, it gives the number of a-sized clusters that you can fit between a's envelope and b's envelope.

Because of this definition, a.relativeDist(b) is not the same as b.relativeDist(a)

template<class T>
void kmeans::Cluster< T >::set_bot_lt ( int  a  )  [inline]

template<class T>
void kmeans::Cluster< T >::set_bot_rt ( int  a  )  [inline]

template<class T>
void kmeans::Cluster< T >::set_maxx ( int  a  )  [inline]

template<class T>
void kmeans::Cluster< T >::set_maxy ( int  a  )  [inline]

template<class T>
void kmeans::Cluster< T >::set_minx ( int  a  )  [inline]

WARNING! by changing this, the cluster might become inconsistent!

template<class T>
void kmeans::Cluster< T >::set_miny ( int  a  )  [inline]

template<class T>
void kmeans::Cluster< T >::set_top_lt ( int  a  )  [inline]

template<class T>
void kmeans::Cluster< T >::set_top_rt ( int  a  )  [inline]

template<class T>
int kmeans::Cluster< T >::size (  )  const [inline]

Number of pixels in region.

template<class T>
int kmeans::Cluster< T >::top_lt (  )  const [inline]

template<class T>
int kmeans::Cluster< T >::top_rt (  )  const [inline]

template<class T>
void kmeans::Cluster< T >::update ( const Cluster< T > &  other  ) 

Add another cluster.

template<class T>
void kmeans::Cluster< T >::update ( int  x,
int  y,
const T &  value = T(),
float  wt = 1.0 
)

Add a new pixel.


Friends And Related Function Documentation

template<class T>
std::ostream& operator<< ( std::ostream &  dout,
const Cluster< T > &  obj 
) [friend]


Generated on Fri May 4 13:40:22 2012 for WDSS-IIw2algs by  doxygen 1.4.7