ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
Cluster Class Reference

#include <Cluster.h>

Public Member Functions

 Cluster (const QString &name="", const QColor &color=Qt::gray, const std::vector< std::uint32_t > &indices=std::vector< std::uint32_t >())
 
QString getName () const
 
void setName (const QString &name)
 
QString getId () const
 
void setId (const QString &id)
 
QColor getColor () const
 
void setColor (const QColor &color)
 
const std::vector< std::uint32_t > & getIndices () const
 
std::vector< std::uint32_t > & getIndices ()
 
std::uint32_t getNumberOfIndices () const
 
void setIndices (const std::vector< unsigned int > &indices)
 
std::vector< float > & getMedian ()
 
const std::vector< float > & getMedian () const
 
std::vector< float > & getMean ()
 
const std::vector< float > & getMean () const
 
std::vector< float > & getStandardDeviation ()
 
const std::vector< float > & getStandardDeviation () const
 
Cluster copy () const
 
bool operator== (const Cluster &rhs) const
 

Static Public Member Functions

static void colorizeClusters (QVector< Cluster > &clusters, std::int32_t randomSeed=0)
 
static void colorizeClusters (QVector< Cluster > &clusters, const QImage &colorMapImage)
 

Protected Attributes

QString _name
 
QString _id
 
QColor _color
 
std::vector< unsigned int > _indices
 
std::vector< float > _median
 
std::vector< float > _mean
 
std::vector< float > _stddev
 

Detailed Description

Clusters class

Storage class for cluster data

Constructor & Destructor Documentation

◆ Cluster()

Cluster::Cluster ( const QString &  name = "",
const QColor &  color = Qt::gray,
const std::vector< std::uint32_t > &  indices = std::vector<std::uint32_t>() 
)

Constructor

Parameters
nameName of the cluster
colorColor of the cluster
indicesIndices of the cluster

Member Function Documentation

◆ colorizeClusters() [1/2]

void Cluster::colorizeClusters ( QVector< Cluster > &  clusters,
const QImage &  colorMapImage 
)
static

Colorize clusters by color map

Parameters
clustersVector of clusters to colorize
colorMapImageColor map image

◆ colorizeClusters() [2/2]

void Cluster::colorizeClusters ( QVector< Cluster > &  clusters,
std::int32_t  randomSeed = 0 
)
static

Colorize clusters by pseudo-random colors

Parameters
clustersVector of clusters to colorize
randomSeedRandom seed for pseudo-random colors

◆ copy()

Cluster Cluster::copy ( ) const

Copy cluster

Returns
Copy of the cluster (copies all members, except the _id, which is re-generated)

◆ getColor()

QColor Cluster::getColor ( ) const

Get cluster color

Returns
Cluster color

◆ getId()

QString Cluster::getId ( ) const

Get unique identifier

Returns
Unique identifier

◆ getIndices() [1/2]

std::vector< unsigned int > & Cluster::getIndices ( )

Get indices the cluster refers to

Returns
Indices the cluster refers to

◆ getIndices() [2/2]

const std::vector< unsigned int > & Cluster::getIndices ( ) const

Get indices the cluster refers to

Returns
Indices the cluster refers to

◆ getMean() [1/2]

std::vector< float > & Cluster::getMean ( )
inline

Get mean values for every dimension of the cluster

◆ getMean() [2/2]

const std::vector< float > & Cluster::getMean ( ) const
inline

◆ getMedian() [1/2]

std::vector< float > & Cluster::getMedian ( )
inline

Get median values for every dimension of the cluster

◆ getMedian() [2/2]

const std::vector< float > & Cluster::getMedian ( ) const
inline

◆ getName()

QString Cluster::getName ( ) const

Get cluster name

Returns
Cluster name

◆ getNumberOfIndices()

std::uint32_t Cluster::getNumberOfIndices ( ) const

Get number of indices

Returns
Number of indices

◆ getStandardDeviation() [1/2]

std::vector< float > & Cluster::getStandardDeviation ( )
inline

Get standard deviation values for every dimension of the cluster

◆ getStandardDeviation() [2/2]

const std::vector< float > & Cluster::getStandardDeviation ( ) const
inline

◆ operator==()

bool Cluster::operator== ( const Cluster rhs) const
inline

Comparison operator for two clusters

Parameters
rhsRight hand sign of the comparison

◆ setColor()

void Cluster::setColor ( const QColor &  color)

Set cluster color

Parameters
colorCluster color

◆ setId()

void Cluster::setId ( const QString &  id)

Set unique identifier

Parameters
idUnique identifier

◆ setIndices()

void Cluster::setIndices ( const std::vector< unsigned int > &  indices)

Set indices

Parameters
indicesIndices

◆ setName()

void Cluster::setName ( const QString &  name)

Set cluster name

Parameters
nameName of the cluster

Member Data Documentation

◆ _color

QColor Cluster::_color
protected

Unique cluster name

◆ _id

QString Cluster::_id
protected

GUI name

◆ _indices

std::vector<unsigned int> Cluster::_indices
protected

Cluster color

◆ _mean

std::vector<float> Cluster::_mean
protected

Median dimension values

◆ _median

std::vector<float> Cluster::_median
protected

Indices contained by the cluster

◆ _name

QString Cluster::_name
protected

◆ _stddev

std::vector<float> Cluster::_stddev
protected

Mean dimension values


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