SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Specialize explicit arc storage when unordered. More...
#include <TypeTraits.h>
Public Types | |
using | type = ExplicitArcs< ArcTraits > |
Public Types inherited from smtk::graph::ExplicitArcs< ArcTraits > | |
using | Traits = ArcTraits |
using | FromType = typename ArcTraits::FromType |
using | ToType = typename ArcTraits::ToType |
using | Directed = typename ArcTraits::Directed |
using | Ordered = std::false_type |
using | Mutable = typename ArcProperties< ArcTraits >::isMutable |
using | BidirIndex = negation< typename ArcProperties< ArcTraits >::template hasOnlyForwardIndex< ArcTraits > > |
using | UUID = smtk::common::UUID |
using | NoBadIndexing = disjunction< Directed, conjunction< negation< Directed >, BidirIndex > > |
Public Member Functions | |
SelectArcContainer (const ArcTraits &traits) | |
Public Member Functions inherited from smtk::graph::ExplicitArcs< ArcTraits > | |
ExplicitArcs (Traits &&traits) | |
ExplicitArcs (const Traits &traits) | |
template<typename Resource , typename Functor > | |
smtk::common::Visited | visitAllOutgoingNodes (Resource rr, Functor ff) const |
Visit every node which has outgoing arcs of this type. | |
template<typename Resource , typename Functor > | |
smtk::common::Visited | visitAllIncomingNodes (Resource rr, Functor ff) const |
Visit every node which has incoming arcs of this type. | |
template<typename Functor > | |
smtk::common::Visited | outVisitor (const FromType *node, Functor ff) const |
Visit outgoing arcs from a node. | |
template<typename Functor > | |
smtk::common::Visited | inVisitor (const ToType *node, Functor ff) const |
Visit incoming arcs to a node. | |
bool | contains (const FromType *from, const ToType *to) const |
Return true if an arc exists between from and to. | |
std::size_t | outDegree (const FromType *node) const |
Return the number of outgoing arcs from the node. | |
std::size_t | inDegree (const ToType *node) const |
Return the number of incoming arcs to the node. | |
template<bool MM = Mutable::value> | |
std::enable_if<!MM, bool >::type | accepts (const FromType *from, const ToType *to, const FromType *beforeFrom=nullptr, const ToType *beforeTo=nullptr) const |
Check whether an arc from from to to is acceptable. More... | |
template<bool MM = Mutable::value> | |
std::enable_if< MM, bool >::type | accepts (const FromType *from, const ToType *to, const FromType *beforeFrom=nullptr, const ToType *beforeTo=nullptr) const |
bool | connect (const FromType *from, const ToType *to, const FromType *beforeFrom=nullptr, const ToType *beforeTo=nullptr) |
Insert an arc from from to to, optionally ordered by beforeFrom and beforeTo. More... | |
template<bool MM = Mutable::value> | |
std::enable_if<!MM, bool >::type | disconnect (const FromType *from, const ToType *to) |
Remove an arc from from to to, optionally ordered by beforeFrom and beforeTo. More... | |
template<bool MM = Mutable::value> | |
std::enable_if< MM, bool >::type | disconnect (const FromType *from, const ToType *to) |
bool | empty () const |
Return true if there are no arcs stored. | |
std::size_t | size () const |
Return the number of arcs stored. | |
const Traits & | traits () const |
Return the traits object that ExplicitArcs is storing arcs for. | |
Traits & | traits () |
Additional Inherited Members | |
Static Public Attributes inherited from smtk::graph::ExplicitArcs< ArcTraits > | |
static constexpr std::size_t | MaxOutDegree = maxOutDegree<ArcTraits>(unconstrained()) |
static constexpr std::size_t | MaxInDegree = maxInDegree<ArcTraits>(unconstrained()) |
static constexpr std::size_t | MinOutDegree = maxOutDegree<ArcTraits>(unconstrained()) |
static constexpr std::size_t | MinInDegree = maxInDegree<ArcTraits>(unconstrained()) |
Protected Member Functions inherited from smtk::graph::ExplicitArcs< ArcTraits > | |
template<typename U = typename ArcProperties<Traits>::template hasConnect<Traits>> | |
std::enable_if<!U::value, bool >::type | runtimeConnectionCheck (const FromType *from, const ToType *to, const FromType *beforeFrom, const ToType *beforeTo) const |
template<typename U = typename ArcProperties<Traits>::template hasConnect<Traits>> | |
std::enable_if< U::value, bool >::type | runtimeConnectionCheck (const FromType *from, const ToType *to, const FromType *beforeFrom, const ToType *beforeTo) const |
Protected Attributes inherited from smtk::graph::ExplicitArcs< ArcTraits > | |
std::unordered_map< const FromType *, std::unordered_set< const ToType * > > | m_forward |
std::unordered_map< const ToType *, std::unordered_set< const FromType * > > | m_reverse |
Traits | m_traits |
Specialize explicit arc storage when unordered.
Unless ArcTraits provides methods for accessing (and if, editable, manipulating) arcs – the graph resource will explicitly store arcs in a plural-arc container.