27 #include "../../dataaccess/datasource/DataSource.h" 28 #include "../../graph/core/AbstractGraphFactory.h" 29 #include "../../graph/Globals.h" 39 : m_constructor(constructor), m_weights(weights)
57 m_gpm->setDataSetName(dataSetName);
58 m_gpm->setAttributeName(attributeName);
64 const std::string connInfo(
"memory:");
67 std::map<std::string, std::string> graphInfo;
68 graphInfo[
"GRAPH_DATA_SOURCE_TYPE"] =
"MEM";
69 graphInfo[
"GRAPH_NAME"] = dataSetName +
"_graph";
70 graphInfo[
"GRAPH_DESCRIPTION"] =
"Generated by GPM Builder.";
93 return m_gpm.release();
GeneralizedProximityMatrix * getGPM()
Function used to return the generated gpm.
This class defines a an Abstract class for a GPM constructor.
boost::shared_ptr< DataSource > DataSourcePtr
void construct(te::da::DataSource *ds, GeneralizedProximityMatrix *gpm)
This class defines a Generalized Proximity Matrix.
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)
virtual void calculate(GeneralizedProximityMatrix *gpm)=0
static te::dt::Date ds(2010, 01, 01)
virtual ~GPMBuilder()
Virtual destructor.
GPMBuilder(GPMConstructorAbstractStrategy *constructor, GPMWeightsAbstractStrategy *weights)
Default constructor.
GPMConstructorAbstractStrategy * m_constructor
Strategy used to construct the gpm.
GPMWeightsAbstractStrategy * m_weights
Strategy used to calculate the weight of a gpm.
This class defines a an Abstract class for a GPM constructor.
static const std::string sm_factoryGraphTypeDirectedGraph
Directed Graph Factory Name.
This class defines a an Abstract class to calculates a weight for a GPM.
This class defines the GPM Builder class.
std::unique_ptr< GeneralizedProximityMatrix > m_gpm
GPM reference pointer.
This class defines a an Abstract class to calculates a weight for a GPM.
te::da::DataSourcePtr m_ds
Input Data Source.
static AbstractGraph * make()
It creates and returns an empty graph with default graph type.