PLearn 0.1
|
#include "pl_io.h"
#include <plearn/base/plerror.h>
#include <plearn/base/byte_order.h>
#include <cstring>
Go to the source code of this file.
Namespaces | |
namespace | PLearn |
< for swap | |
Functions | |
void | PLearn::write_compr_mode_and_size (ostream &out, unsigned char mode, int size) |
void | PLearn::read_compr_mode_and_size (istream &in, unsigned char &mode, int &size) |
void | PLearn::binread_compressed (istream &in, double *data, int l) |
void | PLearn::binwrite_compressed (ostream &out, const double *data, int l) |
version for compressed array (efficient for sparse data, and small integer values) (format is detailed in .cc, see write_compr_mode_and_size function in general.cc) | |
void | PLearn::binread_compressed (istream &in, float *data, int l) |
void | PLearn::binwrite_compressed (ostream &out, const float *data, int l) |
void | PLearn::read_compr_mode_and_size (FILE *in, unsigned char &mode, int &size) |
void | PLearn::binread_compressed (FILE *in, double *data, int l) |
void | PLearn::binwrite_compressed (FILE *out, const double *data, int l) |
void | PLearn::binread_compressed (FILE *in, float *data, int l) |
void | PLearn::binwrite_compressed (FILE *out, const float *data, int l) |
void | PLearn::write_compr_mode_and_size_ptr (char *&out, unsigned char mode, int size) |
void | PLearn::read_compr_mode_and_size_ptr (char *&in, unsigned char &mode, int &size) |
DEPRECATED DO NOT USE! compressed vec to and from memory. | |
void | PLearn::uncompress_vec (char *comprbuf, double *data, int l, bool double_stored_as_float) |
void | PLearn::compress_vec (char *comprbuf, const double *data, int l, bool double_stored_as_float) |
size_t | PLearn::new_read_compressed (FILE *in, real *vec, int l, bool swap_endians=false) |
Reads the l doubles in the new compressed formtat from in Returns the number of bytes read. | |
unsigned char | PLearn::new_get_compr_data_type (double x, double tolerance) |
unsigned char | PLearn::new_get_compr_data_type (float x) |
size_t | PLearn::new_write_mode_and_size (FILE *out, bool insert_zeroes, unsigned int N, unsigned char data_type) |
returns number of bytes written | |
size_t | PLearn::new_write_raw_data_as (FILE *out, real *vec, int l, unsigned char data_type) |
size_t | PLearn::new_write_compressed (FILE *out, real *vec, int l, double tolerance=1e-6, bool swap_endians=false) |
Writes the l doubles in new compressed format to out. |
Definition in file pl_io.cc.