PLearn 0.1
Namespaces | Functions
pl_io.h File Reference
#include <cstdio>
#include <iostream>
#include <map>
#include <plearn/math/pl_math.h>
Include dependency graph for pl_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  PLearn
 

< for swap


Functions

template<class Key , class Value >
ostream & PLearn::operator<< (ostream &out, const map< Key, Value > &m)
template<class T >
void PLearn::binwrite (ostream &out, const T *x, int n)
 general purpose (but less efficient) version for pointers to things that have a binwrite/binread function
template<class T >
void PLearn::binread (istream &in, T *x, int n)
template<class A , class B >
void PLearn::binwrite (ostream &out, const pair< A, B > x)
template<class A , class B >
void PLearn::binread (istream &in, pair< A, B > &x)
void PLearn::binwrite (ostream &out, char x)
 binwrite and binread for a few basic types
void PLearn::binread (istream &in, char &x)
void PLearn::binwrite (ostream &out, unsigned char x)
void PLearn::binread (istream &in, unsigned char &x)
void PLearn::binwrite (ostream &out, int x)
void PLearn::binread (istream &in, int &x)
void PLearn::binwrite (ostream &out, unsigned int x)
void PLearn::binread (istream &in, unsigned int &x)
void PLearn::binwrite (ostream &out, short x)
void PLearn::binread (istream &in, short &x)
void PLearn::binwrite (ostream &out, unsigned short x)
void PLearn::binread (istream &in, unsigned short &x)
void PLearn::binwrite (ostream &out, bool x)
 note that bool are saved as unsigned short
void PLearn::binread (istream &in, bool &x)
void PLearn::binwrite (ostream &out, float x)
void PLearn::binread (istream &in, float &x)
void PLearn::binwrite (ostream &out, double x)
void PLearn::binread (istream &in, double &x)
void PLearn::binwrite_double (ostream &out, double x)
void PLearn::binread_double (istream &in, double &x)
void PLearn::binwrite_double (ostream &out, float x)
void PLearn::binread_double (istream &in, float &x)
void PLearn::binwrite (ostream &out, const int *x, int n)
 multi-element versions, giving address and number of elements
void PLearn::binread (istream &in, int *x, int n)
void PLearn::binwrite (ostream &out, const unsigned int *x, int n)
void PLearn::binread (istream &in, unsigned int *x, int n)
void PLearn::binwrite (ostream &out, const short *x, int n)
void PLearn::binread (istream &in, short *x, int n)
void PLearn::binwrite (ostream &out, const unsigned short *x, int n)
void PLearn::binread (istream &in, unsigned short *x, int n)
void PLearn::binwrite (ostream &out, const float *x, int n)
void PLearn::binread (istream &in, float *x, int n)
void PLearn::binwrite (ostream &out, const double *x, int n)
void PLearn::binread (istream &in, double *x, int n)
void PLearn::binwrite_double (ostream &out, const double *x, int n)
void PLearn::binread_double (istream &in, double *x, int n)
void PLearn::binwrite_double (ostream &out, const float *x, int n)
void PLearn::binread_double (istream &in, float *x, int n)
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, double *data, int l)
void PLearn::binwrite_compressed (ostream &out, const float *data, int l)
void PLearn::binread_compressed (istream &in, float *data, int l)
template<class T >
void PLearn::binwrite (FILE *out, const T *x, int n)
 general purpose (but less efficient) version for pointers to things that have a binwrite/binread function
template<class T >
void PLearn::binread (FILE *in, T *x, int n)
template<class A , class B >
void PLearn::binwrite (FILE *out, const pair< A, B > x)
template<class A , class B >
void PLearn::binread (FILE *in, pair< A, B > &x)
void PLearn::binwrite (FILE *out, char x)
 binwrite and binread for a few basic types
void PLearn::binread (FILE *in, char &x)
void PLearn::binwrite (FILE *out, unsigned char x)
void PLearn::binread (FILE *in, unsigned char &x)
void PLearn::binwrite (FILE *out, int x)
void PLearn::binread (FILE *in, int &x)
void PLearn::binwrite (FILE *out, unsigned int x)
void PLearn::binread (FILE *in, unsigned int &x)
void PLearn::binwrite (FILE *out, short x)
void PLearn::binread (FILE *in, short &x)
void PLearn::binwrite (FILE *out, unsigned short x)
void PLearn::binread (FILE *in, unsigned short &x)
void PLearn::binwrite (FILE *out, bool x)
 note that bool are saved as unsigned short
void PLearn::binread (FILE *in, bool &x)
void PLearn::binwrite (FILE *out, float x)
void PLearn::binread (FILE *in, float &x)
void PLearn::binwrite (FILE *out, double x)
void PLearn::binread (FILE *in, double &x)
void PLearn::binwrite_double (FILE *out, double x)
void PLearn::binread_double (FILE *in, double &x)
void PLearn::binwrite_double (FILE *out, float x)
void PLearn::binread_double (FILE *in, float &x)
void PLearn::binwrite (FILE *out, const int *x, int n)
 multi-element versions, giving address and number of elements
void PLearn::binread (FILE *in, int *x, int n)
void PLearn::binwrite (FILE *out, const unsigned int *x, int n)
void PLearn::binread (FILE *in, unsigned int *x, int n)
void PLearn::binwrite (FILE *out, const short *x, int n)
void PLearn::binread (FILE *in, short *x, int n)
void PLearn::binwrite (FILE *out, const unsigned short *x, int n)
void PLearn::binread (FILE *in, unsigned short *x, int n)
void PLearn::binwrite (FILE *out, const float *x, int n)
void PLearn::binread (FILE *in, float *x, int n)
void PLearn::binwrite (FILE *out, const double *x, int n)
void PLearn::binread (FILE *in, double *x, int n)
void PLearn::binwrite_double (FILE *out, const double *x, int n)
void PLearn::binread_double (FILE *in, double *x, int n)
void PLearn::binwrite_double (FILE *out, const float *x, int n)
void PLearn::binread_double (FILE *in, float *x, int n)
void PLearn::binwrite_compressed (FILE *out, const double *data, int l)
void PLearn::binread_compressed (FILE *in, double *data, int l)
void PLearn::binwrite_compressed (FILE *out, const float *data, int l)
void PLearn::binread_compressed (FILE *in, float *data, int l)
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::compress_vec (char *comprbuf, const double *data, int l, bool double_stored_as_float)
void PLearn::uncompress_vec (char *comprbuf, double *data, int l, bool double_stored_as_float)
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.
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.

Detailed Description

Definition in file pl_io.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines