PLearn 0.1
Namespaces | Functions
pl_io.cc File Reference
#include "pl_io.h"
#include <plearn/base/plerror.h>
#include <plearn/base/byte_order.h>
#include <cstring>
Include dependency graph for pl_io.cc:

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.

Detailed Description

Definition in file pl_io.cc.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines