Blender V5.0
linear_solver.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004 Bruno Levy
2 * SPDX-FileCopyrightText: 2005-2015 Blender Authors
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later */
5
10
11#pragma once
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/* Solvers for Ax = b and AtAx = Atb */
18
19struct LinearSolver;
20
21LinearSolver *EIG_linear_solver_new(int num_rows, int num_columns, int num_right_hand_sides);
22
24 int num_columns,
25 int num_right_hand_sides);
26
28
29/* Variables (x). Any locking must be done before matrix construction. */
30
31void EIG_linear_solver_variable_set(LinearSolver *solver, int rhs, int index, double value);
32double EIG_linear_solver_variable_get(LinearSolver *solver, int rhs, int index);
33void EIG_linear_solver_variable_lock(LinearSolver *solver, int index);
34void EIG_linear_solver_variable_unlock(LinearSolver *solver, int index);
35
36/* Matrix (A) and right hand side (b) */
37
38void EIG_linear_solver_matrix_add(LinearSolver *solver, int row, int col, double value);
39void EIG_linear_solver_right_hand_side_add(LinearSolver *solver, int rhs, int index, double value);
40
41/* Solve. Repeated solves are supported, by changing b between solves. */
42
44
45/* Debugging */
46
48
49#ifdef __cplusplus
50}
51#endif
uint col
void EIG_linear_solver_print_matrix(LinearSolver *solver)
LinearSolver * EIG_linear_solver_new(int num_rows, int num_columns, int num_right_hand_sides)
void EIG_linear_solver_variable_set(LinearSolver *solver, int rhs, int index, double value)
void EIG_linear_solver_right_hand_side_add(LinearSolver *solver, int rhs, int index, double value)
void EIG_linear_solver_variable_unlock(LinearSolver *solver, int index)
LinearSolver * EIG_linear_least_squares_solver_new(int num_rows, int num_columns, int num_right_hand_sides)
void EIG_linear_solver_delete(LinearSolver *solver)
double EIG_linear_solver_variable_get(LinearSolver *solver, int rhs, int index)
void EIG_linear_solver_matrix_add(LinearSolver *solver, int row, int col, double value)
bool EIG_linear_solver_solve(LinearSolver *solver)
void EIG_linear_solver_variable_lock(LinearSolver *solver, int index)