Spectral Integral Suite in C++
sis::ChebfunMat< std::complex< T > > Class Template Reference

ChebfunMat overloaded to complex type. More...

#include <sis.hpp>

Public Member Functions

 ChebfunMat ()
 Null constructor. More...
 
 ChebfunMat (int r_, int c_)
 Initializes a Chebfun Matrix of r_ rows and c_ columns. More...
 
 ChebfunMat (const ChebfunMat< std::complex< T > > &in)
 Copy constructor. More...
 
void operator= (const ChebfunMat< std::complex< T > > &in)
 Assignment operator. More...
 
void operator= (const ChebfunMat< T > &in)
 Assignment operator. More...
 
ChebfunMat< std::complex< T > > & operator<< (std::complex< T > b)
 Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type of complex constant. More...
 
Chebfun< std::complex< T > > & operator[] (int i)
 Use this to to refer to Chebfuns. For 1D Matrices, we use the Row major format when refering to [i]. See wiki for row-major format. More...
 
void p2c ()
 Converts every element to Cheb-space, if not already in Cheb-space. More...
 
void c2p ()
 Converts every element to phys-space, if not already in phys-space. More...
 
Chebfun< std::complex< T > > & operator() (int i, int j)
 Use this to to refer to Chebfuns. For 2D Matrices, refer to matrix element Chebfun by (i,j) with the row and column index. Indices start from 0. More...
 
Eigen::Matrix< std::complex< T >, Eigen::Dynamic, Eigen::Dynamic > operator() (T p)
 Use this to evaluate the whole ChebfunMat at a given point. Point must lie in the domain, [-1,1]. More...
 
ChebfunMat< std::complex< T > > & operator<< (Eigen::Array< std::complex< T >, Eigen::Dynamic, 1 > b)
 Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type complex Eigen array. More...
 
ChebfunMat< std::complex< T > > & operator<< (std::valarray< std::complex< T > > b)
 separators. Input type complex valarray. More...
 
ChebfunMat< std::complex< T > > & operator<< (std::valarray< T > b)
 separators. Input type complex valarray. More...
 
ChebfunMat< std::complex< T > > & operator<< (Chebfun< std::complex< T > > b)
 Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type Chebfun. More...
 
void resize (int r_, int c_)
 This clears all contents in the ChebfunMat, and then creates a fresh ChebfunMat of size r_ x c_. More...
 
ChebfunMat< std::complex< T > > & operator, (std::complex< T > b)
 Overloads comma separator to input Chebfuns into a ChebfunMat. Input type complex constant. More...
 
ChebfunMat< std::complex< T > > & operator, (Eigen::Array< std::complex< T >, Eigen::Dynamic, 1 > b)
 Overloads comma separator to input Chebfuns into a ChebfunMat. Input type complex Eigen array. More...
 
ChebfunMat< std::complex< T > > & operator, (std::valarray< std::complex< T > > b)
 Overloads comma separator to input Chebfuns into a ChebfunMat. Input type complex valarray. More...
 
Eigen::Matrix< std::complex< T >, Eigen::Dynamic, Eigen::Dynamic > ChebfunMat2EigenMat ()
 Returns an Eigen matrix representing the ChebfunMat. More...
 
void operator= (const Eigen::Matrix< std::complex< T >, Eigen::Dynamic, Eigen::Dynamic > &in)
 Assigning a ChebfunMat using a Eigen-matrix. Eigen-Matrix should be of size (r*(N+1), c), else an error is thrown. This implies that one must have called the resize(r,c) function before using this. More...
 
void setConstant (T in)
 sets the all the Chebfuns in the ChebfunMat to constant More...
 
void setConstant (std::complex< T > in)
 sets the all the Chebfuns in the ChebfunMat to constant More...
 
ChebfunMat< std::complex< T > > cTranspose ()
 

Public Attributes

int r
 Number of rows. More...
 
int c
 Number of columns. More...
 
std::valarray< Chebfun< std::complex< T > > > ChebfunVec
 This 1D vector of Chebfuns holds all Chebfuns of the ChebfunMat in the row-major format. More...
 

Detailed Description

template<class T>
class sis::ChebfunMat< std::complex< T > >

ChebfunMat overloaded to complex type.

Definition at line 2255 of file sis.hpp.

Constructor & Destructor Documentation

◆ ChebfunMat() [1/3]

template<class T >
sis::ChebfunMat< std::complex< T > >::ChebfunMat ( )
inline

Null constructor.

Definition at line 2268 of file sis.hpp.

◆ ChebfunMat() [2/3]

template<class T >
sis::ChebfunMat< std::complex< T > >::ChebfunMat ( int  r_,
int  c_ 
)
inline

Initializes a Chebfun Matrix of r_ rows and c_ columns.

Definition at line 2271 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::ChebfunVec, and sis::ChebfunMat< T >::r.

◆ ChebfunMat() [3/3]

template<class T >
sis::ChebfunMat< std::complex< T > >::ChebfunMat ( const ChebfunMat< std::complex< T > > &  in)
inline

Member Function Documentation

◆ c2p()

template<class T >
void sis::ChebfunMat< std::complex< T > >::c2p ( )
inline

Converts every element to phys-space, if not already in phys-space.

Definition at line 2341 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< T >::r, and SIS_CHEB_SPACE.

◆ ChebfunMat2EigenMat()

template<class T >
Eigen::Matrix<std::complex<T>, Eigen::Dynamic, Eigen::Dynamic> sis::ChebfunMat< std::complex< T > >::ChebfunMat2EigenMat ( )
inline

Returns an Eigen matrix representing the ChebfunMat.

Definition at line 2452 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::N, sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< T >::r, and SIS_CHEB_SPACE.

