4 #ifndef DUNE_AMG_DEPENDENCY_HH
5 #define DUNE_AMG_DEPENDENCY_HH
13 #include <dune/common/propertymap.hh>
14 #include <dune/common/unused.hh>
47 std::bitset<SIZE> flags_;
53 std::bitset<SIZE>::reference
operator[](std::size_t v);
133 std::bitset<SIZE> flags_;
140 std::bitset<SIZE>::reference
operator[](std::size_t v);
216 template<
typename G, std::
size_t i>
218 :
public RAPropertyMapHelper<typename std::bitset<VertexProperties::SIZE>::reference,
219 PropertyGraphVertexPropertyMap<G,i> >
238 typedef std::bitset<VertexProperties::SIZE>
BitSet;
253 typedef typename G::VertexDescriptor
Vertex;
277 return graph_->getVertexProperties(vertex)[
index];
285 template<
typename G,
typename EP,
typename VM,
typename EM>
291 template<
typename G,
typename EP,
typename VM,
typename EM>
292 typename PropertyMapTypeSelector<Amg::VertexVisitedTag,Amg::PropertiesGraph<G,Amg::VertexProperties,EP,VM,EM> >::Type
295 DUNE_UNUSED_PARAMETER(tag);
303 return os << props.flags_;
310 inline std::bitset<EdgeProperties::SIZE>::reference
356 return flags_.test(
DEPEND);
381 return ((flags_) & std::bitset<SIZE>((1<<
INFLUENCE)|(1<<
DEPEND))).to_ulong();
387 return os << props.flags_;
395 inline std::bitset<VertexProperties::SIZE>::reference
443 return flags_.test(
FRONT);
458 return flags_.test(
BORDER);
friend std::ostream & operator<<(std::ostream &os, const VertexProperties &props)
Definition: dependency.hh:385
Definition: dependency.hh:129
void setExcludedBorder()
Marks the vertex as excluded from the aggregation.
Definition: dependency.hh:451
G Graph
The type of the graph with internal properties.
Definition: dependency.hh:233
EdgeProperties()
Constructor.
Definition: dependency.hh:306
std::bitset< SIZE >::reference operator[](std::size_t v)
Access the bits directly.
Definition: dependency.hh:396
void reset()
Reset all flags.
Definition: dependency.hh:321
bool isTwoWay() const
Checks wether the edge is two way. I.e. both the influence flag and the depends flag are that...
Definition: dependency.hh:372
std::ostream & operator<<(std::ostream &os, const AggregationCriterion< T > &criterion)
Definition: aggregates.hh:110
bool visited() const
Checks wether the node is marked as visited.
Definition: dependency.hh:426
void setFront()
Marks the node as belonging to the current clusters front.
Definition: dependency.hh:436
ReadWritePropertyMapTag Category
Definition: dependency.hh:223
Attaches properties to the edges and vertices of a graph.
Definition: graph.hh:976
Definition: dependency.hh:43
void setDepends()
Marks the edge as one of which the end point depends on the starting point.
Definition: dependency.hh:339
bool isolated() const
Checks wether the node is isolated.
Definition: dependency.hh:411
friend std::ostream & operator<<(std::ostream &os, const EdgeProperties &props)
Definition: dependency.hh:301
Reference operator[](const Vertex &vertex) const
Get the properties associated to a vertex.
Definition: dependency.hh:275
void resetIsolated()
Resets the isolated flag.
Definition: dependency.hh:416
Definition: dependency.hh:129
Definition: dependency.hh:129
void resetInfluences()
Resets the influence flag.
Definition: dependency.hh:359
void reset()
Reset all flags.
Definition: dependency.hh:466
void resetExcludedBorder()
Marks the vertex as included in the aggregation.
Definition: dependency.hh:461
bool influences() const
Checks wether the start vertex is influenced by the end vertex.
Definition: dependency.hh:333
bool front() const
Checks wether the node is marked as a front node.
Definition: dependency.hh:441
PropertyGraphVertexPropertyMap(G &g)
Constructor.
Definition: dependency.hh:259
Class representing a node in the matrix graph.
Definition: dependency.hh:126
the index to access in the bitset.
Definition: dependency.hh:227
Definition: dependency.hh:43
bool isOneWay() const
Checks wether the edge is one way. I.e. either the influence or the depends flag but is set...
Definition: dependency.hh:365
Definition: dependency.hh:43
Provides classes for building the matrix graph.
Class representing the properties of an ede in the matrix graph.
Definition: dependency.hh:38
void setInfluences()
Marks the edge as one of which the start vertex by the end vertex.
Definition: dependency.hh:326
VertexProperties()
Constructor.
Definition: dependency.hh:390
std::bitset< SIZE >::reference operator[](std::size_t v)
Access the bits directly.
Definition: dependency.hh:311
PropertyGraphVertexPropertyMap()
Default constructor.
Definition: dependency.hh:266
void setVisited()
Mark the node as already visited.
Definition: dependency.hh:421
void setIsolated()
Marks that node as being isolated.
Definition: dependency.hh:406
void resetVisited()
Resets the visited flag.
Definition: dependency.hh:431
Definition: dependency.hh:129
Provides classes for handling internal properties in a graph.
bool isStrong() const
Checks wether the edge is strong. I.e. the influence or depends flag is set.
Definition: dependency.hh:378
void resetDepends()
Resets the depends flag.
Definition: dependency.hh:346
Definition: dependency.hh:129
void resetFront()
Resets the front node flag.
Definition: dependency.hh:446
Amg::PropertyGraphVertexPropertyMap< Amg::PropertiesGraph< G, Amg::VertexProperties, EP, VM, EM >, Amg::VertexProperties::VISITED > Type
Definition: dependency.hh:288
G::VertexDescriptor Vertex
The vertex descriptor.
Definition: dependency.hh:253
Tag idnetifying the visited property of a vertex.
Definition: properties.hh:26
Definition: dependency.hh:217
bool depends() const
Checks wether the vertex the edge points to depends on the vertex the edge starts.
Definition: dependency.hh:353
std::bitset< VertexProperties::SIZE > BitSet
The type of the bitset.
Definition: dependency.hh:238
void printFlags() const
Prints the attributes of the edge for debugging.
bool ValueType
The value type.
Definition: dependency.hh:248
bool excludedBorder() const
Tests whether the vertex is excluded from the aggregation.
Definition: dependency.hh:456
BitSet::reference Reference
The reference type.
Definition: dependency.hh:243