Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
matrix_ops.h File Reference
#include <stdbool.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

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

Function Documentation

◆ copy_vector()

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

Definition at line 322 of file matrix_ops.c.

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

Here is the caller graph for this function:

◆ copy_vectorf()

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

Definition at line 459 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()

void init_vec_orth1 ( int  n,
double *  vec 
)
extern

Definition at line 254 of file matrix_ops.c.

References orthog1(), and RANGE.

Here is the call graph for this function:

◆ invert_sqrt_vec()

void invert_sqrt_vec ( int  n,
float *  vec 
)
extern

Definition at line 529 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ invert_vec()

void invert_vec ( int  n,
float *  vec 
)
extern

Definition at line 509 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ max_abs()

double max_abs ( int  n,
double *  vector 
)
extern

Definition at line 339 of file matrix_ops.c.

Referenced by conjugate_gradient(), and conjugate_gradient_f().

Here is the caller graph for this function:

◆ max_absf()

double max_absf ( int  n,
float *  vector 
)
extern

Definition at line 491 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function:

◆ mult_dense_mat()

void mult_dense_mat ( double **  A,
float **  B,
int  dim1,
int  dim2,
int  dim3,
float ***  C 
)
extern

Definition at line 133 of file matrix_ops.c.

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

Referenced by sparse_stress_subspace_majorization_kD().

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

◆ mult_dense_mat_d()

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

Definition at line 160 of file matrix_ops.c.

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

Referenced by iterativePCA_1D().

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

◆ mult_sparse_dense_mat_transpose()

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

Definition at line 188 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()

double norm ( double *  vec,
int  end 
)
extern

Definition at line 229 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()

void orthog1 ( int  n,
double *  vec 
)
extern

Definition at line 233 of file matrix_ops.c.

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

Here is the caller graph for this function:

◆ orthog1f()

void orthog1f ( int  n,
float *  vec 
)
extern

Definition at line 390 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function:

◆ power_iteration()

bool power_iteration ( double **  square_mat,
int  n,
int  neigs,
double **  eigs,
double *  evals 
)
extern

Definition at line 20 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()

void right_mult_with_vector ( vtx_data matrix,
int  n,
double *  vector,
double *  result 
)
extern

Definition at line 266 of file matrix_ops.c.

References vtx_data::nedges.

Referenced by conjugate_gradient().

Here is the caller graph for this function:

◆ right_mult_with_vector_d()

void right_mult_with_vector_d ( double **  matrix,
int  dim1,
int  dim2,
double *  vector,
double *  result 
)
extern

Definition at line 368 of file matrix_ops.c.

Referenced by power_iteration(), and sparse_stress_subspace_majorization_kD().

Here is the caller graph for this function:

◆ right_mult_with_vector_f()

void right_mult_with_vector_f ( float **  matrix,
int  n,
double *  vector,
double *  result 
)
extern

Definition at line 281 of file matrix_ops.c.

Referenced by conjugate_gradient_f().

Here is the caller graph for this function:

◆ right_mult_with_vector_ff()

void right_mult_with_vector_ff ( float *  packed_matrix,
int  n,
float *  vector,
float *  result 
)
extern

Definition at line 408 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ right_mult_with_vector_transpose()

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

Definition at line 350 of file matrix_ops.c.

Referenced by sparse_stress_subspace_majorization_kD().

Here is the caller graph for this function:

◆ scadd()

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

Definition at line 220 of file matrix_ops.c.

Referenced by power_iteration(), and rescale_layout_polar().

Here is the caller graph for this function:

◆ set_vector_val()

void set_vector_val ( int  n,
double  val,
double *  result 
)
extern

Definition at line 477 of file matrix_ops.c.

◆ set_vector_valf()

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

Definition at line 484 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ sqrt_vecf()

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

Definition at line 519 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ square_vec()

void square_vec ( int  n,
float *  vec 
)
extern

Definition at line 501 of file matrix_ops.c.

Referenced by stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ vectors_addition()

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

Definition at line 306 of file matrix_ops.c.

Referenced by conjugate_gradient(), and conjugate_gradient_f().

Here is the caller graph for this function:

◆ vectors_additionf()

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

Definition at line 442 of file matrix_ops.c.

◆ vectors_inner_product()

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

Definition at line 328 of file matrix_ops.c.

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

Here is the caller graph for this function:

◆ vectors_inner_productf()

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

Definition at line 466 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()

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

Definition at line 451 of file matrix_ops.c.

References alpha.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function:

◆ vectors_scalar_mult()

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

Definition at line 314 of file matrix_ops.c.

References alpha.

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

Here is the caller graph for this function:

◆ vectors_subtraction()

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

Definition at line 296 of file matrix_ops.c.

Referenced by conjugate_gradient(), and conjugate_gradient_f().

Here is the caller graph for this function:

◆ vectors_subtractionf()

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

Definition at line 433 of file matrix_ops.c.

Referenced by conjugate_gradient_mkernel().

Here is the caller graph for this function: