Graphviz 16.1.1~dev.20261004.1917
Loading...
Searching...
No Matches
matrix_ops.h File Reference
#include <stdbool.h>
#include <util/api.h>
#include <neatogen/sparsegraph.h>
Include dependency graph for matrix_ops.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PRIVATE void scadd (double *, int, double, double *)
 
PRIVATE double norm (double *, int)
 
PRIVATE void orthog1 (int n, double *vec)
 
PRIVATE void init_vec_orth1 (int n, double *vec)
 
PRIVATE void right_mult_with_vector (const vtx_data *, int, const double *, double *restrict)
 
PRIVATE void vectors_subtraction (int, double *, double *, double *)
 
PRIVATE void vectors_addition (int, double *, double *, double *)
 
PRIVATE void vectors_scalar_mult (int, const double *, double, double *)
 
PRIVATE void copy_vector (int n, const double *restrict source, double *restrict dest)
 
PRIVATE double vectors_inner_product (int n, const double *vector1, const double *vector2)
 
PRIVATE double max_abs (int n, double *vector)
 
PRIVATE void right_mult_with_vector_transpose (double **, int, int, double *, double *)
 
PRIVATE void right_mult_with_vector_d (double *const *, int, int, const double *, double *restrict)
 
PRIVATE void mult_dense_mat_d (double **, float **, int, int, int, double ***CC)
 
PRIVATE void mult_sparse_dense_mat_transpose (vtx_data *, double **, int, int, float ***)
 
PRIVATE bool power_iteration (double *const *, int, int, double **)
 
PRIVATE void orthog1f (int n, float *vec)
 
PRIVATE void right_mult_with_vector_ff (const float *, int, const float *, float *restrict)
 
PRIVATE void vectors_subtractionf (int, float *, float *, float *)
 
PRIVATE void vectors_additionf (int n, float *vector1, float *vector2, float *result)
 
PRIVATE void vectors_mult_additionf (int n, float *vector1, float alpha, float *vector2)
 
PRIVATE void copy_vectorf (int n, float *source, float *dest)
 
PRIVATE double vectors_inner_productf (int n, float *vector1, float *vector2)
 
PRIVATE void set_vector_valf (int n, float val, float *result)
 
PRIVATE double max_absf (int n, float *vector)
 
PRIVATE void square_vec (int n, float *vec)
 
PRIVATE void invert_vec (int n, float *vec)
 
PRIVATE void sqrt_vecf (int n, float *source, float *target)
 
PRIVATE void invert_sqrt_vec (int n, float *vec)
 

Function Documentation

◆ copy_vector()

PRIVATE void copy_vector ( int  n,
const double *restrict  source,
double *restrict  dest 
)

Definition at line 264 of file matrix_ops.c.

Referenced by conjugate_gradient(), conjugate_gradient_d(), power_iteration(), rescale_layout_polar(), and rescale_layout_polarFocus().

Here is the caller graph for this function:

◆ copy_vectorf()

PRIVATE void copy_vectorf ( int  n,
float *  source,
float *  dest 
)

Definition at line 382 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ init_vec_orth1()

PRIVATE void init_vec_orth1 ( int  n,
double *  vec 
)

Definition at line 221 of file matrix_ops.c.

References orthog1(), and RANGE.

Here is the call graph for this function:

◆ invert_sqrt_vec()

PRIVATE void invert_sqrt_vec ( int  n,
float *  vec 
)

Definition at line 438 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ invert_vec()

PRIVATE void invert_vec ( int  n,
float *  vec 
)

Definition at line 420 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ max_abs()

PRIVATE double max_abs ( int  n,
double *  vector 
)

Definition at line 281 of file matrix_ops.c.

Referenced by conjugate_gradient(), and conjugate_gradient_d().

Here is the caller graph for this function:

◆ max_absf()

PRIVATE double max_absf ( int  n,
float *  vector 
)

Definition at line 404 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function:

◆ mult_dense_mat_d()

PRIVATE void mult_dense_mat_d ( double **  A,
float **  B,
int  dim1,
int  dim2,
int  dim3,
double ***  CC 
)

Definition at line 131 of file matrix_ops.c.

References A, B, C, CC, and gv_calloc().

Referenced by iterativePCA_1D(), and sparse_stress_subspace_majorization_kD().

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

◆ mult_sparse_dense_mat_transpose()

PRIVATE void mult_sparse_dense_mat_transpose ( vtx_data *  A,
double **  B,
int  dim1,
int  dim2,
float ***  CC 
)

Definition at line 157 of file matrix_ops.c.

References A, B, C, CC, gv_calloc(), and nedges.

