/*
 * MtxOutStream.h
 *
 * reads in 2D matrix "mtx" file where first two int32 are the
 * dimensions, and the rest is a column major matrix of
 * single precision.
 *
 *  Created on: Feb 15, 2012
 *      Author: godin
 */

#ifndef MTXOUTSTREAM_H_
#define MTXOUTSTREAM_H_

#include "FileOutStream.h"
#include "data/Mtx.h"
#include "logger/Logger.h"
#include "logger/Syslog.h"

class MtxOutStream: public FileOutStream
{
public:
    MtxOutStream( const char* filename );
    virtual ~MtxOutStream();

    /// Reads matrix
    /// in case of failure, returns invalid Matrix.
    bool write( const Mtx& mtx, Logger& logger,
                int minM = 0, int maxM = -1, int minN = 0, int maxN = -1,
                Syslog::Severity severity = Syslog::FAULT );

};

#endif /* MTXOUTSTREAM_H_ */
