45 unsigned oldDim = Base::rows();
46 unsigned argDim = _arg.
rows();
48 Base::conservativeResize(oldDim + argDim);
58 ASSERT( _idx < Base::rows() );
61 Base::operator()( _idx ) =
T( 1 );
98 const std::string&
name,
99 const std::string& startString,
100 const std::string& endString,
103 const std::string& colSeparator,
104 const std::string& rowSeparator
108 stream << name <<
" = ";
110 stream << startString;
112 for (
unsigned i = 0; i < getDim(); ++i)
114 stream << Base::operator()( i );
116 if (i < (getDim() - 1))
117 stream << rowSeparator;
126 const std::string&
name,
127 const std::string& startString,
128 const std::string& endString,
131 const std::string& colSeparator,
132 const std::string& rowSeparator
138 stream <<
name <<
" = ";
140 stream << startString;
144 precision > 0 ? ios::scientific | ios::right : ios::fixed);
146 for (
unsigned i = 0; i < getDim(); ++i)
148 stream << Base::operator()( i );
150 if (i < (getDim() - 1))
151 stream << rowSeparator;
162 const std::string&
name,
163 const std::string& startString,
164 const std::string& endString,
167 const std::string& colSeparator,
168 const std::string& rowSeparator
171 ofstream stream( filename.c_str() );
173 if ( stream.is_open() )
174 return print(stream, name, startString, endString, width, precision,
175 colSeparator, rowSeparator);
186 const std::string&
name,
192 switch ( printScheme )
197 matFile->
write(stream, *
this, name.c_str());
205 char* startString = 0;
209 char* colSeparator = 0;
210 char* rowSeparator = 0;
213 &endString, width, precision, &colSeparator, &rowSeparator);
218 precision, colSeparator, rowSeparator);
220 if ( startString != 0 )
delete[] startString;
221 if ( endString != 0 )
delete[] endString;
222 if ( colSeparator != 0 )
delete[] colSeparator;
223 if ( rowSeparator != 0 )
delete[] rowSeparator;
233 const std::string&
name,
237 ofstream stream( filename.c_str() );
240 if ( stream.is_open() )
241 status =
print(stream, name, printScheme);
265 ifstream stream( filename.c_str() );
268 if (stream.is_open())
269 status = read( stream );
returnValue getGlobalStringDefinitions(PrintScheme _printScheme, char **_startString, char **_endString, uint &_width, uint &_precision, char **_colSeparator, char **_rowSeparator)
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
Allows to pass back messages to the calling function.
GenericVector & setUnitVector(unsigned _idx)
Block< Derived > block(Index startRow, Index startCol, Index blockRows, Index blockCols)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Simple class for writing binary data file that are compatible with Matlab.
#define CLOSE_NAMESPACE_ACADO
EIGEN_STRONG_INLINE Index rows() const
virtual returnValue print(std::ostream &stream=std::cout, const std::string &name=DEFAULT_LABEL, const std::string &startString=DEFAULT_START_STRING, const std::string &endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const std::string &colSeparator=DEFAULT_COL_SEPARATOR, const std::string &rowSeparator=DEFAULT_ROW_SEPARATOR) const
Derived & setOnes(Index size)
GenericVector & append(const GenericVector &_arg)
real_t getNorm(const real_t *const v, int n)
EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const Derived, const OtherDerived > cwiseQuotient(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
BEGIN_NAMESPACE_QPOASES returnValue print(const real_t *const v, int n)
#define BEGIN_NAMESPACE_ACADO
void write(std::ostream &stream, const GenericMatrix< T > &mat, const char *name)
#define ACADOERROR(retval)
T getNorm(VectorNorm _norm) const
virtual returnValue read(std::istream &stream)