Program listing for file numerics/src/LCP/pivot-utils.h#

 1#ifndef PIVOT_UTILS_H
 2#define PIVOT_UTILS_H
 3
 4#include "NumericsFwd.h"
 5#include "lumod_wrapper.h"
 6#include "SiconosConfig.h"
 7
 8#ifdef __cplusplus
 9#undef restrict
10#include <sys/cdefs.h>
11#define restrict __restrict
12#endif
13
14#define PIVOT_PATHSEARCH_SUCCESS -2
15
16#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
17extern "C"
18{
19#endif
20
21
22  int pivot_init_lemke(double* mat, unsigned int dim);
23
24
25  int pivot_init_pathsearch(unsigned dim, double* mat, unsigned* t_indx);
26
27
28  int pivot_selection_lemke(double* mat, unsigned dim, unsigned drive, unsigned aux_index);
29
30
31  int pivot_selection_lemke2(unsigned n, double* col_drive, double* q_tilde, double* lexico_mat, unsigned aux_indx, double lexico_tol);
32
33
34int pivot_selection_lemke3(unsigned n, double* col_drive, double* q_tilde, double* lexico_col, unsigned* basis, unsigned* candidate_indx, SN_lumod_dense_data* lumod_data, unsigned aux_indx, double lexico_tol);
35
36
37  int pivot_selection_pathsearch(double* mat, unsigned dim, unsigned drive, unsigned t_indx);
38
39
40void init_M_lemke(double* mat, double* M, unsigned int dim, unsigned int size_x, double* q, double* d);
41
42
43void do_pivot_driftless(double* mat, unsigned int dim, unsigned int dim2, unsigned int block, unsigned int drive);
44
45
46void do_pivot_driftless2(double* mat, unsigned int dim, unsigned int dim2, unsigned int block, unsigned int drive);
47
48
49void do_pivot(double* mat, unsigned int dim, unsigned int dim2, unsigned int block, unsigned int drive);
50
51
52void do_pivot_lumod(SN_lumod_dense_data* lumod_data, NumericsMatrix* M, double* q_tilde, double* lexico_mat, double* col_drive, double* col_tilde, unsigned* basis, unsigned block, unsigned drive);
53
54
55  void lcp_pivot_diagnose_info(int info);
56
57  int pivot_selection_bard(double* mat, unsigned int dim);
58  int pivot_selection_least_index(double* mat, unsigned int dim);
59  void init_M_bard(double* restrict mat, double* restrict M, unsigned int dim, double* restrict q);
60  void init_M_least_index(double* restrict mat, double* restrict M, unsigned int dim, double* restrict q);
61  int init_M_lemke_warm_start(int n, double* restrict u, double* restrict mat, double* restrict M, double* restrict q, int* restrict basis, double* restrict cov_vec);
62
63  const char* basis_to_name(unsigned nb, unsigned n);
64  unsigned basis_to_number(unsigned nb, unsigned n);
65
66#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
67}
68#endif
69
70#endif