39 for (
int i = 0; i < v.
length(); i++) {
40 temp(i) = v(i).unfix();
48 for (
int i = 0; i < v.
length(); i++) {
49 temp(i) = v(i).unfix();
57 for (
int i = 0; i < m.
rows(); i++) {
58 for (
int j = 0; j < m.
cols(); j++) {
59 temp(i, j) = m(i, j).unfix();
68 for (
int i = 0; i < m.
rows(); i++) {
69 for (
int j = 0; j < m.
cols(); j++) {
70 temp(i, j) = m(i, j).unfix();
79 return Fix((tmp >= 0 ? tmp : -tmp),
Complex fixed-point data type.
fixrep get_im() const
Get data representation for imaginary part (mainly for internal use since it reveals the representati...
fixrep get_re() const
Get data representation for real part (mainly for internal use since it reveals the representation ty...
int get_shift() const
Get shift.
fixrep get_re() const
Get data representation (mainly for internal use since it reveals the representation type)
int rows() const
The number of rows.
int cols() const
The number of columns.
int length() const
The size of the vector.
Definitions of a set of functions for Fix, Fixed, CFix and CFixed classes.
Vec< CFix > cfixvec
Typedef for complex fixed-point vector type.
Mat< CFix > cfixmat
Typedef for complex fixed-point matrix type.
Mat< Fix > fixmat
Typedef for fixed-point matrix type.
int64_t fixrep
Representation for fixed-point data types.
Vec< Fix > fixvec
Typedef for fixed-point vector type.
vec imag(const cvec &data)
Imaginary part of complex values.
vec real(const cvec &data)
Real part of complex values.
cvec conj(const cvec &x)
Conjugate of complex value.
cvec to_cvec(const Vec< T > &v)
Converts a Vec<T> to cvec.
cmat to_cmat(const Mat< T > &m)
Converts a Mat<T> to cmat.
vec to_vec(const Vec< T > &v)
Converts a Vec<T> to vec.
mat to_mat(const Mat< T > &m)
Converts a Mat<T> to mat.
bin abs(const bin &inbin)
absolute value of bin