Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
sparse_solve.c File Reference
#include <assert.h>
#include <string.h>
#include <sfdpgen/sparse_solve.h>
#include <sfdpgen/sfdp.h>
#include <math.h>
#include <common/arith.h>
#include <common/types.h>
#include <common/globals.h>
#include <util/alloc.h>
Include dependency graph for sparse_solve.c:

Go to the source code of this file.

Functions

static double * diag_precon (const double *diag, double *x, double *y)
 
static double * diag_precon_new (SparseMatrix A)
 
static double conjugate_gradient (SparseMatrix A, const double *precon, int n, double *x, double *rhs, double tol, double maxit)
 
static double cg (SparseMatrix A, const double *precond, int n, int dim, double *x0, double *rhs, double tol, double maxit)
 
double SparseMatrix_solve (SparseMatrix A, int dim, double *x0, double *rhs, double tol, double maxit)
 

Function Documentation

◆ cg()

static double cg ( SparseMatrix  A,
const double *  precond,
int  n,
int  dim,
double *  x0,
double *  rhs,
double  tol,
double  maxit 
)
static

Definition at line 113 of file sparse_solve.c.

References A, conjugate_gradient(), dim, free(), gv_calloc(), maxit, and tol.

Referenced by closeGraph(), clustNode(), compOf(), constrainX(), constrainY(), copyCluster(), copyClusterInfo(), expandCluster(), finalCC(), freeDerivedGraph(), layout(), mapGraphs(), mkConstraintG(), mkNConstraintG(), and SparseMatrix_solve().

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

◆ conjugate_gradient()

static double conjugate_gradient ( SparseMatrix  A,
const double *  precon,
int  n,
double *  x,
double *  rhs,
double  tol,
double  maxit 
)
static

Definition at line 54 of file sparse_solve.c.

References A, alpha, diag_precon(), free(), gv_calloc(), maxit, SparseMatrix_multiply_vector(), tol, vector_product(), vector_saxpy(), vector_saxpy2(), vector_subtract_to(), Verbose, and z.

Referenced by cg().

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

◆ diag_precon()

static double * diag_precon ( const double *  diag,
double *  x,
double *  y 
)
static

Definition at line 23 of file sparse_solve.c.

Referenced by conjugate_gradient().

Here is the caller graph for this function:

◆ diag_precon_new()

static double * diag_precon_new ( SparseMatrix  A)
static

Definition at line 31 of file sparse_solve.c.

References A, gv_calloc(), and MATRIX_TYPE_REAL.

Referenced by SparseMatrix_solve().

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

◆ SparseMatrix_solve()

double SparseMatrix_solve ( SparseMatrix  A,
int  dim,
double *  x0,
double *  rhs,
double  tol,
double  maxit 
)

Definition at line 135 of file sparse_solve.c.

References A, cg(), diag_precon_new(), dim, free(), maxit, and tol.

Referenced by StressMajorizationSmoother_smooth().

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