Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
matrix_ops.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 <stdbool.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
20
21 extern void scadd(double *, int, double, double *);
22 extern double norm(double *, int);
23
24 extern void orthog1(int n, double *vec);
25 extern void init_vec_orth1(int n, double *vec);
26 extern void right_mult_with_vector(vtx_data *, int, double *,
27 double *);
28 extern void right_mult_with_vector_f(float **, int, double *,
29 double *);
30 extern void vectors_subtraction(int, double *, double *, double *);
31 extern void vectors_addition(int, double *, double *, double *);
32 extern void vectors_scalar_mult(int, const double *, double, double *);
33 extern void copy_vector(int n, const double *source, double *dest);
34 extern double vectors_inner_product(int n, const double *vector1,
35 const double *vector2);
36 extern double max_abs(int n, double *vector);
37
38 /* sparse matrix extensions: */
39
41 (double **, int, int, double *, double *);
42 extern void right_mult_with_vector_d(double **, int, int, double *,
43 double *);
44 extern void mult_dense_mat(double **, float **, int, int, int,
45 float ***C);
46 extern void mult_dense_mat_d(double **, float **, int, int, int,
47 double ***CC);
48 extern void mult_sparse_dense_mat_transpose(vtx_data *, double **, int,
49 int, float ***);
50 extern bool power_iteration(double **, int, int, double **, double *);
51
52
53/*****************************
54** Single precision (float) **
55** version **
56*****************************/
57
58 extern void orthog1f(int n, float *vec);
59 extern void right_mult_with_vector_ff(float *, int, float *, float *);
60 extern void vectors_subtractionf(int, float *, float *, float *);
61 extern void vectors_additionf(int n, float *vector1, float *vector2,
62 float *result);
63 extern void vectors_mult_additionf(int n, float *vector1, float alpha,
64 float *vector2);
65 extern void copy_vectorf(int n, float *source, float *dest);
66 extern double vectors_inner_productf(int n, float *vector1,
67 float *vector2);
68 extern void set_vector_val(int n, double val, double *result);
69 extern void set_vector_valf(int n, float val, float * result);
70 extern double max_absf(int n, float *vector);
71 extern void square_vec(int n, float *vec);
72 extern void invert_vec(int n, float *vec);
73 extern void sqrt_vecf(int n, float *source, float *target);
74 extern void invert_sqrt_vec(int n, float *vec);
75
76#ifdef __cplusplus
77}
78#endif
#define CC
Definition gc.c:45
void right_mult_with_vector(vtx_data *, int, double *, double *)
Definition matrix_ops.c:266
double vectors_inner_product(int n, const double *vector1, const double *vector2)
Definition matrix_ops.c:328
void orthog1f(int n, float *vec)
Definition matrix_ops.c:390
void right_mult_with_vector_f(float **, int, double *, double *)
Definition matrix_ops.c:281
void init_vec_orth1(int n, double *vec)
Definition matrix_ops.c:254
void right_mult_with_vector_d(double **, int, int, double *, double *)
Definition matrix_ops.c:368
void invert_vec(int n, float *vec)
Definition matrix_ops.c:509
void invert_sqrt_vec(int n, float *vec)
Definition matrix_ops.c:529
double max_absf(int n, float *vector)
Definition matrix_ops.c:491
void right_mult_with_vector_transpose(double **, int, int, double *, double *)
Definition matrix_ops.c:350
void vectors_additionf(int n, float *vector1, float *vector2, float *result)
Definition matrix_ops.c:442
void mult_dense_mat_d(double **, float **, int, int, int, double ***CC)
Definition matrix_ops.c:160
void set_vector_valf(int n, float val, float *result)
Definition matrix_ops.c:484
void vectors_subtractionf(int, float *, float *, float *)
Definition matrix_ops.c:433
void vectors_scalar_mult(int, const double *, double, double *)
Definition matrix_ops.c:314
void orthog1(int n, double *vec)
Definition matrix_ops.c:233
void mult_dense_mat(double **, float **, int, int, int, float ***C)
Definition matrix_ops.c:133
void mult_sparse_dense_mat_transpose(vtx_data *, double **, int, int, float ***)
Definition matrix_ops.c:188
void vectors_addition(int, double *, double *, double *)
Definition matrix_ops.c:306
void copy_vectorf(int n, float *source, float *dest)
Definition matrix_ops.c:459
void sqrt_vecf(int n, float *source, float *target)
Definition matrix_ops.c:519
void set_vector_val(int n, double val, double *result)
Definition matrix_ops.c:477
void scadd(double *, int, double, double *)
Definition matrix_ops.c:220
void vectors_subtraction(int, double *, double *, double *)
Definition matrix_ops.c:296
bool power_iteration(double **, int, int, double **, double *)
Definition matrix_ops.c:20
void right_mult_with_vector_ff(float *, int, float *, float *)
Definition matrix_ops.c:409
void vectors_mult_additionf(int n, float *vector1, float alpha, float *vector2)
Definition matrix_ops.c:451
void square_vec(int n, float *vec)
Definition matrix_ops.c:501
double max_abs(int n, double *vector)
Definition matrix_ops.c:339
void copy_vector(int n, const double *source, double *dest)
Definition matrix_ops.c:322
double norm(double *, int)
Definition matrix_ops.c:229
double vectors_inner_productf(int n, float *vector1, float *vector2)
Definition matrix_ops.c:466
#define C
Definition pack.c:29
#define alpha
Definition shapes.c:4058