IT++ Logo
Namespaces | Functions

converters.cpp File Reference

Implementation of converters between different vector and matrix types. More...

#include <itpp/base/converters.h>
#include <itpp/base/matfunc.h>
#include <itpp/base/math/log_exp.h>

Go to the source code of this file.

Namespaces

namespace  itpp
 

\


Functions

double rint (double x)
 \
ivec itpp::to_ivec (int s)
 Converts an int to ivec.
vec itpp::to_vec (double s)
 Converts an double to vec.
cvec itpp::to_cvec (double real, double imag)
 Converts real and imaginary double to cvec.
bvec itpp::dec2bin (int length, int index)
 Convert a decimal int index to bvec using length bits in the representation.
bvec itpp::dec2bin (int index, bool msb_first=true)
 Convert a decimal int index to bvec with the first bit as MSB if msb_first == true.
void itpp::dec2bin (int index, bvec &v)
 Convert a decimal int index to bvec. Value returned in v.
int itpp::bin2dec (const bvec &inbvec, bool msb_first=true)
 Convert a bvec to decimal int with the first bit as MSB if msb_first == true.
bvec itpp::oct2bin (const ivec &octalindex, short keepzeros=0)
 Convert ivec of octal form to bvec.
ivec itpp::bin2oct (const bvec &inbits)
 Convert bvec to octal ivec.
ivec itpp::bin2pol (const bvec &inbvec)
 Convert bvec to polar binary representation as ivec.
bvec itpp::pol2bin (const ivec &inpol)
 Convert binary polar ivec to bvec.
ivec itpp::round_i (const vec &x)
 Round to nearest integer and return ivec.
imat itpp::round_i (const mat &x)
 Round to nearest integer and return imat.
ivec itpp::ceil_i (const vec &x)
 Round to nearest upper integer.
imat itpp::ceil_i (const mat &x)
 Round to nearest upper integer.
ivec itpp::floor_i (const vec &x)
 Round to nearest lower integer.
imat itpp::floor_i (const mat &x)
 Round to nearest lower integer.
cvec itpp::round_to_zero (const cvec &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
cmat itpp::round_to_zero (const cmat &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
std::string itpp::to_str (const double &i, const int precision)
 Convert double to string.
template bvec itpp::to_bvec (const svec &v)
template bvec itpp::to_bvec (const ivec &v)
template svec itpp::to_svec (const bvec &v)
template svec itpp::to_svec (const ivec &v)
template svec itpp::to_svec (const vec &v)
template ivec itpp::to_ivec (const svec &v)
template ivec itpp::to_ivec (const vec &v)
template vec itpp::to_vec (const bvec &v)
template vec itpp::to_vec (const svec &v)
template vec itpp::to_vec (const ivec &v)
template cvec itpp::to_cvec (const bvec &v)
template cvec itpp::to_cvec (const svec &v)
template cvec itpp::to_cvec (const ivec &v)
template cvec itpp::to_cvec (const vec &v)
template cvec itpp::to_cvec (const bvec &real, const bvec &imag)
template cvec itpp::to_cvec (const svec &real, const svec &imag)
template cvec itpp::to_cvec (const ivec &real, const ivec &imag)
template cvec itpp::to_cvec (const vec &real, const vec &imag)
template bmat itpp::to_bmat (const smat &m)
template bmat itpp::to_bmat (const imat &m)
template smat itpp::to_smat (const bmat &m)
template smat itpp::to_smat (const imat &m)
template smat itpp::to_smat (const mat &m)
template imat itpp::to_imat (const bmat &m)
template imat itpp::to_imat (const smat &m)
template imat itpp::to_imat (const mat &m)
template mat itpp::to_mat (const bmat &m)
template cmat itpp::to_cmat (const bmat &m)
template cmat itpp::to_cmat (const smat &m)
template cmat itpp::to_cmat (const imat &m)
template cmat itpp::to_cmat (const mat &m)
template cmat itpp::to_cmat (const bmat &real, const bmat &imag)
template cmat itpp::to_cmat (const smat &real, const smat &imag)
template cmat itpp::to_cmat (const imat &real, const imat &imag)
template cmat itpp::to_cmat (const mat &real, const mat &imag)

Detailed Description

Implementation of converters between different vector and matrix types.

Author:
Tony Ottosson, Tobias Ringstrom, Pal Frenger and Adam Piatyszek

-------------------------------------------------------------------------

IT++ - C++ library of mathematical, signal processing, speech processing, and communications classes and functions

Copyright (C) 1995-2008 (see AUTHORS file for a list of contributors)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

-------------------------------------------------------------------------

Definition in file converters.cpp.


Function Documentation

double rint ( double  x)

\

Round to nearest integer using the current rounding direction.

Definition at line 36 of file converters.cpp.

References itpp::floor().

Referenced by itpp::round(), and itpp::round_i().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SourceForge Logo

Generated on Wed Feb 9 2011 13:47:25 for IT++ by Doxygen 1.7.3