Go to the documentation of this file.
3 #ifndef DUNE_AMG_DEPENDENCY_HH
4 #define DUNE_AMG_DEPENDENCY_HH
12 #include <dune/common/propertymap.hh>
13 #include <dune/common/unused.hh>
46 std::bitset<SIZE> flags_;
52 std::bitset<SIZE>::reference
operator[](std::size_t v);
132 std::bitset<SIZE> flags_;
139 std::bitset<SIZE>::reference
operator[](std::size_t v);
215 template<
typename G, std::
size_t i>
217 :
public RAPropertyMapHelper<typename std::bitset<VertexProperties::SIZE>::reference,
218 PropertyGraphVertexPropertyMap<G,i> >
237 typedef std::bitset<VertexProperties::SIZE>
BitSet;
252 typedef typename G::VertexDescriptor
Vertex;
276 return graph_->getVertexProperties(vertex)[
index];
284 template<
typename G,
typename EP,
typename VM,
typename EM>
290 template<
typename G,
typename EP,
typename VM,
typename EM>
291 typename PropertyMapTypeSelector<Amg::VertexVisitedTag,Amg::PropertiesGraph<G,Amg::VertexProperties,EP,VM,EM> >::Type
294 DUNE_UNUSED_PARAMETER(tag);
302 return os << props.flags_;
309 inline std::bitset<EdgeProperties::SIZE>::reference
355 return flags_.test(
DEPEND);
380 return ((flags_) & std::bitset<SIZE>((1<<
INFLUENCE)|(1<<
DEPEND))).to_ulong();
386 return os << props.flags_;
394 inline std::bitset<VertexProperties::SIZE>::reference
442 return flags_.test(
FRONT);
457 return flags_.test(
BORDER);
void reset()
Reset all flags.
Definition: dependency.hh:465
@ VISITED
Definition: dependency.hh:128
@ SIZE
Definition: dependency.hh:42
void setFront()
Marks the node as belonging to the current clusters front.
Definition: dependency.hh:435
void resetFront()
Resets the front node flag.
Definition: dependency.hh:445
bool isStrong() const
Checks wether the edge is strong. I.e. the influence or depends flag is set.
Definition: dependency.hh:377
bool visited() const
Checks wether the node is marked as visited.
Definition: dependency.hh:425
ReadWritePropertyMapTag Category
Definition: dependency.hh:222
void resetExcludedBorder()
Marks the vertex as included in the aggregation.
Definition: dependency.hh:460
bool isolated() const
Checks wether the node is isolated.
Definition: dependency.hh:410
BitSet::reference Reference
The reference type.
Definition: dependency.hh:242
void resetInfluences()
Resets the influence flag.
Definition: dependency.hh:358
Reference operator[](const Vertex &vertex) const
Get the properties associated to a vertex.
Definition: dependency.hh:274
PropertyGraphVertexPropertyMap()
Default constructor.
Definition: dependency.hh:265
void setInfluences()
Marks the edge as one of which the start vertex by the end vertex.
Definition: dependency.hh:325
@ INFLUENCE
Definition: dependency.hh:42
bool depends() const
Checks wether the vertex the edge points to depends on the vertex the edge starts.
Definition: dependency.hh:352
@ SIZE
Definition: dependency.hh:128
void printFlags() const
Prints the attributes of the edge for debugging.
Attaches properties to the edges and vertices of a graph.
Definition: graph.hh:975
bool excludedBorder() const
Tests whether the vertex is excluded from the aggregation.
Definition: dependency.hh:455
friend std::ostream & operator<<(std::ostream &os, const VertexProperties &props)
Definition: dependency.hh:384
std::bitset< SIZE >::reference operator[](std::size_t v)
Access the bits directly.
Definition: dependency.hh:395
@ DEPEND
Definition: dependency.hh:42
G Graph
The type of the graph with internal properties.
Definition: dependency.hh:232
void setDepends()
Marks the edge as one of which the end point depends on the starting point.
Definition: dependency.hh:338
@ BORDER
Definition: dependency.hh:128
@ ISOLATED
Definition: dependency.hh:128
Class representing the properties of an ede in the matrix graph.
Definition: dependency.hh:37
bool influences() const
Checks wether the start vertex is influenced by the end vertex.
Definition: dependency.hh:332
@ FRONT
Definition: dependency.hh:128
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:371
Tag idnetifying the visited property of a vertex.
Definition: properties.hh:26
Provides classes for handling internal properties in a graph.
PropertyMapTypeSelector< Amg::VertexVisitedTag, Amg::PropertiesGraph< G, Amg::VertexProperties, EP, VM, EM > >::Type get(const Amg::VertexVisitedTag &tag, Amg::PropertiesGraph< G, Amg::VertexProperties, EP, VM, EM > &graph)
Definition: dependency.hh:292
void setVisited()
Mark the node as already visited.
Definition: dependency.hh:420
Provides classes for building the matrix graph.
bool ValueType
The value type.
Definition: dependency.hh:247
void resetDepends()
Resets the depends flag.
Definition: dependency.hh:345
bool front() const
Checks wether the node is marked as a front node.
Definition: dependency.hh:440
@ index
the index to access in the bitset.
Definition: dependency.hh:226
G::VertexDescriptor Vertex
The vertex descriptor.
Definition: dependency.hh:252
EdgeProperties()
Constructor.
Definition: dependency.hh:305
Definition: allocator.hh:7
friend std::ostream & operator<<(std::ostream &os, const EdgeProperties &props)
Definition: dependency.hh:300
void setIsolated()
Marks that node as being isolated.
Definition: dependency.hh:405
Definition: dependency.hh:216
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:364
PropertyGraphVertexPropertyMap(G &g)
Constructor.
Definition: dependency.hh:258
std::bitset< VertexProperties::SIZE > BitSet
The type of the bitset.
Definition: dependency.hh:237
std::bitset< SIZE >::reference operator[](std::size_t v)
Access the bits directly.
Definition: dependency.hh:310
std::ostream & operator<<(std::ostream &os, const AggregationCriterion< T > &criterion)
Definition: aggregates.hh:111
void resetVisited()
Resets the visited flag.
Definition: dependency.hh:430
Amg::PropertyGraphVertexPropertyMap< Amg::PropertiesGraph< G, Amg::VertexProperties, EP, VM, EM >, Amg::VertexProperties::VISITED > Type
Definition: dependency.hh:287
VertexProperties()
Constructor.
Definition: dependency.hh:389
void reset()
Reset all flags.
Definition: dependency.hh:320
Class representing a node in the matrix graph.
Definition: dependency.hh:125
void resetIsolated()
Resets the isolated flag.
Definition: dependency.hh:415
void setExcludedBorder()
Marks the vertex as excluded from the aggregation.
Definition: dependency.hh:450