An edge in the topology. More...

#include <topology.hh>

Inheritance diagram for concepts::Edge:
concepts::Connector1 concepts::Connector concepts::OutputOperator

Public Member Functions

const Attributeattrib () const
 Returns the attribute of the connector. More...
 
virtual const Edgechild (uint i) const
 
virtual Edgechild (uint i, bool mode=0)
 Returns a child. More...
 
Edgeclone (Vertex &vtx0, Vertex &vtx1) const
 Returns the pointer of a new Edge with the same attribute, the same key but NO children and sibling. More...
 
 Edge (Edge &edg0, Edge &edg1)
 Construct a "parent" edge of the edges edg0 and edg1. More...
 
 Edge (Vertex &vtx0, Vertex &vtx1, const Attribute attrib=Attribute())
 Constructor. More...
 
const Keykey () const
 Returns the key of the connector. More...
 
int operator== (const Connector &cntr) const
 Comparison operator. More...
 
int related (const Connector &conn) const
 Checks if this connector is related to conn. More...
 
void setAttrib (uint attrb)
 
Vertexvertex (uint i) const
 Returns a 0D component: vertex A 1D element consists of 0D elements, the vertices can be queried here. More...
 
virtual ~Edge ()
 

Protected Member Functions

 Edge (Vertex &vtx0, Vertex &vtx1, const Attribute attrib, const Key &key)
 Constructor used by clone() More...
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Protected Attributes

Attribute attrib_
 Attribute. More...
 
Edgechld_
 Pointer to the first child. More...
 
Key key_
 Unique key of the connector. More...
 
Edgelnk_
 Pointer to a sibling. More...
 
bool regular_
 Boolean, if its a regular edge. More...
 
Vertexvtx_ [2]
 Array of the vertices. More...
 

Static Protected Attributes

static uint cnt_
 Counter for the connectors. More...
 

Detailed Description

An edge in the topology.

Implements the abstract methods from the parent classes to query the children and the vertices of the edge.

Examples
meshes.cc.

Definition at line 73 of file topology.hh.

Constructor & Destructor Documentation

◆ Edge() [1/3]

concepts::Edge::Edge ( Vertex vtx0,
Vertex vtx1,
const Attribute  attrib = Attribute() 
)

Constructor.

Parameters
vtx0Starting vertex of this edge
vtx1Ending vertex of this edge
attribAttribute of the edge

◆ Edge() [2/3]

concepts::Edge::Edge ( Edge edg0,
Edge edg1 
)

Construct a "parent" edge of the edges edg0 and edg1.

◆ ~Edge()

virtual concepts::Edge::~Edge ( )
virtual

◆ Edge() [3/3]

concepts::Edge::Edge ( Vertex vtx0,
Vertex vtx1,
const Attribute  attrib,
const Key key 
)
protected

Constructor used by clone()

Member Function Documentation

◆ attrib()

const Attribute& concepts::Connector::attrib ( ) const
inlineinherited

Returns the attribute of the connector.

Definition at line 108 of file connector.hh.

◆ child() [1/2]

virtual const Edge* concepts::Edge::child ( uint  i) const
virtual

Implements concepts::Connector1.

◆ child() [2/2]

virtual Edge* concepts::Edge::child ( uint  i,
bool  mode = 0 
)
virtual

Returns a child.

When creating new children, the starting vertex of the first edge is the child of the starting vertex of this edge, the ending Vertex is new. It is also the starting vertex for the second child. The ending vertex of the second child is the child of the ending Vertex of this edge.

Parameters
iIndex of the child to be returned.
modemode = 1: No children are created
mode = 0: If no child exists, two new children are created (with the same attributes as this one).

Implements concepts::Connector1.

◆ clone()

Edge * concepts::Edge::clone ( Vertex vtx0,
Vertex vtx1 
) const
inline

Returns the pointer of a new Edge with the same attribute, the same key but NO children and sibling.

Definition at line 132 of file topology.hh.

◆ info()

virtual std::ostream& concepts::Edge::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::Connector.

◆ key()

const Key& concepts::Connector::key ( ) const
inlineinherited

Returns the key of the connector.

Definition at line 105 of file connector.hh.

◆ operator==()

int concepts::Connector::operator== ( const Connector cntr) const
inlineinherited

Comparison operator.

Definition at line 102 of file connector.hh.

◆ related()

int concepts::Connector::related ( const Connector conn) const
inherited

Checks if this connector is related to conn.

It is being checked if one of the two is an ancestor of the other.

Parameters
connOther connector
Returns
An integer i.
i=0 if there is no relationship or the connectors are identical
i>0 if conn is an ancestor of this connector
i<0 if conn is a descendant of this connector
|i| gives the number of generations between the connectors

◆ setAttrib()

void concepts::Connector::setAttrib ( uint  attrb)
inlineinherited

Definition at line 111 of file connector.hh.

◆ vertex()

Vertex* concepts::Edge::vertex ( uint  i) const
inlinevirtual

Returns a 0D component: vertex A 1D element consists of 0D elements, the vertices can be queried here.

Parameters
iIndex of the vertex

Implements concepts::Connector1.

Definition at line 103 of file topology.hh.

Member Data Documentation

◆ attrib_

Attribute concepts::Connector::attrib_
protectedinherited

Attribute.

Definition at line 132 of file connector.hh.

◆ chld_

Edge* concepts::Edge::chld_
protected

Pointer to the first child.

The children are stored in a linked list.

Definition at line 120 of file topology.hh.

◆ cnt_

uint concepts::Connector1::cnt_
staticprotectedinherited

Counter for the connectors.

This counter is used to create the unique key of the connector.

Definition at line 211 of file connector.hh.

◆ key_

Key concepts::Connector::key_
protectedinherited

Unique key of the connector.

Definition at line 129 of file connector.hh.

◆ lnk_

Edge* concepts::Edge::lnk_
protected

Pointer to a sibling.

Definition at line 115 of file topology.hh.

◆ regular_

bool concepts::Edge::regular_
protected

Boolean, if its a regular edge.

a regular edge can have children, create children

Definition at line 129 of file topology.hh.

◆ vtx_

Vertex* concepts::Edge::vtx_[2]
protected

Array of the vertices.

Definition at line 123 of file topology.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich