8#ifndef PYEXPORTGRAPH_H_INCLUDED
9#define PYEXPORTGRAPH_H_INCLUDED
13#include "FMTGraph.hpp"
14#include "boost/python.hpp"
20 namespace bp = boost::python;
21 bp::object GraphModule(bp::handle<>(bp::borrowed(PyImport_AddModule(
"FMT.Graph"))));
22 bp::scope().attr(
"Graph") = GraphModule;
23 bp::scope GraphModule_scope = GraphModule;
24 bp::scope().attr(
"__doc__") =
".. module:: Graph\n"
26 " :platform: Unix, Windows\n"
27 " :synopsis: Module used to generate graph.\n"
30 bp::class_<Graph::FMTGraphStats>(
"FMTgraphstats",
"@DocString(FMTGraphStats)")
31 .def(
"__str__", &Graph::FMTGraphStats::operator std::string,
32 "@DocString(FMTGraphStats::operator std::string)")
34 "@DocString(FMTGraphStats::cols)")
36 "@DocString(FMTGraphStats::rows)")
38 "@DocString(FMTGraphStats::vertices)")
40 "@DocString(FMTGraphStats::edges)")
42 "@DocString(FMTGraphStats::transfer_rows)")
44 "@DocString(FMTGraphStats::output_rows)")
46 "@DocString(FMTGraphStats::output_cols)");
48 bp::class_<Graph::FMTPredictor>(
"FMTpredictor",
"@DocString(FMTPredictor)")
50 "@DocString(FMTPredictor::getpredictors)")
52 "@DocString(FMTPredictor::getpredictornames)");
54 definePyList<Graph::FMTPredictor>();
55 definePyDict<int, int>();
56 definePyList<std::vector<Graph::FMTPredictor>>();
57 bp::enum_<Graph::FMTgraphbuild>(
"FMTsolverinterface")
58 .value(
"schedulebuild", Graph::FMTgraphbuild::schedulebuild)
59 .value(
"fullbuild", Graph::FMTgraphbuild::fullbuild)
60 .value(
"nobuild", Graph::FMTgraphbuild::nobuild);
65 bp::class_<Graph::FMTLineGraph>(
"FMTlinegraph",
"@DocString(FMTGraph)")
int rows
Number of rows in the matrix of FMTLpSolver.
Definition: FMTGraphStats.h:54
int output_cols
Number of output cols in the FMTLpSolver.
Definition: FMTGraphStats.h:69
int transfer_rows
Number of area transfer rows in the FMTLpSolver.
Definition: FMTGraphStats.h:63
int cols
Number of columns in the matrix of FMTLpSolver.
Definition: FMTGraphStats.h:51
int edges
Number of edges in the FMTGraph.
Definition: FMTGraphStats.h:60
int vertices
Number of vertices in the FMTGraph.
Definition: FMTGraphStats.h:57
int output_rows
Number of output rows in the FMTLpSolver.
Definition: FMTGraphStats.h:66
std::vector< int > getPeriodActionIds(const int &period, bool p_ordered=true) const
Return the action ids of every action done in a period, in order.
std::vector< double > getPredictors() const
Return the predictor values.
std::vector< std::string > getPredictorNames(const std::vector< std::string > &yieldnames) const
Return the names of the predictors.
Definition: PYdefinitions.h:14
void exportGraph()
Definition: PYexportGraph.h:18