#include "geoslib_old_f.h"
#include "Matrix/LinkMatrixSparse.hpp"
#include "Enum/EJustify.hpp"
#include "Basic/AStringable.hpp"
#include "Basic/VectorNumT.hpp"
#include "Basic/String.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/File.hpp"
#include "Basic/OptCst.hpp"
#include <string>
#include <iostream>
#include <sstream>
#include <typeinfo>
#include <iomanip>
#include <stdio.h>
#include <stdarg.h>
#include <math.h>
#include <string.h>
Macros | |
#define | CASE_DOUBLE 0 |
#define | CASE_REAL 1 |
#define | CASE_INT 2 |
#define | CASE_COL 3 |
#define | CASE_ROW 4 |
#define | TRI(i) (((i) * ((i) + 1)) / 2) |
#define | TL1(i, j) (tl[(j)*neq+(i)-TRI(j)]) /* only for i >= j */ |
#define | TL2(i, j) (tl[TRI(i)+(j)]) /* only for i >= j */ |
Functions | |
std::stringstream | _formatColumn (const EJustify &justify, int localSize=0) |
String | _tabPrintString (const String &string, const EJustify &justify, int localSize=0) |
String | _tabPrintDouble (double value, const EJustify &justify, int localSize=0) |
String | _tabPrintInt (int value, const EJustify &justify, int localSize=0) |
String | _tabPrintRowColumn (int icase, int value, int flagAdd) |
String | _printColumnHeader (const VectorString &colnames, int colfrom, int colto, int colSize=_getColumnSize()) |
String | _printRowHeader (const VectorString &rownames, int iy, int rowSize=_getColumnSize()) |
String | _printTrailer (int ncols, int nrows, int ncols_util, int nrows_util) |
void | message (const char *format,...) |
void | messageNoDiff (const char *format,...) |
void | messageFlush (const String &string) |
void | messerrFlush (const String &string) |
void | messerr (const char *format,...) |
void | mesArg (const char *title, int current, int nmax, bool flagStartOne) |
void | mestitle (int level, const char *format,...) |
void | mes_process (const char *string, int ntot, int iech) |
String | toTitle (int level, const char *format,...) |
void | messageAbort (const char *format,...) |
String | toMatrix (const String &title, const AMatrix &mat, bool flagOverride, bool flagSkipZero) |
String | toMatrix (const String &title, const VectorString &colnames, const VectorString &rownames, bool bycol, int nrows, int ncols, const VectorDouble &tab, bool flagOverride, bool flagSkipZero) |
String | toMatrix (const String &title, const VectorString &colnames, const VectorString &rownames, bool bycol, int nrows, int ncols, const VectorInt &tab, bool flagOverride, bool flagSkipZero) |
String | toVector (const String &title, const VectorDouble &tab, bool flagOverride) |
String | toVector (const String &title, const VectorVectorDouble &tab, bool flagOverride) |
String | toVector (const String &title, const VectorString &tab, bool flagOverride) |
String | toVector (const String &title, const VectorInt &tab, bool flagOverride) |
String | toStr (const String &string, const EJustify &justify, int localSize) |
String | toDouble (double value, const EJustify &justify) |
VectorString | toVectorDouble (const VectorDouble &values, const EJustify &justify) |
String | toInt (int value, const EJustify &justify) |
String | toInterval (double zmin, double zmax) |
void | tab_prints (const char *title, const char *string, int ncol, const EJustify &justify) |
void | tab_printg (const char *title, double value, int ncol, const EJustify &justify) |
void | tab_printd (const char *title, double value, int ncol, const EJustify &justify) |
void | tab_printi (const char *title, int value, int ncol, const EJustify &justify) |
void | tab_print_rc (const char *title, int mode, int value, int ncol, const EJustify &justify) |
void | tab_print_rowname (const char *string, int taille) |
void | print_matrix (const char *title, int flag_limit, int bycol, int nx, int ny, const double *sel, const double *tab) |
void | print_matrix (const char *title, int flag_limit, const AMatrix &mat) |
void | print_trimat (const char *title, int mode, int neq, const double *tl) |
void | print_imatrix (const char *title, int flag_limit, int bycol, int nx, int ny, const double *sel, const int *tab) |
void | print_vector (const char *title, int flag_limit, int ntab, const double *tab) |
void | print_vector (const char *title, int flag_limit, int ntab, const VectorDouble &tab) |
void | print_ivector (const char *title, int flag_limit, int ntab, const int *itab) |
void | print_ivector (const char *title, int flag_limit, int ntab, const VectorInt &itab) |
#define CASE_COL 3 |
#define CASE_DOUBLE 0 |
#define CASE_INT 2 |
#define CASE_REAL 1 |
#define CASE_ROW 4 |
#define TL1 | ( | i, | |
j | |||
) | (tl[(j)*neq+(i)-TRI(j)]) /* only for i >= j */ |
#define TL2 | ( | i, | |
j | |||
) | (tl[TRI(i)+(j)]) /* only for i >= j */ |
#define TRI | ( | i | ) | (((i) * ((i) + 1)) / 2) |
std::stringstream _formatColumn | ( | const EJustify & | justify, |
int | localSize = 0 |
||
) |
String _printColumnHeader | ( | const VectorString & | colnames, |
int | colfrom, | ||
int | colto, | ||
int | colSize = _getColumnSize() |
||
) |
String _printRowHeader | ( | const VectorString & | rownames, |
int | iy, | ||
int | rowSize = _getColumnSize() |
||
) |
String _printTrailer | ( | int | ncols, |
int | nrows, | ||
int | ncols_util, | ||
int | nrows_util | ||
) |
String _tabPrintDouble | ( | double | value, |
const EJustify & | justify, | ||
int | localSize = 0 |
||
) |
String _tabPrintInt | ( | int | value, |
const EJustify & | justify, | ||
int | localSize = 0 |
||
) |
String _tabPrintRowColumn | ( | int | icase, |
int | value, | ||
int | flagAdd | ||
) |
void mes_process | ( | const char * | string, |
int | ntot, | ||
int | iech | ||
) |
Conditionally print the progress of a procedure
string | String to be printed |
ntot | Total number of samples |
iech | Rank of the current sample |
void mesArg | ( | const char * | title, |
int | current, | ||
int | nmax, | ||
bool | flagStartOne | ||
) |
Print a standard Error Message if an argument does not lie in Interval
title | Title to be printed |
current | Current value of the argument |
nmax | Maximum (inclusive) possible value |
flagStartOne | True if the count starts at 1 (instead of 0) |
void message | ( | const char * | format, |
... | |||
) |
Print a formatted message
format | Output format |
... | Additional arguments |
void messageAbort | ( | const char * | format, |
... | |||
) |
Function for aborting the API
format | Fatal error format |
... | Additional arguments |
void messageFlush | ( | const String & | string | ) |
When message has been collected as a String, this function produces it out without passing through useless internal buffering
string | String to be printed out |
void messageNoDiff | ( | const char * | format, |
... | |||
) |
Print a formatted message (with "#NO_DIFF#" prefix)
format | Output format |
... | Additional arguments |
void messerr | ( | const char * | format, |
... | |||
) |
Print Error message
format | Output format |
... | Additional arguments |
void messerrFlush | ( | const String & | string | ) |
When the error message has been collected as a String, this function produces it out without passing through useless internal buffering
string | String to be produced |
void mestitle | ( | int | level, |
const char * | format, | ||
... | |||
) |
Print a message and underlines it with various formats
level | Level of the title |
format | Output format |
... | Additional arguments |
void print_imatrix | ( | const char * | title, |
int | flag_limit, | ||
int | bycol, | ||
int | nx, | ||
int | ny, | ||
const double * | sel, | ||
const int * | tab | ||
) |
Tabulated printout of a matrix (integer version)
[in] | title | Title (Optional) |
[in] | flag_limit | option for the limits
|
[in] | bycol | 1 if values in 'tab' are sorted by column, 0 otherwise |
[in] | nx | number of columns in the matrix |
[in] | ny | number of rows in the matrix |
[in] | sel | array of selection or NULL |
[in] | tab | array containing the matrix |
void print_ivector | ( | const char * | title, |
int | flag_limit, | ||
int | ntab, | ||
const int * | itab | ||
) |
Print a vector of integer values in a matrix form
[in] | title | Title (Optional) |
[in] | flag_limit | 1 if NTCOL is used; 0 otherwise |
[in] | ntab | Number of elements in the array |
[in] | itab | Array to be printed |
void print_ivector | ( | const char * | title, |
int | flag_limit, | ||
int | ntab, | ||
const VectorInt & | itab | ||
) |
void print_matrix | ( | const char * | title, |
int | flag_limit, | ||
const AMatrix & | mat | ||
) |
void print_matrix | ( | const char * | title, |
int | flag_limit, | ||
int | bycol, | ||
int | nx, | ||
int | ny, | ||
const double * | sel, | ||
const double * | tab | ||
) |
Tabulated printout of a matrix
[in] | title | Title (Optional) |
[in] | flag_limit | option for the limits
|
[in] | bycol | 1 if values in 'tab' are sorted by column, 0 otherwise |
[in] | nx | number of columns in the matrix |
[in] | ny | number of rows in the matrix |
[in] | sel | array of selection or NULL |
[in] | tab | array containing the matrix |
void print_trimat | ( | const char * | title, |
int | mode, | ||
int | neq, | ||
const double * | tl | ||
) |
Tabulated printout of a upper triangular matrix
[in] | title | Title (Optional) |
[in] | mode | 1 if the matrix is stored linewise 2 if the matrix is stored columnwise |
[in] | neq | size of the matrix |
[in] | tl | array containing the upper triangular matrix |
void print_vector | ( | const char * | title, |
int | flag_limit, | ||
int | ntab, | ||
const double * | tab | ||
) |
Print a vector of real values in a matrix form
[in] | title | Title (Optional) |
[in] | flag_limit | 1 if NTCOL is used; 0 otherwise |
[in] | ntab | Number of elements in the array |
[in] | tab | Array to be printed |
void print_vector | ( | const char * | title, |
int | flag_limit, | ||
int | ntab, | ||
const VectorDouble & | tab | ||
) |
void tab_print_rc | ( | const char * | title, |
int | mode, | ||
int | value, | ||
int | ncol, | ||
const EJustify & | justify | ||
) |
Tabulated printout of a row or column value
[in] | title | optional title (NULL if not defined) |
[in] | mode | CASE_ROW or CASE_COL |
[in] | value | Value to be written |
[in] | ncol | number of columns for the printout |
[in] | justify | justification flag (EJustify::LEFT, EJustify::CENTER or EJustify::RIGHT) |
void tab_print_rowname | ( | const char * | string, |
int | taille | ||
) |
Tabulated printout of a string (character size provided)
[in] | string | String to be written |
[in] | taille | Number of characters |
void tab_printd | ( | const char * | title, |
double | value, | ||
int | ncol, | ||
const EJustify & | justify | ||
) |
Tabulated printout of a double value
[in] | title | optional title (NULL if not defined) |
[in] | value | Value to be written |
[in] | ncol | number of columns for the printout |
[in] | justify | justification flag (EJustify::LEFT, EJustify::CENTER or EJustify::RIGHT) |
void tab_printg | ( | const char * | title, |
double | value, | ||
int | ncol, | ||
const EJustify & | justify | ||
) |
Tabulated printout of a real value
[in] | title | optional title (NULL if not defined) |
[in] | value | Value to be written |
[in] | ncol | number of columns for the printout |
[in] | justify | justification flag (EJustify::LEFT, EJustify::CENTER or EJustify::RIGHT) |
void tab_printi | ( | const char * | title, |
int | value, | ||
int | ncol, | ||
const EJustify & | justify | ||
) |
Tabulated printout of an integer value
[in] | title | optional title (NULL if not defined) |
[in] | value | Value to be written |
[in] | ncol | number of columns for the printout |
[in] | justify | justification flag (EJustify::LEFT, EJustify::CENTER or EJustify::RIGHT) |
void tab_prints | ( | const char * | title, |
const char * | string, | ||
int | ncol, | ||
const EJustify & | justify | ||
) |
Tabulated printout of a string
[in] | title | optional title (NULL if not defined) |
[in] | string | String to be written |
[in] | ncol | number of columns for the printout |
[in] | justify | justification flag (EJustify::LEFT, EJustify::CENTER or EJustify::RIGHT) |
String toDouble | ( | double | value, |
const EJustify & | justify | ||
) |
String toInt | ( | int | value, |
const EJustify & | justify | ||
) |
String toInterval | ( | double | zmin, |
double | zmax | ||
) |
Print the contents of a VectorDouble in a Matrix Form
title | Title of the printout |
mat | Contents of a AMatrix |
flagOverride | true to override printout limitations |
flagSkipZero | when true, skip the zero values (represented by a '.' as for sparse matrix) always true for sparse matrix |
String toMatrix | ( | const String & | title, |
const VectorString & | colnames, | ||
const VectorString & | rownames, | ||
bool | bycol, | ||
int | nrows, | ||
int | ncols, | ||
const VectorDouble & | tab, | ||
bool | flagOverride, | ||
bool | flagSkipZero | ||
) |
Print the contents of a VectorDouble in a Matrix Form
title | Title of the printout |
colnames | Names of the columns (optional) |
rownames | Names of the rows (optional) |
bycol | true if values as sorted by column; false otherwise |
nrows | Number of rows |
ncols | Number of columns |
tab | VectorDouble containing the values |
flagOverride | true to override printout limitations |
flagSkipZero | when true, skip the zero values (represented by a '.' as for sparse matrix) |
String toMatrix | ( | const String & | title, |
const VectorString & | colnames, | ||
const VectorString & | rownames, | ||
bool | bycol, | ||
int | nrows, | ||
int | ncols, | ||
const VectorInt & | tab, | ||
bool | flagOverride, | ||
bool | flagSkipZero | ||
) |
Print the contents of a VectorDouble in a Matrix Form
title | Title of the printout |
colnames | Names of the columns (optional) |
rownames | Names of the rows (optional) |
bycol | true if values as sorted by column; false otherwise |
nrows | Number of rows |
ncols | Number of columns |
tab | VectorInt containing the values |
flagOverride | true to override printout limitations |
flagSkipZero | when true, skip the zero values (represented by a '.' as for sparse matrix) |
String toTitle | ( | int | level, |
const char * | format, | ||
... | |||
) |
Print a message and underlines it with various formats
level | Level of the title |
format | Output format |
... | Additional arguments |
String toVector | ( | const String & | title, |
const VectorDouble & | tab, | ||
bool | flagOverride | ||
) |
Printout a vector in a formatted manner
title | Title of the printout (or empty string) |
tab | Vector (real values) to be printed |
flagOverride | true to override printout limitations |
Printout a vector in a formatted manner
title | Title of the printout (or empty string) |
tab | Vector (integer values) to be printed |
flagOverride | true to override printout limitations |
String toVector | ( | const String & | title, |
const VectorString & | tab, | ||
bool | flagOverride | ||
) |
String toVector | ( | const String & | title, |
const VectorVectorDouble & | tab, | ||
bool | flagOverride | ||
) |
Printout a list of vectors in a formatted manner
title | Title of the printout (or empty string) |
tab | Vector of vectors (real values) to be printed |
flagOverride | true to override printout limitations |
VectorString toVectorDouble | ( | const VectorDouble & | values, |
const EJustify & | justify | ||
) |