Referenced by iterativePCA_1D(), and sparse_stress_subspace_majorization_kD().

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

◆ norm()

PRIVATE double norm ( double *  vec,
int  end 
)

Definition at line 197 of file matrix_ops.c.

References vectors_inner_product().

Referenced by power_iteration().

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

◆ orthog1()

PRIVATE void orthog1 ( int  n,
double *  vec 
)

Definition at line 201 of file matrix_ops.c.

Referenced by conjugate_gradient(), conjugate_gradient_d(), init_vec_orth1(), initLayout(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ orthog1f()

PRIVATE void orthog1f ( int  n,
float *  vec 
)

Definition at line 322 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function:

◆ power_iteration()

PRIVATE bool power_iteration ( double *const *  square_mat,
int  n,
int  neigs,
double **  eigs 
)

Definition at line 22 of file matrix_ops.c.

References alpha, copy_vector(), free(), gv_calloc(), len(), norm(), p_iteration_threshold, right_mult_with_vector_d(), scadd(), tol, vectors_inner_product(), and vectors_scalar_mult().

Referenced by iterativePCA_1D(), and PCA_alloc().

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

◆ right_mult_with_vector()

PRIVATE void right_mult_with_vector ( const vtx_data *  ,
int  ,
const double *  ,
double *  restrict 
)

◆ right_mult_with_vector_d()

PRIVATE void right_mult_with_vector_d ( double *const *  ,
int  ,
int  ,
const double *  ,
double *  restrict 
)

◆ right_mult_with_vector_ff()

PRIVATE void right_mult_with_vector_ff ( const float *  ,
int  ,
const float *  ,
float *  restrict 
)

◆ right_mult_with_vector_transpose()

PRIVATE void right_mult_with_vector_transpose ( double **  matrix,
int  dim1,
int  dim2,
double *  vector,
double *  result 
)

Definition at line 290 of file matrix_ops.c.

Referenced by sparse_stress_subspace_majorization_kD().

Here is the caller graph for this function:

◆ scadd()

PRIVATE void scadd ( double *  vec1,
int  end,
double  fac,
double *  vec2 
)

Definition at line 188 of file matrix_ops.c.

Referenced by power_iteration(), and rescale_layout_polar().

Here is the caller graph for this function:

◆ set_vector_valf()

PRIVATE void set_vector_valf ( int  n,
float  val,
float *  result 
)

Definition at line 398 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ sqrt_vecf()

PRIVATE void sqrt_vecf ( int  n,
float *  source,
float *  target 
)

Definition at line 429 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ square_vec()

PRIVATE void square_vec ( int  n,
float *  vec 
)

Definition at line 413 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ vectors_addition()

PRIVATE void vectors_addition ( int  n,
double *  vector1,
double *  vector2,
double *  result 
)

Definition at line 249 of file matrix_ops.c.

Referenced by conjugate_gradient(), and conjugate_gradient_d().

Here is the caller graph for this function:

◆ vectors_additionf()

PRIVATE void vectors_additionf ( int  n,
float *  vector1,
float *  vector2,
float *  result 
)

Definition at line 367 of file matrix_ops.c.

◆ vectors_inner_product()

PRIVATE double vectors_inner_product ( int  n,
const double *  vector1,
const double *  vector2 
)

Definition at line 270 of file matrix_ops.c.

Referenced by conjugate_gradient(), conjugate_gradient_d(), norm(), and power_iteration().

Here is the caller graph for this function:

◆ vectors_inner_productf()

PRIVATE double vectors_inner_productf ( int  n,
float *  vector1,
float *  vector2 
)

Definition at line 388 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ vectors_mult_additionf()

PRIVATE void vectors_mult_additionf ( int  n,
float *  vector1,
float  alpha,
float *  vector2 
)

Definition at line 374 of file matrix_ops.c.

References alpha.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function:

◆ vectors_scalar_mult()

PRIVATE void vectors_scalar_mult ( int  n,
const double *  vector,
double  alpha,
double *  result 
)

Definition at line 256 of file matrix_ops.c.

References alpha.

Referenced by conjugate_gradient(), conjugate_gradient_d(), and power_iteration().

Here is the caller graph for this function:

◆ vectors_subtraction()

PRIVATE void vectors_subtraction ( int  n,
double *  vector1,
double *  vector2,
double *  result 
)

Definition at line 241 of file matrix_ops.c.

Referenced by conjugate_gradient(), and conjugate_gradient_d().

Here is the caller graph for this function:

◆ vectors_subtractionf()

PRIVATE void vectors_subtractionf ( int  n,
float *  vector1,
float *  vector2,
float *  result 
)

Definition at line 359 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function: