53 #define COLUMN_SIZE 30 58 template <
class data_obj>
77 os <<
"(" << it->second <<
") ";
91 os.setf(std::ios_base::left, std::ios_base::adjustfield);
104 virtual void print(std::ostream& os,
const graph* data =
nullptr)
const 106 auto i_end = this->end();
107 for(
auto i = this->begin(); i != i_end; ++i)
128 THROW_ASSERT(this->find(__k) != this->end(),
"expected a meaningful vertex");
129 return this->find(__k)->second;
131 template <
class Iterator,
class data_type>
132 void resize(Iterator left, Iterator right, data_type val)
134 for(; left != right; left++)
136 this->operator[](*left) = val;
friend std::ostream & operator<<(std::ostream &os, const vertex2obj *s)
Friend definition of the << operator.
virtual ~vertex2obj()=default
Destructor.
virtual void print(std::ostream &os, const graph *data=nullptr) const
Function that prints the class vertex2obj.
Class specification of the graph structures.
Class managing map of the vertexes on a generic object.
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMapUnstable
Base class description of data information associated with each node of a graph.
redefinition of map to manage ordered/unordered structures
const data_obj operator()(const vertex &__k) const
friend std::ostream & operator<<(std::ostream &os, const vertex2obj &s)
Friend definition of the << operator.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
void resize(Iterator left, Iterator right, data_type val)
virtual void print_rowHead(std::ostream &os, const graph *data, typename vertex2obj< data_obj >::const_iterator &it) const
Function that print the name and the operation performed by the vertex.
General class used to describe a graph in PandA.
virtual void print_el(std::ostream &os, const graph *, typename vertex2obj< data_obj >::const_iterator &it) const
Function that print the information associated with a vertex.
vertex2obj()=default
Constructor.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...