Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
Multilevel.c File Reference
#include <sfdpgen/Multilevel.h>
#include <assert.h>
#include <cgraph/alloc.h>
#include <common/arith.h>
#include <stddef.h>
#include <stdbool.h>
Include dependency graph for Multilevel.c:

Go to the source code of this file.

Functions

static Multilevel Multilevel_init (SparseMatrix A)
 
void Multilevel_delete (Multilevel grid)
 
static void maximal_independent_edge_set_heavest_edge_pernode_supernodes_first (SparseMatrix A, int **cluster, int **clusterp, int *ncluster)
 
static void Multilevel_coarsen_internal (SparseMatrix A, SparseMatrix *cA, SparseMatrix *P, SparseMatrix *R)
 
static void Multilevel_coarsen (SparseMatrix A, SparseMatrix *cA, SparseMatrix *P, SparseMatrix *R)
 
void print_padding (int n)
 
static Multilevel Multilevel_establish (Multilevel grid, const Multilevel_control ctrl)
 
Multilevel Multilevel_new (SparseMatrix A0, const Multilevel_control ctrl)
 
Multilevel Multilevel_get_coarsest (Multilevel grid)
 

Variables

static const int minsize = 4
 
static const double min_coarsen_factor = 0.75
 

Function Documentation

◆ maximal_independent_edge_set_heavest_edge_pernode_supernodes_first()

static void maximal_independent_edge_set_heavest_edge_pernode_supernodes_first ( SparseMatrix  A,
int **  cluster,
int **  clusterp,
int *  ncluster 
)
static

Definition at line 53 of file Multilevel.c.

References A, free(), gv_calloc(), MATRIX_TYPE_REAL, MAX_CLUSTER_SIZE, NULL, random_permutation(), SparseMatrix_decompose_to_supervariables(), SparseMatrix_is_symmetric(), and SparseMatrix_known_strucural_symmetric.

Referenced by Multilevel_coarsen_internal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_coarsen()

static void Multilevel_coarsen ( SparseMatrix  A,
SparseMatrix cA,
SparseMatrix P,
SparseMatrix R 
)
static

Definition at line 201 of file Multilevel.c.

References A, M, min_coarsen_factor, Multilevel_coarsen_internal(), SparseMatrix_struct::n, NULL, SparseMatrix_delete(), SparseMatrix_multiply(), and Verbose.

Referenced by Multilevel_establish().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_coarsen_internal()

static void Multilevel_coarsen_internal ( SparseMatrix  A,
SparseMatrix cA,
SparseMatrix P,
SparseMatrix R 
)
static

Definition at line 143 of file Multilevel.c.

References A, free(), gv_calloc(), MATRIX_TYPE_REAL, maximal_independent_edge_set_heavest_edge_pernode_supernodes_first(), min_coarsen_factor, minsize, NULL, RETURN, SparseMatrix_divide_row_by_degree(), SparseMatrix_from_coordinate_arrays(), SparseMatrix_multiply3(), SparseMatrix_remove_diagonal(), SparseMatrix_set_pattern_symmetric, SparseMatrix_set_symmetric, SparseMatrix_transpose(), and Verbose.

Referenced by Multilevel_coarsen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_delete()

void Multilevel_delete ( Multilevel  grid)

Definition at line 36 of file Multilevel.c.

References free(), grid, Multilevel_delete(), and SparseMatrix_delete().

Referenced by Multilevel_delete(), and multilevel_spring_electrical_embedding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_establish()

static Multilevel Multilevel_establish ( Multilevel  grid,
const Multilevel_control  ctrl 
)
static

Definition at line 245 of file Multilevel.c.

References A, grid, Multilevel_struct::level, SparseMatrix_struct::m, Multilevel_control::maxlevel, Multilevel_coarsen(), Multilevel_establish(), Multilevel_init(), Multilevel_struct::n, Multilevel_struct::P, Multilevel_struct::prev, print_padding(), and Verbose.

Referenced by Multilevel_establish(), and Multilevel_new().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_get_coarsest()

Multilevel Multilevel_get_coarsest ( Multilevel  grid)

Definition at line 297 of file Multilevel.c.

References grid, and Multilevel_struct::next.

Referenced by multilevel_spring_electrical_embedding().

Here is the caller graph for this function:

◆ Multilevel_init()

static Multilevel Multilevel_init ( SparseMatrix  A)
static

Definition at line 21 of file Multilevel.c.

References A, grid, gv_alloc(), and NULL.

Referenced by Multilevel_establish(), and Multilevel_new().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_new()

Multilevel Multilevel_new ( SparseMatrix  A0,
const Multilevel_control  ctrl 
)

Definition at line 281 of file Multilevel.c.

References A, grid, MATRIX_TYPE_REAL, Multilevel_establish(), Multilevel_init(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), and SparseMatrix_is_symmetric().

Referenced by multilevel_spring_electrical_embedding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_padding()

void print_padding ( int  n)

Definition at line 240 of file Multilevel.c.

Referenced by Multilevel_establish(), and multilevel_spring_electrical_embedding().

Here is the caller graph for this function:

Variable Documentation

◆ min_coarsen_factor

const double min_coarsen_factor = 0.75
static

Definition at line 19 of file Multilevel.c.

Referenced by Multilevel_coarsen(), and Multilevel_coarsen_internal().

◆ minsize

const int minsize = 4
static

Definition at line 18 of file Multilevel.c.

Referenced by Multilevel_coarsen_internal().