#include <stdio.h>#include <stdlib.h>#include "svdlib.h"#include "svdutil.h"
Go to the source code of this file.
Functions | |
| void | svdResetCounters (void) |
| DMat | svdNewDMat (int rows, int cols) |
| void | svdFreeDMat (DMat D) |
| SMat | svdNewSMat (int rows, int cols, int vals) |
| void | svdFreeSMat (SMat S) |
| SVDRec | svdNewSVDRec (void) |
| void | svdFreeSVDRec (SVDRec R) |
| DMat | svdConvertStoD (SMat S) |
| SMat | svdConvertDtoS (DMat D) |
| DMat | svdTransposeD (DMat D) |
| SMat | svdTransposeS (SMat S) |
| void | svdWriteDenseArray (double *a, int n, char *filename, char binary) |
| double * | svdLoadDenseArray (char *filename, int *np, char binary) |
| static SMat | svdLoadSparseTextHBFile (FILE *file) |
| static void | svdWriteSparseTextHBFile (SMat S, FILE *file) |
| static SMat | svdLoadSparseTextFile (FILE *file) |
| static void | svdWriteSparseTextFile (SMat S, FILE *file) |
| static SMat | svdLoadSparseBinaryFile (FILE *file) |
| static void | svdWriteSparseBinaryFile (SMat S, FILE *file) |
| static DMat | svdLoadDenseTextFile (FILE *file) |
| static void | svdWriteDenseTextFile (DMat D, FILE *file) |
| static DMat | svdLoadDenseBinaryFile (FILE *file) |
| static void | svdWriteDenseBinaryFile (DMat D, FILE *file) |
| SMat | svdLoadSparseMatrix (char *filename, int format) |
| DMat | svdLoadDenseMatrix (char *filename, int format) |
| void | svdWriteSparseMatrix (SMat S, char *filename, int format) |
| void | svdWriteDenseMatrix (DMat D, char *filename, int format) |
Variables | |
| char * | SVDVersion = "1.34" |
| long | SVDVerbosity = 1 |
| long | SVDCount [SVD_COUNTERS] |
Definition at line 104 of file svdlib.c.
References smat::cols, dmat::cols, smat::pointr, smat::rowind, dmat::rows, svd_error(), svdNewSMat(), smat::vals, smat::value, and dmat::value.
Referenced by CovIntra(), svdLoadSparseMatrix(), and svdWriteDenseMatrix().
Definition at line 89 of file svdlib.c.
References smat::cols, smat::pointr, smat::rowind, smat::rows, svd_error(), svdNewDMat(), smat::vals, smat::value, and dmat::value.
Referenced by svdLoadDenseMatrix(), and svdWriteSparseMatrix().
| void svdFreeDMat | ( | DMat | D ) |
Definition at line 37 of file svdlib.c.
References SAFE_FREE, and dmat::value.
Referenced by CovIntra(), svdFreeSVDRec(), svdLoadSparseMatrix(), and svdWriteSparseMatrix().
| void svdFreeSMat | ( | SMat | S ) |
Definition at line 60 of file svdlib.c.
References smat::pointr, smat::rowind, SAFE_FREE, and smat::value.
Referenced by CovIntra(), main(), svdLAS2(), svdLoadDenseMatrix(), svdNewSMat(), and svdWriteDenseMatrix().
| void svdFreeSVDRec | ( | SVDRec | R ) |
Definition at line 77 of file svdlib.c.
References svdrec::S, SAFE_FREE, svdFreeDMat(), svdrec::Ut, and svdrec::Vt.
Referenced by CovIntra().
| double* svdLoadDenseArray | ( | char * | filename, |
| int * | np, | ||
| char | binary | ||
| ) |
Definition at line 183 of file svdlib.c.
References FALSE, svd_closeFile(), svd_doubleArray(), svd_error(), svd_readBinFloat(), svd_readBinInt(), and svd_readFile().
| static DMat svdLoadDenseBinaryFile | ( | FILE * | file ) | [static] |
Definition at line 413 of file svdlib.c.
References svd_error(), svd_readBinFloat(), svd_readBinInt(), svdNewDMat(), and dmat::value.
Referenced by svdLoadDenseMatrix(), and svdLoadSparseMatrix().
| DMat svdLoadDenseMatrix | ( | char * | filename, |
| int | format | ||
| ) |
Definition at line 478 of file svdlib.c.
References svd_closeFile(), svd_error(), SVD_F_DB, SVD_F_DT, SVD_F_SB, SVD_F_ST, SVD_F_STH, svd_fatalReadFile(), svdConvertStoD(), svdFreeSMat(), svdLoadDenseBinaryFile(), svdLoadDenseTextFile(), svdLoadSparseBinaryFile(), svdLoadSparseTextFile(), and svdLoadSparseTextHBFile().
Referenced by main().
| static DMat svdLoadDenseTextFile | ( | FILE * | file ) | [static] |
Definition at line 383 of file svdlib.c.
References svd_error(), svdNewDMat(), and dmat::value.
Referenced by svdLoadDenseMatrix(), and svdLoadSparseMatrix().
| static SMat svdLoadSparseBinaryFile | ( | FILE * | file ) | [static] |
Definition at line 332 of file svdlib.c.
References smat::pointr, smat::rowind, svd_error(), svd_readBinFloat(), svd_readBinInt(), svdNewSMat(), and smat::value.
Referenced by svdLoadDenseMatrix(), and svdLoadSparseMatrix().
| SMat svdLoadSparseMatrix | ( | char * | filename, |
| int | format | ||
| ) |
Definition at line 448 of file svdlib.c.
References svd_closeFile(), svd_error(), SVD_F_DB, SVD_F_DT, SVD_F_SB, SVD_F_ST, SVD_F_STH, svd_fatalReadFile(), svdConvertDtoS(), svdFreeDMat(), svdLoadDenseBinaryFile(), svdLoadDenseTextFile(), svdLoadSparseBinaryFile(), svdLoadSparseTextFile(), and svdLoadSparseTextHBFile().
Referenced by main().
| static SMat svdLoadSparseTextFile | ( | FILE * | file ) | [static] |
Definition at line 293 of file svdlib.c.
References smat::pointr, smat::rowind, svd_error(), svdNewSMat(), and smat::value.
Referenced by svdLoadDenseMatrix(), and svdLoadSparseMatrix().
| static SMat svdLoadSparseTextHBFile | ( | FILE * | file ) | [static] |
Definition at line 215 of file svdlib.c.
References smat::cols, line, smat::pointr, smat::rowind, svd_error(), svdNewSMat(), smat::vals, and smat::value.
Referenced by svdLoadDenseMatrix(), and svdLoadSparseMatrix().
| DMat svdNewDMat | ( | int | rows, |
| int | cols | ||
| ) |
Definition at line 20 of file svdlib.c.
References dmat::cols, dmat::rows, SAFE_FREE, and dmat::value.
Referenced by CovIntra(), svdConvertStoD(), svdLAS2(), svdLoadDenseBinaryFile(), svdLoadDenseTextFile(), and svdTransposeD().
| SMat svdNewSMat | ( | int | rows, |
| int | cols, | ||
| int | vals | ||
| ) |
Definition at line 45 of file svdlib.c.
References smat::cols, FALSE, smat::pointr, smat::rowind, smat::rows, svd_doubleArray(), svd_longArray(), svdFreeSMat(), TRUE, smat::vals, and smat::value.
Referenced by svdConvertDtoS(), svdLoadSparseBinaryFile(), svdLoadSparseTextFile(), svdLoadSparseTextHBFile(), and svdTransposeS().
| void svdResetCounters | ( | void | ) |
Definition at line 10 of file svdlib.c.
References SVD_COUNTERS, and SVDCount.
Referenced by svdLAS2().
Definition at line 130 of file svdlib.c.
References dmat::cols, dmat::rows, svdNewDMat(), and dmat::value.
Referenced by main().
Definition at line 140 of file svdlib.c.
References smat::cols, smat::pointr, smat::rowind, smat::rows, svdNewSMat(), smat::vals, and smat::value.
| void svdWriteDenseArray | ( | double * | a, |
| int | n, | ||
| char * | filename, | ||
| char | binary | ||
| ) |
Definition at line 166 of file svdlib.c.
References FALSE, svd_closeFile(), svd_error(), svd_writeBinFloat(), svd_writeBinInt(), and svd_writeFile().
| static void svdWriteDenseBinaryFile | ( | DMat | D, |
| FILE * | file | ||
| ) | [static] |
Definition at line 438 of file svdlib.c.
References dmat::cols, dmat::rows, svd_writeBinFloat(), svd_writeBinInt(), and dmat::value.
Referenced by svdWriteDenseMatrix(), and svdWriteSparseMatrix().
| void svdWriteDenseMatrix | ( | DMat | D, |
| char * | filename, | ||
| int | format | ||
| ) |
Definition at line 539 of file svdlib.c.
References FALSE, svd_closeFile(), svd_error(), SVD_F_DB, SVD_F_DT, SVD_F_SB, SVD_F_ST, SVD_F_STH, svd_writeFile(), svdConvertDtoS(), svdFreeSMat(), svdWriteDenseBinaryFile(), svdWriteDenseTextFile(), svdWriteSparseBinaryFile(), svdWriteSparseTextFile(), and svdWriteSparseTextHBFile().
Referenced by CovIntra(), main(), and svdLAS2().
| static void svdWriteDenseTextFile | ( | DMat | D, |
| FILE * | file | ||
| ) | [static] |
Definition at line 404 of file svdlib.c.
References dmat::cols, dmat::rows, and dmat::value.
Referenced by svdWriteDenseMatrix(), and svdWriteSparseMatrix().
| static void svdWriteSparseBinaryFile | ( | SMat | S, |
| FILE * | file | ||
| ) | [static] |
Definition at line 368 of file svdlib.c.
References smat::cols, smat::pointr, smat::rowind, smat::rows, svd_writeBinFloat(), svd_writeBinInt(), smat::vals, and smat::value.
Referenced by svdWriteDenseMatrix(), and svdWriteSparseMatrix().
| void svdWriteSparseMatrix | ( | SMat | S, |
| char * | filename, | ||
| int | format | ||
| ) |
Definition at line 508 of file svdlib.c.
References FALSE, svd_closeFile(), svd_error(), SVD_F_DB, SVD_F_DT, SVD_F_SB, SVD_F_ST, SVD_F_STH, svd_writeFile(), svdConvertStoD(), svdFreeDMat(), svdWriteDenseBinaryFile(), svdWriteDenseTextFile(), svdWriteSparseBinaryFile(), svdWriteSparseTextFile(), and svdWriteSparseTextHBFile().
Referenced by main().
| static void svdWriteSparseTextFile | ( | SMat | S, |
| FILE * | file | ||
| ) | [static] |
Definition at line 321 of file svdlib.c.
References smat::cols, smat::pointr, smat::rowind, smat::rows, smat::vals, and smat::value.
Referenced by svdWriteDenseMatrix(), and svdWriteSparseMatrix().
| static void svdWriteSparseTextHBFile | ( | SMat | S, |
| FILE * | file | ||
| ) | [static] |
Definition at line 266 of file svdlib.c.
References smat::cols, smat::pointr, smat::rowind, smat::rows, SVDVersion, smat::vals, and smat::value.
Referenced by svdWriteDenseMatrix(), and svdWriteSparseMatrix().
| long SVDCount[SVD_COUNTERS] |
| long SVDVerbosity = 1 |
Definition at line 7 of file svdlib.c.
Referenced by CovIntra(), main(), and svdLAS2().
| char* SVDVersion = "1.34" |
Definition at line 6 of file svdlib.c.
Referenced by printUsage(), and svdWriteSparseTextHBFile().
1.7.2