#include <ogdf/hypergraph/Hypergraph.h>
Inheritance diagram for ogdf::Hypergraph:Public Member Functions | |
| Hypergraph () | |
| Constructs an empty hypergraph. | |
| Hypergraph (const Hypergraph &H) | |
Constructs a hypergraph that is a copy of H. | |
| ~Hypergraph () | |
| Destructor. | |
| template<class LIST > | |
| void | allHyperedges (LIST &hyperedgeList) const |
| Returns a list with all hyperedges of the hypergraph. | |
| template<class LIST > | |
| void | allHypernodes (LIST &hypernodeList) const |
| Returns a list with all hypernodes of the hypergraph. | |
| void | clear () |
| Removes all hypernodes and all hyperedges from the hypergraph. | |
| bool | consistency () const |
| Checks the consistency of the data structure. | |
| void | delHyperedge (hyperedge e) |
Removes hyperedge e from the hypergraph. | |
| void | delHypernode (hypernode v) |
Removes hypernode v and all incident hyperedges from the hypergraph. | |
| bool | empty () const |
| Returns true iff the hypergraph is empty (ie. contains no hypernodes). | |
| hyperedge | firstHyperedge () const |
| Returns the first hyperedge in the list of all hyperedges. | |
| hypernode | firstHypernode () const |
| Returns the first hypernode in the list of all hypernodes. | |
| HypergraphRegistry< HyperedgeElement > & | hyperedgeRegistry () |
| Returns a reference to the registry of hyperedge arrays associated with this hypergraph. | |
| const HypergraphRegistry< HyperedgeElement > & | hyperedgeRegistry () const |
| Returns a const reference to the registry of hyperedge arrays associated with this hypergraph. | |
| const internal::GraphList< HyperedgeElement > & | hyperedges () const |
| Returns the list of all hyperedges. | |
| HypergraphRegistry< HypernodeElement > & | hypernodeRegistry () |
| Returns a reference to the registry of hypernode arrays associated with this hypergraph. | |
| const HypergraphRegistry< HypernodeElement > & | hypernodeRegistry () const |
| Returns a const reference to the registry of hypernode arrays associated with this hypergraph. | |
| const internal::GraphList< HypernodeElement > & | hypernodes () const |
| Returns the list of all hypernodes. | |
| hyperedge | lastHyperEdge () const |
| Returns the last hyperedge in the list of all hyperedges. | |
| hypernode | lastHypernode () const |
| Returns the last hypernode in the list of all hypernodes. | |
| void | loadPlaHypergraph (const char *fileName) |
| Reads hypergraph in pla format from the file. | |
| int | maxHyperedgeIndex () const |
| Returns the largest used hyperedge index. | |
| int | maxHypernodeIndex () const |
| Returns the largest used hypernode index. | |
| hyperedge | newHyperedge (int pIndex, List< hypernode > &hypernodes) |
Creates a new hyperedge between hypernodes and returns it. | |
| hyperedge | newHyperedge (List< hypernode > &hypernodes) |
Creates a new hyperedge btween hypernodes and returns it. | |
| hypernode | newHypernode () |
| Creates a new hypernode and returns it. | |
| hypernode | newHypernode (HypernodeElement::Type pType) |
Creates a new hypernode with given pType and returns it. | |
| hypernode | newHypernode (int pIndex) |
Creates a new hypernode with given pIndex and returns it. | |
| hypernode | newHypernode (int pIndex, HypernodeElement::Type pType) |
Creates a new hypernode with given pIndex and pType and returns it. | |
| int | numberOfHyperedges () const |
| Returns the number of hyperedges in the hypergraph. | |
| int | numberOfHypernodes () const |
| Returns the number of hypernodes in the hypergraph. | |
| operator const HypergraphRegistry< HyperedgeElement > & () const | |
| operator const HypergraphRegistry< HypernodeElement > & () const | |
| Hypergraph & | operator= (const Hypergraph &H) |
| hyperedge | randomHyperedge () const |
| Returns a randomly chosen hyperedge. | |
| hypernode | randomHypernode () const |
| Returns a randomly chosen hypergraph. | |
| void | readBenchHypergraph (const char *filename) |
| Reads hypergraph in bench format from the file. | |
| void | readBenchHypergraph (std::istream &is) |
| Reads hypergraph in bench format from the input stream. | |
| void | readPlaHypergraph (std::istream &is) |
| Reads hypergraph in pla format from the input stream. | |
Public Member Functions inherited from ogdf::Observable< HypergraphObserver, Hypergraph > | |
| Observable ()=default | |
| Observable (const Observable ©)=delete | |
| If you want to copy a subclass of Observable, call the default Observable() constructor. | |
| Observable (Observable &&move)=delete | |
| If you want to move a subclass of Observable, call the default Observable() constructor. | |
| virtual | ~Observable () |
| Note that all Observers must already be removed once the destructor of this base class is invoked (e.g. | |
| Observable & | operator= (const Observable ©)=delete |
| Observable & | operator= (Observable &&move)=delete |
Public Attributes | |
| OGDF_MALLOC_NEW_DELETE | |
Private Member Functions | |
| HypernodeElement::Type | gateType (string gate) |
| void | initArrays () |
| int | nextEntry (char *buffer, int from, string stop) |
Private Attributes | |
| int | m_hyperedgeIdCount |
| The Index that will be assigned to the next created hyperedge. | |
| internal::GraphList< HyperedgeElement > | m_hyperedges |
| The list of all hyperedges. | |
| int | m_hypernodeIdCount |
| The Index that will be assigned to the next created hypernode. | |
| internal::GraphList< HypernodeElement > | m_hypernodes |
| The list of all hypernodes. | |
| int | m_nHyperedges |
| The number of hyperedges in the hypergraph. | |
| int | m_nHypernodes |
| The number of hypernodes in the hypergraph. | |
| HypergraphRegistry< HyperedgeElement > | m_regHyperedgeArrays |
| The registered hyperedge arrays. | |
| HypergraphRegistry< HypernodeElement > | m_regHypernodeArrays |
| The registered hypernode arrays. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, ogdf::Hypergraph &H) |
| std::istream & | operator>> (std::istream &is, ogdf::Hypergraph &H) |
Additional Inherited Members | |
Protected Member Functions inherited from ogdf::Observable< HypergraphObserver, Hypergraph > | |
| void | clearObservers () |
| const ListPure< HypergraphObserver * > & | getObservers () const |
| ListPure< HypergraphObserver * >::iterator | registerObserver (HypergraphObserver *obs) const |
| Registers an observer. | |
| void | unregisterObserver (typename ListPure< HypergraphObserver * >::iterator it) const |
| Unregisters an observer. | |
Definition at line 413 of file Hypergraph.h.
| ogdf::Hypergraph::Hypergraph | ( | ) |
Constructs an empty hypergraph.
| ogdf::Hypergraph::Hypergraph | ( | const Hypergraph & | H | ) |
Constructs a hypergraph that is a copy of H.
| ogdf::Hypergraph::~Hypergraph | ( | ) |
Destructor.
|
inline |
Returns a list with all hyperedges of the hypergraph.
Definition at line 540 of file Hypergraph.h.
|
inline |
Returns a list with all hypernodes of the hypergraph.
Definition at line 531 of file Hypergraph.h.
| void ogdf::Hypergraph::clear | ( | ) |
Removes all hypernodes and all hyperedges from the hypergraph.
| bool ogdf::Hypergraph::consistency | ( | ) | const |
Checks the consistency of the data structure.
| void ogdf::Hypergraph::delHyperedge | ( | hyperedge | e | ) |
Removes hyperedge e from the hypergraph.
| e | is the hyperegde that will be deleted. |
| void ogdf::Hypergraph::delHypernode | ( | hypernode | v | ) |
Removes hypernode v and all incident hyperedges from the hypergraph.
| v | is the hypernode that will be deleted. |
|
inline |
Returns true iff the hypergraph is empty (ie. contains no hypernodes).
Definition at line 449 of file Hypergraph.h.
|
inline |
Returns the first hyperedge in the list of all hyperedges.
Definition at line 476 of file Hypergraph.h.
|
inline |
Returns the first hypernode in the list of all hypernodes.
Definition at line 470 of file Hypergraph.h.
|
private |
|
inline |
Returns a reference to the registry of hyperedge arrays associated with this hypergraph.
Definition at line 573 of file Hypergraph.h.
|
inline |
Returns a const reference to the registry of hyperedge arrays associated with this hypergraph.
Definition at line 576 of file Hypergraph.h.
|
inline |
Returns the list of all hyperedges.
Definition at line 455 of file Hypergraph.h.
|
inline |
Returns a reference to the registry of hypernode arrays associated with this hypergraph.
Definition at line 563 of file Hypergraph.h.
|
inline |
Returns a const reference to the registry of hypernode arrays associated with this hypergraph.
Definition at line 566 of file Hypergraph.h.
|
inline |
Returns the list of all hypernodes.
Definition at line 452 of file Hypergraph.h.
|
private |
|
inline |
Returns the last hyperedge in the list of all hyperedges.
Definition at line 479 of file Hypergraph.h.
|
inline |
Returns the last hypernode in the list of all hypernodes.
Definition at line 473 of file Hypergraph.h.
| void ogdf::Hypergraph::loadPlaHypergraph | ( | const char * | fileName | ) |
Reads hypergraph in pla format from the file.
|
inline |
Returns the largest used hyperedge index.
Definition at line 467 of file Hypergraph.h.
|
inline |
Returns the largest used hypernode index.
Definition at line 464 of file Hypergraph.h.
Creates a new hyperedge between hypernodes and returns it.
| pIndex | is the unique index of the newly created hyperedge. |
| hypernodes | are the hypernodes of the newly created hyperedge. |
Creates a new hyperedge btween hypernodes and returns it.
| hypernodes | are the hypernodes of the newly created hyperedge. |
| hypernode ogdf::Hypergraph::newHypernode | ( | ) |
Creates a new hypernode and returns it.
| hypernode ogdf::Hypergraph::newHypernode | ( | HypernodeElement::Type | pType | ) |
Creates a new hypernode with given pType and returns it.
| hypernode ogdf::Hypergraph::newHypernode | ( | int | pIndex | ) |
Creates a new hypernode with given pIndex and returns it.
| hypernode ogdf::Hypergraph::newHypernode | ( | int | pIndex, |
| HypernodeElement::Type | pType | ||
| ) |
Creates a new hypernode with given pIndex and pType and returns it.
|
private |
|
inline |
Returns the number of hyperedges in the hypergraph.
Definition at line 461 of file Hypergraph.h.
|
inline |
Returns the number of hypernodes in the hypergraph.
Definition at line 458 of file Hypergraph.h.
|
inline |
Definition at line 580 of file Hypergraph.h.
|
inline |
Definition at line 570 of file Hypergraph.h.
| Hypergraph & ogdf::Hypergraph::operator= | ( | const Hypergraph & | H | ) |
| hyperedge ogdf::Hypergraph::randomHyperedge | ( | ) | const |
Returns a randomly chosen hyperedge.
| hypernode ogdf::Hypergraph::randomHypernode | ( | ) | const |
Returns a randomly chosen hypergraph.
| void ogdf::Hypergraph::readBenchHypergraph | ( | const char * | filename | ) |
Reads hypergraph in bench format from the file.
| void ogdf::Hypergraph::readBenchHypergraph | ( | std::istream & | is | ) |
Reads hypergraph in bench format from the input stream.
| void ogdf::Hypergraph::readPlaHypergraph | ( | std::istream & | is | ) |
Reads hypergraph in pla format from the input stream.
|
friend |
|
friend |
|
private |
The Index that will be assigned to the next created hyperedge.
Definition at line 436 of file Hypergraph.h.
|
private |
The list of all hyperedges.
Definition at line 424 of file Hypergraph.h.
|
private |
The Index that will be assigned to the next created hypernode.
Definition at line 433 of file Hypergraph.h.
|
private |
The list of all hypernodes.
Definition at line 421 of file Hypergraph.h.
|
private |
The number of hyperedges in the hypergraph.
Definition at line 430 of file Hypergraph.h.
|
private |
The number of hypernodes in the hypergraph.
Definition at line 427 of file Hypergraph.h.
|
private |
The registered hyperedge arrays.
Definition at line 418 of file Hypergraph.h.
|
private |
The registered hypernode arrays.
Definition at line 415 of file Hypergraph.h.
| ogdf::Hypergraph::OGDF_MALLOC_NEW_DELETE |
Definition at line 588 of file Hypergraph.h.