ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
cuthill_mckee.hpp File Reference

Implementation of several flavors of the Cuthill-McKee algorithm. Experimental. More...

#include <iostream>
#include <iterator>
#include <fstream>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <deque>
#include <cmath>
#include "viennacl/forwards.h"

Go to the source code of this file.

Classes

struct  viennacl::cuthill_mckee_tag
 A tag class for selecting the Cuthill-McKee algorithm for reducing the bandwidth of a sparse matrix. More...
 
class  viennacl::advanced_cuthill_mckee_tag
 Tag for the advanced Cuthill-McKee algorithm (i.e. running the 'standard' Cuthill-McKee algorithm for a couple of different seeds). More...
 

Namespaces

 viennacl
 Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
 
 viennacl::detail
 Holds implementation details for functionality in the main viennacl-namespace. Not intended for direct use by library users.
 

Functions

template<typename IndexT , typename ValueT >
IndexT viennacl::detail::calc_reordered_bw (std::vector< std::map< IndexT, ValueT > > const &matrix, std::vector< bool > &dof_assigned_to_node, std::vector< IndexT > const &permutation)
 
template<typename IndexT >
bool viennacl::detail::comb_inc (std::vector< IndexT > &comb, vcl_size_t n)
 
template<typename MatrixT , typename IndexT >
void viennacl::detail::generate_layering (MatrixT const &matrix, std::vector< std::vector< IndexT > > &layer_list)
 Function to generate a node layering as a tree structure. More...
 
template<typename MatrixType >
void viennacl::detail::generate_layering (MatrixType const &matrix, std::vector< std::vector< int > > &l, int s)
 
template<typename MatrixT , typename IndexT >
void viennacl::detail::nodes_of_strongly_connected_component (MatrixT const &matrix, std::vector< IndexT > &node_list)
 Fills the provided nodelist with all nodes of the same strongly connected component as the nodes in the node_list. More...
 
bool viennacl::detail::cuthill_mckee_comp_func (std::vector< int > const &a, std::vector< int > const &b)
 
template<typename IndexT >
bool viennacl::detail::cuthill_mckee_comp_func_pair (std::pair< IndexT, IndexT > const &a, std::pair< IndexT, IndexT > const &b)
 
template<typename IndexT , typename ValueT >
vcl_size_t viennacl::detail::cuthill_mckee_on_strongly_connected_component (std::vector< std::map< IndexT, ValueT > > const &matrix, std::deque< IndexT > &node_assignment_queue, std::vector< bool > &dof_assigned_to_node, std::vector< IndexT > &permutation, vcl_size_t current_dof)
 Runs the Cuthill-McKee algorithm on a strongly connected component of a graph. More...
 
template<typename IndexT , typename ValueT >
std::vector< IndexT > viennacl::reorder (std::vector< std::map< IndexT, ValueT > > const &matrix, cuthill_mckee_tag)
 Function for the calculation of a node number permutation to reduce the bandwidth of an incidence matrix by the Cuthill-McKee algorithm. More...
 
template<typename IndexT , typename ValueT >
std::vector< IndexT > viennacl::reorder (std::vector< std::map< IndexT, ValueT > > const &matrix, advanced_cuthill_mckee_tag const &tag)
 Function for the calculation of a node number permutation to reduce the bandwidth of an incidence matrix by the advanced Cuthill-McKee algorithm. More...
 

Detailed Description

Implementation of several flavors of the Cuthill-McKee algorithm. Experimental.

Contributed by Philipp Grabenweger, interface adjustments and performance tweaks by Karl Rupp.

Definition in file cuthill_mckee.hpp.