Free functions for SparseArray.

Functions

template<int N, typename T >
std::ostream & operator<< (std::ostream &out, const SparseArray< N, T > &x)
 Write a SparseArray in ascii format.
template<int N, typename T >
std::istream & operator>> (std::istream &in, SparseArray< N, T > &x)
 Read a SparseArray in ascii format.

Detailed Description


Function Documentation

template<int N, typename T >
std::ostream& operator<< ( std::ostream &  out,
const SparseArray< N, T > &  x 
) [inline]

Write a SparseArray in ascii format.

Here is the 1-D file format. size indicates the number of non-null elements.

  null_value
  size
  index[0]
  ...
  index[size-1]
  value[0]
  ...
  value[size-1] 
template<int N, typename T >
std::istream& operator>> ( std::istream &  in,
SparseArray< N, T > &  x 
) [inline]

Read a SparseArray in ascii format.

Here is the 1-D file format. size indicates the number of non-null elements.

  null_value
  size
  index[0]
  ...
  index[size-1]
  value[0]
  ...
  value[size-1] 
Generated on Thu Jun 30 02:14:51 2016 for Algorithms and Data Structures Package by  doxygen 1.6.3