◆ cTranspose()

template<class T >
ChebfunMat<std::complex<T> > sis::ChebfunMat< std::complex< T > >::cTranspose ( )
inline

◆ operator()() [1/2]

template<class T >
Chebfun<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator() ( int  i,
int  j 
)
inline

Use this to to refer to Chebfuns. For 2D Matrices, refer to matrix element Chebfun by (i,j) with the row and column index. Indices start from 0.

Definition at line 2353 of file sis.hpp.

References sis::ChebfunMat< T >::c, and sis::ChebfunMat< T >::ChebfunVec.

◆ operator()() [2/2]

template<class T >
Eigen::Matrix<std::complex<T>, Eigen::Dynamic, Eigen::Dynamic > sis::ChebfunMat< std::complex< T > >::operator() ( p)
inline

Use this to evaluate the whole ChebfunMat at a given point. Point must lie in the domain, [-1,1].

Definition at line 2361 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), and sis::ChebfunMat< T >::r.

◆ operator,() [1/3]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator, ( std::complex< T >  b)
inline

Overloads comma separator to input Chebfuns into a ChebfunMat. Input type complex constant.

Definition at line 2426 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec.

◆ operator,() [2/3]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator, ( Eigen::Array< std::complex< T >, Eigen::Dynamic, 1 >  b)
inline

Overloads comma separator to input Chebfuns into a ChebfunMat. Input type complex Eigen array.

Definition at line 2434 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec, and sis::N.

◆ operator,() [3/3]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator, ( std::valarray< std::complex< T > >  b)
inline

Overloads comma separator to input Chebfuns into a ChebfunMat. Input type complex valarray.

Definition at line 2444 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec.

◆ operator<<() [1/5]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator<< ( std::complex< T >  b)
inline

Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type of complex constant.

Definition at line 2311 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec.

◆ operator<<() [2/5]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator<< ( Eigen::Array< std::complex< T >, Eigen::Dynamic, 1 >  b)
inline

Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type complex Eigen array.

Definition at line 2380 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec, and sis::N.

◆ operator<<() [3/5]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator<< ( std::valarray< std::complex< T > >  b)
inline

separators. Input type complex valarray.

Definition at line 2390 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec.

◆ operator<<() [4/5]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator<< ( std::valarray< T >  b)
inline

separators. Input type complex valarray.

Definition at line 2398 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec, and sis::N.

◆ operator<<() [5/5]

template<class T >
ChebfunMat<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator<< ( Chebfun< std::complex< T > >  b)
inline

Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type Chebfun.

Definition at line 2408 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec.

◆ operator=() [1/3]

template<class T >
void sis::ChebfunMat< std::complex< T > >::operator= ( const ChebfunMat< std::complex< T > > &  in)
inline

◆ operator=() [2/3]

template<class T >
void sis::ChebfunMat< std::complex< T > >::operator= ( const ChebfunMat< T > &  in)
inline

◆ operator=() [3/3]

template<class T >
void sis::ChebfunMat< std::complex< T > >::operator= ( const Eigen::Matrix< std::complex< T >, Eigen::Dynamic, Eigen::Dynamic > &  in)
inline

Assigning a ChebfunMat using a Eigen-matrix. Eigen-Matrix should be of size (r*(N+1), c), else an error is thrown. This implies that one must have called the resize(r,c) function before using this.

Definition at line 2481 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::N, sis::ChebfunMat< T >::operator()(), and sis::ChebfunMat< T >::r.

◆ operator[]()

template<class T >
Chebfun<std::complex<T> >& sis::ChebfunMat< std::complex< T > >::operator[] ( int  i)
inline

Use this to to refer to Chebfuns. For 1D Matrices, we use the Row major format when refering to [i]. See wiki for row-major format.

Definition at line 2324 of file sis.hpp.

References sis::ChebfunMat< T >::ChebfunVec.

◆ p2c()

template<class T >
void sis::ChebfunMat< std::complex< T > >::p2c ( )
inline

Converts every element to Cheb-space, if not already in Cheb-space.

Definition at line 2330 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< T >::r, and SIS_PHYS_SPACE.

◆ resize()

template<class T >
void sis::ChebfunMat< std::complex< T > >::resize ( int  r_,
int  c_ 
)
inline

This clears all contents in the ChebfunMat, and then creates a fresh ChebfunMat of size r_ x c_.

Definition at line 2417 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::ChebfunVec, and sis::ChebfunMat< T >::r.

◆ setConstant() [1/2]

template<class T >
void sis::ChebfunMat< std::complex< T > >::setConstant ( in)
inline

sets the all the Chebfuns in the ChebfunMat to constant

Definition at line 2498 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), and sis::ChebfunMat< T >::r.

◆ setConstant() [2/2]

template<class T >
void sis::ChebfunMat< std::complex< T > >::setConstant ( std::complex< T >  in)
inline

sets the all the Chebfuns in the ChebfunMat to constant

Definition at line 2507 of file sis.hpp.

References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), and sis::ChebfunMat< T >::r.

Member Data Documentation

◆ c

template<class T >
int sis::ChebfunMat< std::complex< T > >::c

Number of columns.

Definition at line 2263 of file sis.hpp.

◆ ChebfunVec

template<class T >
std::valarray<Chebfun<std::complex<T> > > sis::ChebfunMat< std::complex< T > >::ChebfunVec

This 1D vector of Chebfuns holds all Chebfuns of the ChebfunMat in the row-major format.

Definition at line 2266 of file sis.hpp.

◆ r

template<class T >
int sis::ChebfunMat< std::complex< T > >::r

Number of rows.

Definition at line 2261 of file sis.hpp.


The documentation for this class was generated from the following file: