MFEM  v4.2.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Gecko::Graph Class Reference

#include <gecko.hpp>

Collaboration diagram for Gecko::Graph:
[legend]

Public Member Functions

 Graph (uint nodes=0)
 
uint nodes () const
 
uint edges () const
 
Node::Index insert_node (Float length=1)
 
Arc::Index node_begin (Node::Index i) const
 
Arc::Index node_end (Node::Index i) const
 
uint node_degree (Node::Index i) const
 
std::vector< Node::Indexnode_neighbors (Node::Index i) const
 
Arc::Index insert_arc (Node::Index i, Node::Index j, Float w=1, Float b=1)
 
bool remove_arc (Arc::Index a)
 
bool remove_arc (Node::Index i, Node::Index j)
 
bool remove_edge (Node::Index i, Node::Index j)
 
Arc::Index arc_index (Node::Index i, Node::Index j) const
 
Node::Index arc_source (Arc::Index a) const
 
Node::Index arc_target (Arc::Index a) const
 
Float arc_weight (Arc::Index a) const
 
Arc::Index reverse_arc (Arc::Index a) const
 
void order (Functional *functional, uint iterations=1, uint window=2, uint period=2, uint seed=0, Progress *progress=0)
 
const std::vector< Node::Index > & permutation () const
 
Node::Index permutation (uint rank) const
 
uint rank (Node::Index i) const
 
Float cost () const
 
Arc::Index directed () const
 

Protected Member Functions

 Graph (uint nodes, uint level)
 
Float length (Node::Index i, Node::Index j) const
 
Float length (Arc::Index a) const
 
Graphcoarsen ()
 
void refine (const Graph *graph)
 
void relax (bool compatible, uint m=1)
 
void optimize (uint n)
 
void place (bool sort=false)
 
void place (bool sort, uint k, uint n)
 
void vcycle (uint n, uint work=0)
 
void shuffle (uint seed=0)
 
void reweight (uint i)
 
WeightedSum cost (const std::vector< Arc::Index > &subset, Float pos) const
 
bool persistent (Node::Index i) const
 
bool placed (Node::Index i) const
 

Protected Attributes

Functionalfunctional
 
Progressprogress
 
std::vector< Node::Indexperm
 
std::vector< Nodenode
 
std::vector< Node::Indexadj
 
std::vector< Floatweight
 
std::vector< Floatbond
 

Friends

class Subgraph
 
class Drawing
 

Detailed Description

Definition at line 621 of file gecko.hpp.

Constructor & Destructor Documentation

Gecko::Graph::Graph ( uint  nodes = 0)
inline

Definition at line 625 of file gecko.hpp.

Gecko::Graph::Graph ( uint  nodes,
uint  level 
)
inlineprotected

Definition at line 685 of file gecko.hpp.

Member Function Documentation

Arc::Index Graph::arc_index ( Node::Index  i,
Node::Index  j 
) const

Definition at line 736 of file gecko.cpp.

Node::Index Graph::arc_source ( Arc::Index  a) const

Definition at line 748 of file gecko.cpp.

Node::Index Gecko::Graph::arc_target ( Arc::Index  a) const
inline

Definition at line 655 of file gecko.hpp.

Float Gecko::Graph::arc_weight ( Arc::Index  a) const
inline

Definition at line 656 of file gecko.hpp.

Graph * Graph::coarsen ( )
protected

Definition at line 917 of file gecko.cpp.

Float Graph::cost ( ) const

Definition at line 856 of file gecko.cpp.

WeightedSum Graph::cost ( const std::vector< Arc::Index > &  subset,
Float  pos 
) const
protected

Definition at line 840 of file gecko.cpp.

Arc::Index Graph::directed ( ) const

Definition at line 781 of file gecko.cpp.

uint Gecko::Graph::edges ( ) const
inline

Definition at line 629 of file gecko.hpp.

Arc::Index Graph::insert_arc ( Node::Index  i,
Node::Index  j,
Float  w = 1,
Float  b = 1 
)

Definition at line 678 of file gecko.cpp.

Node::Index Graph::insert_node ( Float  length = 1)

