MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
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

◆ Graph() [1/2]

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

Definition at line 625 of file gecko.hpp.

◆ Graph() [2/2]

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

Definition at line 685 of file gecko.hpp.

Member Function Documentation

◆ arc_index()

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

Definition at line 737 of file gecko.cpp.

◆ arc_source()

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

Definition at line 749 of file gecko.cpp.

◆ arc_target()

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

Definition at line 655 of file gecko.hpp.

◆ arc_weight()

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

Definition at line 656 of file gecko.hpp.

◆ coarsen()

Graph * Graph::coarsen ( )
protected

Definition at line 918 of file gecko.cpp.

◆ cost() [1/2]

Float Graph::cost ( ) const

Definition at line 857 of file gecko.cpp.

◆ cost() [2/2]

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

Definition at line 841 of file gecko.cpp.

◆ directed()

Arc::Index Graph::directed ( ) const

Definition at line 782 of file gecko.cpp.

◆ edges()

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

Definition at line 629 of file gecko.hpp.

◆ insert_arc()

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

Definition at line 679 of file gecko.cpp.

◆ insert_node()

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

Definition at line 657 of file gecko.cpp.

◆ length() [1/2]

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

Definition at line 689 of file gecko.hpp.

◆ length() [2/2]

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

Definition at line 688 of file gecko.hpp.

◆ node_begin()

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

Definition at line 635 of file gecko.hpp.

◆ node_degree()

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

Definition at line 639 of file gecko.hpp.

◆ node_end()

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

Definition at line 636 of file gecko.hpp.

◆ node_neighbors()

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

Definition at line 667 of file gecko.cpp.

◆ nodes()

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

Definition at line 628 of file gecko.hpp.

◆ optimize()

void Graph::optimize ( uint n)
protected

Definition at line 1120 of file gecko.cpp.

◆ order()

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

Definition at line 1232 of file gecko.cpp.

◆ permutation() [1/2]

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

Definition at line 666 of file gecko.hpp.

◆ permutation() [2/2]

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

Definition at line 669 of file gecko.hpp.

◆ persistent()

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

Definition at line 727 of file gecko.hpp.

◆ place() [1/2]

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

Definition at line 1147 of file gecko.cpp.

◆ place() [2/2]

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

Definition at line 1140 of file gecko.cpp.

◆ placed()

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

Definition at line 728 of file gecko.hpp.

◆ rank()

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

Definition at line 672 of file gecko.hpp.

◆ refine()

void Graph::refine ( const Graph * graph)
protected

Definition at line 1051 of file gecko.cpp.

◆ relax()

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

Definition at line 1102 of file gecko.cpp.

◆ remove_arc() [1/2]

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

Definition at line 699 of file gecko.cpp.

◆ remove_arc() [2/2]

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

Definition at line 718 of file gecko.cpp.

◆ remove_edge()

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

Definition at line 725 of file gecko.cpp.

◆ reverse_arc()

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

Definition at line 766 of file gecko.cpp.

◆ reweight()

void Graph::reweight ( uint i)
protected

Definition at line 1221 of file gecko.cpp.

◆ shuffle()

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

Definition at line 1207 of file gecko.cpp.

◆ vcycle()

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

Definition at line 1169 of file gecko.cpp.

Friends And Related Symbol Documentation

◆ Drawing

friend class Drawing
friend

Definition at line 682 of file gecko.hpp.

◆ Subgraph

friend class Subgraph
friend

Definition at line 681 of file gecko.hpp.

Member Data Documentation

◆ adj

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

Definition at line 734 of file gecko.hpp.

◆ bond

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

Definition at line 736 of file gecko.hpp.

◆ functional

Functional* Gecko::Graph::functional
protected

Definition at line 730 of file gecko.hpp.

◆ node

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

Definition at line 733 of file gecko.hpp.

◆ perm

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

Definition at line 732 of file gecko.hpp.

◆ progress

Progress* Gecko::Graph::progress
protected

Definition at line 731 of file gecko.hpp.

◆ weight

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: