UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Private Attributes | List of all members
MinGraphList Class Reference

This data structure stores a collection of graphs minimal to some given order. More...

#include <MinGraphList.h>

Collaboration diagram for MinGraphList:
Collaboration graph
[legend]

Public Member Functions

 MinGraphList (basic_types::Order_sp order, analysis::BackwardResultHandler_sp resHandler=nullptr)
 Generates a new MinGraphList using the given Order for minimization and the given BackwardResultHandler (if given) for storing intermediate results. More...
 
virtual ~MinGraphList ()
 Destroys this MinGraphList.
 
shared_ptr< vector
< Hypergraph_sp > > 
getGraphs ()
 Returns the minimal graphs stores in this MinGraphList as a vector of Hypergraphs. More...
 
bool addGraph (Hypergraph_sp graph, shared_ptr< vector< Hypergraph_sp >> deletedGraphs=nullptr)
 Adds the given graph to this MinGraphList, if there is no graph already in the list which is smaller of equal to the given graph. More...
 
size_t addGraphs (vector< Hypergraph_sp > const &graphs)
 Adds the given collection of graphs to this MinGraphList. More...
 
size_t size () const
 Returns the number of minimal graphs stored in this list. More...
 
bool contains (IDType graphID) const
 Checks whether a graph with the given ID is stored in this list. More...
 

Private Attributes

basic_types::Order_sp order
 Stores the Order used for minimization.
 
shared_ptr< vector
< graphs::Hypergraph_sp > > 
graphs
 Stores the minimal graphs.
 
analysis::BackwardResultHandler_sp resHandler
 Stores the BackwardResultHandler for handling intermediate results.
 
unordered_set< IDTypeidsInList
 Caches all IDs of graphs currently stored in this list.
 

Detailed Description

This data structure stores a collection of graphs minimal to some given order.

A graph is only added to this list if there is no graph in the list which is less or equal to the graph. Additionally, after adding a graph all graphs which are now non-minimal are deleted.

See Also
basic_typed::Order
Author
Jan Stückrath

Constructor & Destructor Documentation

Generates a new MinGraphList using the given Order for minimization and the given BackwardResultHandler (if given) for storing intermediate results.

Parameters
orderthe Order to be used for minimization
resHandlerthe BackwardResultHandler for storing intermediate results (use null if no storing is desired)

Member Function Documentation

bool addGraph ( Hypergraph_sp  graph,
shared_ptr< vector< Hypergraph_sp >>  deletedGraphs = nullptr 
)

Adds the given graph to this MinGraphList, if there is no graph already in the list which is smaller of equal to the given graph.

After that, the list is minimized.

Parameters
graphthe graph to be added
deletedGraphsif not null, all deleted graphs will be added to this vector
Returns
true, iff the graph was added
size_t addGraphs ( vector< Hypergraph_sp > const &  graphs)

Adds the given collection of graphs to this MinGraphList.

Every non-minimal graph in the collection is immediately dropped.

Parameters
graphsthe collection of graphs to be added
Returns
the number of graphs effectively added to this MinGraphList
bool contains ( IDType  graphID) const

Checks whether a graph with the given ID is stored in this list.

Parameters
graphIDthe ID to be checked
Returns
true, iff a graph with the given ID is stored in this list
shared_ptr< vector< Hypergraph_sp > > getGraphs ( )

Returns the minimal graphs stores in this MinGraphList as a vector of Hypergraphs.

Modifying the returned vector will invalidate this MinGraphList.

Returns
the minimal graphs as a vector
size_t size ( ) const

Returns the number of minimal graphs stored in this list.

Returns
the number of minimal grapgs stored in this list

The documentation for this class was generated from the following files: