#include "matrix_ops.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for matrix_ops.c:
Go to the source code of this file.
Defines | |
#define | RANGE 500 |
Functions | |
boolean | power_iteration (double **square_mat, int n, int neigs, double **eigs, double *evals, boolean initialize) |
void | mult_dense_mat (double **A, float **B, int dim1, int dim2, int dim3, float ***CC) |
void | mult_dense_mat_d (double **A, float **B, int dim1, int dim2, int dim3, double ***CC) |
void | mult_sparse_dense_mat_transpose (vtx_data *A, double **B, int dim1, int dim2, float ***CC) |
void | cpvec (double *copy, int beg, int end, double *vec) |
double | dot (double *vec1, int beg, int end, double *vec2) |
void | scadd (double *vec1, int beg, int end, double fac, double *vec2) |
void | vecscale (double *vec1, int beg, int end, double alpha, double *vec2) |
double | norm (double *vec, int beg, int end) |
void | orthog1 (int n, double *vec) |
void | init_vec_orth1 (int n, double *vec) |
void | right_mult_with_vector (vtx_data *matrix, int n, double *vector, double *result) |
void | right_mult_with_vector_f (float **matrix, int n, double *vector, double *result) |
void | vectors_subtraction (int n, double *vector1, double *vector2, double *result) |
void | vectors_addition (int n, double *vector1, double *vector2, double *result) |
void | vectors_scalar_mult (int n, double *vector, double alpha, double *result) |
void | copy_vector (int n, double *source, double *dest) |
double | vectors_inner_product (int n, double *vector1, double *vector2) |
double | max_abs (int n, double *vector) |
void | right_mult_with_vector_transpose (double **matrix, int dim1, int dim2, double *vector, double *result) |
void | right_mult_with_vector_d (double **matrix, int dim1, int dim2, double *vector, double *result) |
void | orthog1f (int n, float *vec) |
void | right_mult_with_vector_ff (float *packed_matrix, int n, float *vector, float *result) |
void | vectors_substractionf (int n, float *vector1, float *vector2, float *result) |
void | vectors_additionf (int n, float *vector1, float *vector2, float *result) |
void | vectors_mult_additionf (int n, float *vector1, float alpha, float *vector2) |
void | vectors_scalar_multf (int n, float *vector, float alpha, float *result) |
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_vec (int n, float *vec) |
void | sqrt_vecf (int n, float *source, float *target) |
void | invert_sqrt_vec (int n, float *vec) |
#define RANGE 500 |
void copy_vector | ( | int | n, | |
double * | source, | |||
double * | dest | |||
) |
Definition at line 433 of file matrix_ops.c.
Referenced by conjugate_gradient(), and conjugate_gradient_f().
void copy_vectorf | ( | int | n, | |
float * | source, | |||
float * | dest | |||
) |
Definition at line 659 of file matrix_ops.c.
Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().
void cpvec | ( | double * | copy, | |
int | beg, | |||
int | end, | |||
double * | vec | |||
) |
double dot | ( | double * | vec1, | |
int | beg, | |||
int | end, | |||
double * | vec2 | |||
) |
Definition at line 272 of file matrix_ops.c.
Referenced by lu_solve(), norm(), and power_iteration().
void init_vec_orth1 | ( | int | n, | |
double * | vec | |||
) |
void invert_sqrt_vec | ( | int | n, | |
float * | vec | |||
) |
void invert_vec | ( | int | n, | |
float * | vec | |||
) |
double max_abs | ( | int | n, | |
double * | vector | |||
) |
Definition at line 453 of file matrix_ops.c.
double max_absf | ( | int | n, | |
float * | vector | |||
) |
Definition at line 694 of file matrix_ops.c.
void mult_dense_mat | ( | double ** | A, | |
float ** | B, | |||
int | dim1, | |||
int | dim2, | |||
int | dim3, | |||
float *** | CC | |||
) |
void mult_dense_mat_d | ( | double ** | A, | |
float ** | B, | |||
int | dim1, | |||
int | dim2, | |||
int | dim3, | |||
double *** | CC | |||
) |
Definition at line 180 of file matrix_ops.c.
References C, malloc(), NULL, and realloc().
Referenced by iterativePCA_1D().
void mult_sparse_dense_mat_transpose | ( | vtx_data * | A, | |
double ** | B, | |||
int | dim1, | |||
int | dim2, | |||
float *** | CC | |||
) |
Definition at line 216 of file matrix_ops.c.
References C, vtx_data::ewgts, malloc(), vtx_data::nedges, NULL, and realloc().
Referenced by iterativePCA_1D().
double norm | ( | double * | vec, | |
int | beg, | |||
int | end | |||
) |
void orthog1 | ( | int | n, | |
double * | vec | |||
) |
Definition at line 321 of file matrix_ops.c.
Referenced by conjugate_gradient(), conjugate_gradient_f(), init_vec_orth1(), initLayout(), and stress_majorization_kD_mkernel().
void orthog1f | ( | int | n, | |
float * | vec | |||
) |
boolean power_iteration | ( | double ** | square_mat, | |
int | n, | |||
int | neigs, | |||
double ** | eigs, | |||
double * | evals, | |||
boolean | initialize | |||
) |
Definition at line 26 of file matrix_ops.c.
References cpvec(), dot(), free(), N_GNEW, norm(), right_mult_with_vector_d(), scadd(), and vecscale().
Referenced by iterativePCA_1D(), and PCA_alloc().
void right_mult_with_vector | ( | vtx_data * | matrix, | |
int | n, | |||
double * | vector, | |||
double * | result | |||
) |
Definition at line 356 of file matrix_ops.c.
References vtx_data::nedges.
Referenced by conjugate_gradient().
void right_mult_with_vector_d | ( | double ** | matrix, | |
int | dim1, | |||
int | dim2, | |||
double * | vector, | |||
double * | result | |||
) |
void right_mult_with_vector_f | ( | float ** | matrix, | |
int | n, | |||
double * | vector, | |||
double * | result | |||
) |
void right_mult_with_vector_ff | ( | float * | packed_matrix, | |
int | n, | |||
float * | vector, | |||
float * | result | |||
) |
Definition at line 596 of file matrix_ops.c.
Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().
void right_mult_with_vector_transpose | ( | double ** | matrix, | |
int | dim1, | |||
int | dim2, | |||
double * | vector, | |||
double * | result | |||
) |
Definition at line 505 of file matrix_ops.c.
void scadd | ( | double * | vec1, | |
int | beg, | |||
int | end, | |||
double | fac, | |||
double * | vec2 | |||
) |
void set_vector_val | ( | int | n, | |
double | val, | |||
double * | result | |||
) |
Definition at line 679 of file matrix_ops.c.
void set_vector_valf | ( | int | n, | |
float | val, | |||
float * | result | |||
) |
void sqrt_vec | ( | int | n, | |
float * | vec | |||
) |
void sqrt_vecf | ( | int | n, | |
float * | source, | |||
float * | target | |||
) |
void square_vec | ( | int | n, | |
float * | vec | |||
) |
void vecscale | ( | double * | vec1, | |
int | beg, | |||
int | end, | |||
double | alpha, | |||
double * | vec2 | |||
) |
void vectors_addition | ( | int | n, | |
double * | vector1, | |||
double * | vector2, | |||
double * | result | |||
) |
Definition at line 401 of file matrix_ops.c.
Referenced by conjugate_gradient(), and conjugate_gradient_f().
void vectors_additionf | ( | int | n, | |
float * | vector1, | |||
float * | vector2, | |||
float * | result | |||
) |
Definition at line 631 of file matrix_ops.c.
Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().
double vectors_inner_product | ( | int | n, | |
double * | vector1, | |||
double * | vector2 | |||
) |
Definition at line 441 of file matrix_ops.c.
Referenced by conjugate_gradient(), and conjugate_gradient_f().
double vectors_inner_productf | ( | int | n, | |
float * | vector1, | |||
float * | vector2 | |||
) |
Definition at line 667 of file matrix_ops.c.
Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().
void vectors_mult_additionf | ( | int | n, | |
float * | vector1, | |||
float | alpha, | |||
float * | vector2 | |||
) |
Definition at line 641 of file matrix_ops.c.
Referenced by conjugate_gradient_mkernel(), and stress_majorization_kD_mkernel().
void vectors_scalar_mult | ( | int | n, | |
double * | vector, | |||
double | alpha, | |||
double * | result | |||
) |
Definition at line 424 of file matrix_ops.c.
Referenced by conjugate_gradient(), and conjugate_gradient_f().
void vectors_scalar_multf | ( | int | n, | |
float * | vector, | |||
float | alpha, | |||
float * | result | |||
) |
void vectors_substractionf | ( | int | n, | |
float * | vector1, | |||
float * | vector2, | |||
float * | result | |||
) |
void vectors_subtraction | ( | int | n, | |
double * | vector1, | |||
double * | vector2, | |||
double * | result | |||
) |
Definition at line 390 of file matrix_ops.c.
Referenced by conjugate_gradient(), and conjugate_gradient_f().