STK++ 0.9.13
STK::Reduct Namespace Reference

This namespace encloses all variables and constant specific to the Reduct project. More...

Enumerations

enum  TypeReduction { unknown_reduction_ =0 , localVariance_ , totalVariance_ , mds_ }
 dimension reduction we can apply to the original data set. More...
 
enum  TypeGraph { unknown_graph_ , prim_ , distance_ }
 Type of proximity graph to used in order to compute the local variance: More...
 

Functions

TypeReduction stringToTypeReduction (String const &type)
 convert a String to a TypeReduction.
 
String typeReductionToString (TypeReduction const &type)
 convert a TypeReduction to a String.
 
TypeGraph stringToTypeGraph (String const &type)
 convert a String to a TypeGraph.
 
String typeGraphToString (TypeGraph const &type)
 convert a TypeGraph to a String.
 

Detailed Description

This namespace encloses all variables and constant specific to the Reduct project.

Enumeration Type Documentation

◆ TypeGraph

Type of proximity graph to used in order to compute the local variance:

  • prim_ the minimal spanning tree
  • distance_ the first neighbors
  • unknown_ unknown type of graph
Enumerator
unknown_graph_ 
prim_ 
distance_ 

Definition at line 84 of file STK_Reduct_Util.h.

Function Documentation

◆ stringToTypeGraph()

TypeGraph STK::Reduct::stringToTypeGraph ( String const type)
inline

convert a String to a TypeGraph.

Parameters
typethe type of graph in a string
Returns
the TypeGraph represented by the String type. If the string does not match any known name, the unknown_ type is returned.

Definition at line 138 of file STK_Reduct_Util.h.

139{
140 if (toUpperString(type) == toUpperString(_T("prim"))) return prim_;
141 if (toUpperString(type) == toUpperString(_T("minimalDistance"))) return distance_;
142 return unknown_graph_;
143}
#define _T(x)
Let x unmodified.
String const & toUpperString(String &s)
convert the characters of the String to upper case
Definition STK_String.h:134

References _T, distance_, prim_, STK::toUpperString(), and unknown_graph_.

Referenced by STK::LocalVariancePage::validate().

◆ typeGraphToString()

String STK::Reduct::typeGraphToString ( TypeGraph const type)
inline

convert a TypeGraph to a String.

Parameters
typethe type of graph we want to convert to a string
Returns
the string associated to this type of graph

Definition at line 149 of file STK_Reduct_Util.h.

150{
151 if (type == prim_) return String(_T("prim"));
152 if (type == distance_) return String(_T("minimalDistance"));
153 return String(_T("unknown"));
154}
std::basic_string< Char > String
STK fundamental type of a String.

References _T, distance_, and prim_.