Construct version 5.4.4
An agent based modeling framework
|
Parent class for Graph. More...
Public Types | |
enum class | edge_types : char { dbool , dint , duint , dfloat , dstring , vbool , vint , vuint , vfloat , vstring , mbool , mint , muint , mfloat , mstring , unknown } |
Set of all edge types a Graph can have. | |
Public Member Functions | |
virtual void | push_deltas (void)=0 |
Virtual function that allows the deltas in a Graph to be pushed without needing to convert the Typeless_Graph into its child type. More... | |
virtual void | get_data_state (std::ostream &out) const =0 |
For each link in the graph, the lambda or function pointer is called on the value of that link. More... | |
Public Attributes | |
const Nodeset *const | source_nodeset |
The nodeset in which each node corresponds to a row in the data structure. | |
const Nodeset *const | target_nodeset |
The nodeset in which each node corresponds to a column in the data structure. | |
const Nodeset *const | slice_nodeset |
The nodeset in which each node corresponds to a slice in the data structure. | |
const std::string | name |
The name of the network. | |
const unsigned int | row_size |
The number of rows in the data structure. Equalivilent to the size of the source nodeset. | |
const unsigned int | col_size |
The number of columns in the data structure. Equalivilent to the size of the target nodeset. | |
const edge_types | edge_type |
The edge's data type. Set by #dynet::get_type_name. | |
const bool | col_dense |
const bool | row_dense |
True if the row representation is dense, false if the representation is sparse. | |
Parent class for Graph.
By having Graph ineheriet from this non-templated class, we're able to hold the pointers for graphs in the same data structure regardless of the templated type of the child Graph class. In addition, this class also holds the data common to all networks such as name, edge type, nodesets, and dimension sizes.
|
pure virtual |
For each link in the graph, the lambda or function pointer is called on the value of that link.
Implemented in Graph< link_type >, Graph< float >, Graph< std::map< unsigned int, float > >, Graph< bool >, Graph< unsigned int >, and Graph< std::vector< bool > >.
|
pure virtual |
Virtual function that allows the deltas in a Graph to be pushed without needing to convert the Typeless_Graph into its child type.
Implemented in Graph< link_type >, Graph< float >, Graph< std::map< unsigned int, float > >, Graph< bool >, Graph< unsigned int >, and Graph< std::vector< bool > >.
const bool Typeless_Graph::col_dense |
True if the column representation is dense, false if the representation is sparse.