Graphviz
13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
Multilevel.h
Go to the documentation of this file.
1
/*************************************************************************
2
* Copyright (c) 2011 AT&T Intellectual Property
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* https://www.eclipse.org/legal/epl-v10.html
7
*
8
* Contributors: Details at https://graphviz.org
9
*************************************************************************/
10
11
#pragma once
12
13
#include <
sparse/SparseMatrix.h
>
14
#include <stdbool.h>
15
16
typedef
struct
Multilevel_struct
*
Multilevel
;
17
18
struct
Multilevel_struct
{
19
int
level
;
/* 0, 1, ... */
20
int
n
;
21
SparseMatrix
A
;
/* the weighting matrix */
22
SparseMatrix
P
;
23
SparseMatrix
R
;
24
Multilevel
next
;
25
Multilevel
prev
;
26
bool
delete_top_level_A
;
27
};
28
29
enum
{
MAX_CLUSTER_SIZE
= 4 };
30
31
typedef
struct
{
32
int
maxlevel
;
33
}
Multilevel_control
;
34
35
void
Multilevel_delete
(
Multilevel
grid
);
36
37
Multilevel
Multilevel_new
(
SparseMatrix
A
,
const
Multilevel_control
ctrl);
38
39
Multilevel
Multilevel_get_coarsest
(
Multilevel
grid
);
40
41
void
print_padding
(
int
n);
42
43
#define Multilevel_is_finest(grid) (!((grid)->prev))
44
#define Multilevel_is_coarsest(grid) (!((grid)->next))
print_padding
void print_padding(int n)
Definition
Multilevel.c:240
Multilevel_get_coarsest
Multilevel Multilevel_get_coarsest(Multilevel grid)
Definition
Multilevel.c:297
Multilevel_delete
void Multilevel_delete(Multilevel grid)
Definition
Multilevel.c:36
Multilevel_new
Multilevel Multilevel_new(SparseMatrix A, const Multilevel_control ctrl)
Definition
Multilevel.c:281
MAX_CLUSTER_SIZE
@ MAX_CLUSTER_SIZE
Definition
Multilevel.h:29
Multilevel
struct Multilevel_struct * Multilevel
Definition
Multilevel.h:16
SparseMatrix.h
A
#define A(n, t)
Definition
expr.h:76
grid
@ grid
Definition
gvgen.c:32
Multilevel_control
Definition
Multilevel.h:31
Multilevel_control::maxlevel
int maxlevel
Definition
Multilevel.h:32
Multilevel_struct
Definition
Multilevel.h:18
Multilevel_struct::P
SparseMatrix P
Definition
Multilevel.h:22
Multilevel_struct::next
Multilevel next
Definition
Multilevel.h:24
Multilevel_struct::n
int n
Definition
Multilevel.h:20
Multilevel_struct::prev
Multilevel prev
Definition
Multilevel.h:25
Multilevel_struct::R
SparseMatrix R
Definition
Multilevel.h:23
Multilevel_struct::level
int level
Definition
Multilevel.h:19
Multilevel_struct::delete_top_level_A
bool delete_top_level_A
Definition
Multilevel.h:26
Multilevel_struct::A
SparseMatrix A
Definition
Multilevel.h:21
SparseMatrix_struct
Definition
SparseMatrix.h:28
lib
sfdpgen
Multilevel.h
Generated by
1.9.8