Definition at line 656 of file gecko.cpp.

Float Gecko::Graph::length ( Node::Index  i,
Node::Index  j 
) const
inlineprotected

Definition at line 688 of file gecko.hpp.

Float Gecko::Graph::length ( Arc::Index  a) const
inlineprotected

Definition at line 689 of file gecko.hpp.

Arc::Index Gecko::Graph::node_begin ( Node::Index  i) const
inline

Definition at line 635 of file gecko.hpp.

uint Gecko::Graph::node_degree ( Node::Index  i) const
inline

Definition at line 639 of file gecko.hpp.

Arc::Index Gecko::Graph::node_end ( Node::Index  i) const
inline

Definition at line 636 of file gecko.hpp.

std::vector< Node::Index > Graph::node_neighbors ( Node::Index  i) const

Definition at line 666 of file gecko.cpp.

uint Gecko::Graph::nodes ( ) const
inline

Definition at line 628 of file gecko.hpp.

void Graph::optimize ( uint  n)
protected

Definition at line 1119 of file gecko.cpp.

void Graph::order ( Functional functional,
uint  iterations = 1,
uint  window = 2,
uint  period = 2,
uint  seed = 0,
Progress progress = 0 
)

Definition at line 1231 of file gecko.cpp.

const std::vector<Node::Index>& Gecko::Graph::permutation ( ) const
inline

Definition at line 666 of file gecko.hpp.

Node::Index Gecko::Graph::permutation ( uint  rank) const
inline

Definition at line 669 of file gecko.hpp.

bool Gecko::Graph::persistent ( Node::Index  i) const
inlineprotected

Definition at line 727 of file gecko.hpp.

void Graph::place ( bool  sort = false)
protected

Definition at line 1139 of file gecko.cpp.

void Graph::place ( bool  sort,
uint  k,
uint  n 
)
protected

Definition at line 1146 of file gecko.cpp.

bool Gecko::Graph::placed ( Node::Index  i) const
inlineprotected

Definition at line 728 of file gecko.hpp.

uint Gecko::Graph::rank ( Node::Index  i) const
inline

Definition at line 672 of file gecko.hpp.

void Graph::refine ( const Graph graph)
protected

Definition at line 1050 of file gecko.cpp.

void Graph::relax ( bool  compatible,
uint  m = 1 
)
protected

Definition at line 1101 of file gecko.cpp.

bool Graph::remove_arc ( Arc::Index  a)

Definition at line 698 of file gecko.cpp.

bool Graph::remove_arc ( Node::Index  i,
Node::Index  j 
)

Definition at line 717 of file gecko.cpp.

bool Graph::remove_edge ( Node::Index  i,
Node::Index  j 
)

Definition at line 724 of file gecko.cpp.

Arc::Index Graph::reverse_arc ( Arc::Index  a) const

Definition at line 765 of file gecko.cpp.

void Graph::reweight ( uint  i)
protected

Definition at line 1220 of file gecko.cpp.

void Graph::shuffle ( uint  seed = 0)
protected

Definition at line 1206 of file gecko.cpp.

void Graph::vcycle ( uint  n,
uint  work = 0 
)
protected

Definition at line 1168 of file gecko.cpp.

Friends And Related Function Documentation

friend class Drawing
friend

Definition at line 682 of file gecko.hpp.

friend class Subgraph
friend

Definition at line 681 of file gecko.hpp.

Member Data Documentation

std::vector<Node::Index> Gecko::Graph::adj
protected

Definition at line 734 of file gecko.hpp.

std::vector<Float> Gecko::Graph::bond
protected

Definition at line 736 of file gecko.hpp.

Functional* Gecko::Graph::functional
protected

Definition at line 730 of file gecko.hpp.

std::vector<Node> Gecko::Graph::node
protected

Definition at line 733 of file gecko.hpp.

std::vector<Node::Index> Gecko::Graph::perm
protected

Definition at line 732 of file gecko.hpp.

Progress* Gecko::Graph::progress
protected

Definition at line 731 of file gecko.hpp.

std::vector<Float> Gecko::Graph::weight
protected

Definition at line 735 of file gecko.hpp.


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