SAGA API  v9.6
CSG_Cluster_Analysis Class Reference

#include <mat_tools.h>

Public Member Functions

 CSG_Cluster_Analysis (void)
 
virtual ~CSG_Cluster_Analysis (void)
 
bool Create (int nFeatures)
 
bool Destroy (void)
 
bool Add_Element (void)
 
bool Set_Feature (sLong iElement, int iFeature, double Value)
 
sLong Get_Cluster (sLong iElement) const
 
bool Execute (int Method, int nClusters, int nMaxIterations=0, int Initialization=0)
 
sLong Get_nElements (void) const
 
int Get_nFeatures (void) const
 
int Get_nClusters (void) const
 
int Get_Iteration (void) const
 
double Get_SP (void) const
 
int Get_nMembers (int iCluster) const
 
double Get_Variance (int iCluster) const
 
double Get_Centroid (int iCluster, int iFeature) const
 

Detailed Description

Definition at line 1149 of file mat_tools.h.

Constructor & Destructor Documentation

◆ CSG_Cluster_Analysis()

CSG_Cluster_Analysis::CSG_Cluster_Analysis ( void  )

Definition at line 1981 of file mat_tools.cpp.

◆ ~CSG_Cluster_Analysis()

CSG_Cluster_Analysis::~CSG_Cluster_Analysis ( void  )
virtual

Definition at line 1988 of file mat_tools.cpp.

References Destroy().

Member Function Documentation

◆ Add_Element()

bool CSG_Cluster_Analysis::Add_Element ( void  )

Definition at line 2025 of file mat_tools.cpp.

References CSG_Array::Inc_Array().

◆ Create()

bool CSG_Cluster_Analysis::Create ( int  nFeatures)

Definition at line 2008 of file mat_tools.cpp.

References CSG_Array::Create(), and Destroy().

◆ Destroy()

bool CSG_Cluster_Analysis::Destroy ( void  )

◆ Execute()

bool CSG_Cluster_Analysis::Execute ( int  Method,
int  nClusters,
int  nMaxIterations = 0,
int  Initialization = 0 
)

Performs the cluster analysis using the features added prior to this step. Method is minimum distance (= default), hill climbing (= 1), or both methods in combination. If nMaxIterations is set to zero, the analysis is iterated until it converges. Initilization is done randomely (= default), periodically (= 1), or skipped (= 2). The latter case allows starting the clustering with user supplied start partitions.

Definition at line 2054 of file mat_tools.cpp.

References CSG_Array_Int::Create(), CSG_Matrix::Create(), CSG_Vector::Create(), Get_nElements(), and CSG_Random::Get_Uniform().

◆ Get_Centroid()

double CSG_Cluster_Analysis::Get_Centroid ( int  iCluster,
int  iFeature 
) const
inline

Definition at line 1175 of file mat_tools.h.

◆ Get_Cluster()

sLong CSG_Cluster_Analysis::Get_Cluster ( sLong  iElement) const
inline

Definition at line 1161 of file mat_tools.h.

◆ Get_Iteration()

int CSG_Cluster_Analysis::Get_Iteration ( void  ) const
inline

Definition at line 1169 of file mat_tools.h.

◆ Get_nClusters()

int CSG_Cluster_Analysis::Get_nClusters ( void  ) const
inline

Definition at line 1167 of file mat_tools.h.

◆ Get_nElements()

sLong CSG_Cluster_Analysis::Get_nElements ( void  ) const
inline

Definition at line 1165 of file mat_tools.h.

Referenced by Execute(), and Set_Feature().

◆ Get_nFeatures()

int CSG_Cluster_Analysis::Get_nFeatures ( void  ) const
inline

Definition at line 1166 of file mat_tools.h.

◆ Get_nMembers()

int CSG_Cluster_Analysis::Get_nMembers ( int  iCluster) const
inline

Definition at line 1173 of file mat_tools.h.

◆ Get_SP()

double CSG_Cluster_Analysis::Get_SP ( void  ) const
inline

Definition at line 1171 of file mat_tools.h.

◆ Get_Variance()

double CSG_Cluster_Analysis::Get_Variance ( int  iCluster) const
inline

Definition at line 1174 of file mat_tools.h.

◆ Set_Feature()

bool CSG_Cluster_Analysis::Set_Feature ( sLong  iElement,
int  iFeature,
double  Value 
)

Definition at line 2031 of file mat_tools.cpp.

References CSG_Array::Get_Entry(), and Get_nElements().


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