te::sa::GPMBuilder Class Reference

This class defines the GPM Builder class. More...

#include <GPMBuilder.h>

Public Member Functions

GeneralizedProximityMatrixgetGPM ()
 Function used to return the generated gpm. More...
 
 GPMBuilder (GPMConstructorAbstractStrategy *constructor, GPMWeightsAbstractStrategy *weights)
 Default constructor. More...
 
virtual ~GPMBuilder ()
 Virtual destructor. More...
 
Methods

Methods used by the GPM builder

bool setGPMInfo (te::da::DataSourcePtr ds, const std::string &dataSetName, const std::string &attributeName)
 Function used to create an empty gpm (using a MEMORY DIRECT graph) More...
 
void build ()
 

Private Attributes

GPMConstructorAbstractStrategym_constructor
 Strategy used to construct the gpm. More...
 
te::da::DataSourcePtr m_ds
 Input Data Source. More...
 
std::unique_ptr< GeneralizedProximityMatrixm_gpm
 GPM reference pointer. More...
 
GPMWeightsAbstractStrategym_weights
 Strategy used to calculate the weight of a gpm. More...
 

Detailed Description

This class defines the GPM Builder class.

Definition at line 54 of file GPMBuilder.h.

Constructor & Destructor Documentation

te::sa::GPMBuilder::GPMBuilder ( GPMConstructorAbstractStrategy constructor,
GPMWeightsAbstractStrategy weights 
)

Default constructor.

Definition at line 37 of file GPMBuilder.cpp.

te::sa::GPMBuilder::~GPMBuilder ( )
virtual

Virtual destructor.

Definition at line 44 of file GPMBuilder.cpp.

References m_constructor.

Member Function Documentation

te::sa::GeneralizedProximityMatrix * te::sa::GPMBuilder::getGPM ( )

Function used to return the generated gpm.

Note
: The caller will be responsible for checking if it received a valid pointer;
: The caller will receive ownership of the returned pointer;
Returns
GeneralizedProximityMatrix A pointer to the matrix generated by the builder.

Definition at line 91 of file GPMBuilder.cpp.

References m_gpm.

Referenced by te::sa::SkaterDialog::loadGPM(), te::sa::SpatialStatisticsDialog::loadGPM(), and te::sa::BayesLocalDialog::loadGPM().

bool te::sa::GPMBuilder::setGPMInfo ( te::da::DataSourcePtr  ds,
const std::string &  dataSetName,
const std::string &  attributeName 
)

Function used to create an empty gpm (using a MEMORY DIRECT graph)

Parameters
dsData source pointer
dataSetNameContainer with data source information
attributeNameAttribute used to define the output graph type
Returns
True if the gmp was correctly generated and false in other case.

Definition at line 49 of file GPMBuilder.cpp.

References ds, m_ds, m_gpm, te::graph::AbstractGraphFactory::make(), and te::graph::Globals::sm_factoryGraphTypeDirectedGraph.

Referenced by te::sa::SkaterDialog::loadGPM(), te::sa::SpatialStatisticsDialog::loadGPM(), and te::sa::BayesLocalDialog::loadGPM().

Member Data Documentation

GPMConstructorAbstractStrategy* te::sa::GPMBuilder::m_constructor
private

Strategy used to construct the gpm.

Definition at line 99 of file GPMBuilder.h.

Referenced by build(), and ~GPMBuilder().

te::da::DataSourcePtr te::sa::GPMBuilder::m_ds
private

Input Data Source.

Definition at line 105 of file GPMBuilder.h.

Referenced by build(), and setGPMInfo().

std::unique_ptr<GeneralizedProximityMatrix> te::sa::GPMBuilder::m_gpm
private

GPM reference pointer.

Definition at line 103 of file GPMBuilder.h.

Referenced by build(), getGPM(), and setGPMInfo().

GPMWeightsAbstractStrategy* te::sa::GPMBuilder::m_weights
private

Strategy used to calculate the weight of a gpm.

Definition at line 101 of file GPMBuilder.h.

Referenced by build().


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