Bytecode: remove unused methods in Interpreter

kalman-mex
Sébastien Villemot 2023-10-20 10:34:17 -04:00
parent 2617f5a4be
commit 853b195432
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 0 additions and 57 deletions

View File

@ -1702,33 +1702,6 @@ Interpreter::Init_UMFPACK_Sparse(const mxArray *x0_m, const vector_table_conditi
return { Ap, Ai, Ax, b };
}
void
Interpreter::PrintM(int n, const double *Ax, const mwIndex *Ap, const mwIndex *Ai)
{
int nnz = Ap[n];
auto *A = static_cast<double *>(mxMalloc(n * n * sizeof(double)));
test_mxMalloc(A, __LINE__, __FILE__, __func__, n * n * sizeof(double));
fill_n(A, n * n, 0);
int k = 0;
for (int i = 0; i < n; i++)
for (int j = Ap[i]; j < static_cast<int>(Ap[i + 1]); j++)
{
int row = Ai[j];
A[row * n + i] = Ax[j];
k++;
}
if (nnz != k)
mexPrintf("Problem nnz(%d) != number of elements(%d)\n", nnz, k);
mexPrintf("----------------------\n");
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
mexPrintf("%-6.3f ", A[i * n + j]);
mexPrintf("\n");
}
mxFree(A);
}
void
Interpreter::Init_Matlab_Sparse(const mxArray *A_m, const mxArray *b_m, const mxArray *x0_m) const
{
@ -3156,33 +3129,6 @@ Interpreter::End_Solver()
}
}
void
Interpreter::Printfull_UMFPack(const SuiteSparse_long *Ap, const SuiteSparse_long *Ai, const double *Ax, const double *b, int n)
{
double A[n*n];
for (int i = 0; i < n*n; i++)
A[i] = 0;
int k = 0;
for (int i = 0; i < n; i++)
for (int j = Ap[i]; j < Ap[i+1]; j++)
A[Ai[j] * n + i] = Ax[k++];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
mexPrintf("%4.1f ", A[i*n+j]);
mexPrintf(" %6.3f\n", b[i]);
}
}
void
Interpreter::Print_UMFPack(const SuiteSparse_long *Ap, const SuiteSparse_long *Ai, const double *Ax, int n)
{
int k = 0;
for (int i = 0; i < n; i++)
for (int j = Ap[i]; j < Ap[i+1]; j++)
mexPrintf("(%d, %d) %f\n", Ai[j]+1, i+1, Ax[k++]);
}
void
Interpreter::Solve_LU_UMFPack(SuiteSparse_long *Ap, SuiteSparse_long *Ai, double *Ax, double *b, int n, int Size, double slowc_l, bool is_two_boundaries, int it_, const vector_table_conditional_local_type &vector_table_conditional_local)
{

View File

@ -187,9 +187,6 @@ private:
void Solve_ByteCode_Symbolic_Sparse_GaussianElimination(bool symbolic);
bool Solve_ByteCode_Sparse_GaussianElimination();
void Solve_Matlab_Relaxation(mxArray *A_m, mxArray *b_m);
static void Print_UMFPack(const SuiteSparse_long *Ap, const SuiteSparse_long *Ai, const double *Ax, int n);
static void Printfull_UMFPack(const SuiteSparse_long *Ap, const SuiteSparse_long *Ai, const double *Ax, const double *b, int n);
static void PrintM(int n, const double *Ax, const mwIndex *Ap, const mwIndex *Ai);
void Solve_LU_UMFPack(SuiteSparse_long *Ap, SuiteSparse_long *Ai, double *Ax, double *b, int n, int Size, double slowc_l, bool is_two_boundaries, int it_, const vector_table_conditional_local_type &vector_table_conditional_local);
void Solve_LU_UMFPack(SuiteSparse_long *Ap, SuiteSparse_long *Ai, double *Ax, double *b, int n, int Size, double slowc_l, bool is_two_boundaries, int it_);