My Project  debian-1:4.1.1-p2+ds-4build3
Public Member Functions | Private Member Functions | Private Attributes
ap::template_1d_array< T > Class Template Reference

#include <ap.h>

Public Member Functions

 template_1d_array ()
 
 ~template_1d_array ()
 
 template_1d_array (const template_1d_array &rhs)
 
const template_1d_arrayoperator= (const template_1d_array &rhs)
 
const Toperator() (int i) const
 
Toperator() (int i)
 
void setbounds (int iLow, int iHigh)
 
void setcontent (int iLow, int iHigh, const T *pContent)
 
Tgetcontent ()
 
const Tgetcontent () const
 
int getlowbound (int iBoundNum=0) const
 
int gethighbound (int iBoundNum=0) const
 
raw_vector< Tgetvector (int iStart, int iEnd)
 
const_raw_vector< Tgetvector (int iStart, int iEnd) const
 
 template_1d_array ()
 
 ~template_1d_array ()
 
 template_1d_array (const template_1d_array &rhs)
 
const template_1d_arrayoperator= (const template_1d_array &rhs)
 
const Toperator() (int i) const
 
Toperator() (int i)
 
void setbounds (int iLow, int iHigh)
 
void setcontent (int iLow, int iHigh, const T *pContent)
 
Tgetcontent ()
 
const Tgetcontent () const
 
int getlowbound (int iBoundNum=0) const
 
int gethighbound (int iBoundNum=0) const
 
raw_vector< Tgetvector (int iStart, int iEnd)
 
const_raw_vector< Tgetvector (int iStart, int iEnd) const
 

Private Member Functions

bool wrongIdx (int i) const
 
bool wrongIdx (int i) const
 

Private Attributes

Tm_Vec
 
long m_iVecSize
 
long m_iLow
 
long m_iHigh
 

Detailed Description

template<class T>
class ap::template_1d_array< T >

Definition at line 661 of file ap.h.

Constructor & Destructor Documentation

◆ template_1d_array() [1/4]

template<class T >
ap::template_1d_array< T >::template_1d_array ( )
inline

Definition at line 666 of file ap.h.

666  {
667  if(m_Vec)
668  delete[] m_Vec;
669  };
670 

◆ ~template_1d_array() [1/2]

template<class T >
ap::template_1d_array< T >::~template_1d_array ( )
inline

Definition at line 672 of file ap.h.

672  {
673  m_iVecSize = rhs.m_iVecSize;
674  m_iLow = rhs.m_iLow;
675  m_iHigh = rhs.m_iHigh;
676  if(rhs.m_Vec)

◆ template_1d_array() [2/4]

template<class T >
ap::template_1d_array< T >::template_1d_array ( const template_1d_array< T > &  rhs)
inline

Definition at line 678 of file ap.h.

692  {
693  if( this==&rhs )
694  return *this;
695 

◆ template_1d_array() [3/4]

template<class T >
ap::template_1d_array< T >::template_1d_array ( )
inline

Definition at line 674 of file svd_si.h.

674  {
675  if(m_Vec)
676  delete[] m_Vec;
677  };
678 

◆ ~template_1d_array() [2/2]

template<class T >
ap::template_1d_array< T >::~template_1d_array ( )
inline

Definition at line 680 of file svd_si.h.

680  {
681  m_iVecSize = rhs.m_iVecSize;
682  m_iLow = rhs.m_iLow;
683  m_iHigh = rhs.m_iHigh;
684  if(rhs.m_Vec)

◆ template_1d_array() [4/4]

template<class T >
ap::template_1d_array< T >::template_1d_array ( const template_1d_array< T > &  rhs)
inline

Definition at line 686 of file svd_si.h.

700  {
701  if( this==&rhs )
702  return *this;
703 

Member Function Documentation

◆ getcontent() [1/4]

template<class T >
T* ap::template_1d_array< T >::getcontent ( )
inline

Definition at line 761 of file ap.h.

766  {

◆ getcontent() [2/4]

template<class T >
T* ap::template_1d_array< T >::getcontent ( )
inline

Definition at line 769 of file svd_si.h.

774  {

◆ getcontent() [3/4]

template<class T >
const T* ap::template_1d_array< T >::getcontent ( ) const
inline

Definition at line 766 of file ap.h.

766  {
767  return m_iLow;
768  };
769 

◆ getcontent() [4/4]

template<class T >
const T* ap::template_1d_array< T >::getcontent ( ) const
inline

Definition at line 774 of file svd_si.h.

774  {
775  return m_iLow;
776  };
777 

◆ gethighbound() [1/2]

template<class T >
int ap::template_1d_array< T >::gethighbound ( int  iBoundNum = 0) const
inline

Definition at line 778 of file ap.h.

786  {

◆ gethighbound() [2/2]

template<class T >
int ap::template_1d_array< T >::gethighbound ( int  iBoundNum = 0) const
inline

Definition at line 786 of file svd_si.h.

794  {

◆ getlowbound() [1/2]

template<class T >
int ap::template_1d_array< T >::getlowbound ( int  iBoundNum = 0) const
inline

Definition at line 772 of file ap.h.

772  {
773  return m_iHigh;
774  };
775 

◆ getlowbound() [2/2]

template<class T >
int ap::template_1d_array< T >::getlowbound ( int  iBoundNum = 0) const
inline

Definition at line 780 of file svd_si.h.

780  {
781  return m_iHigh;
782  };
783 

◆ getvector() [1/4]

template<class T >
raw_vector<T> ap::template_1d_array< T >::getvector ( int  iStart,
int  iEnd 
)
inline

Definition at line 783 of file ap.h.

786  {
787  if( iStart>iEnd || wrongIdx(iStart) || wrongIdx(iEnd) )
788  return const_raw_vector<T>(0, 0, 1);
789  else

◆ getvector() [2/4]

template<class T >
raw_vector<T> ap::template_1d_array< T >::getvector ( int  iStart,
int  iEnd 
)
inline

Definition at line 791 of file svd_si.h.

794  {
795  if( iStart>iEnd || wrongIdx(iStart) || wrongIdx(iEnd) )
796  return const_raw_vector<T>(0, 0, 1);
797  else

◆ getvector() [3/4]

template<class T >
const_raw_vector<T> ap::template_1d_array< T >::getvector ( int  iStart,
int  iEnd 
) const
inline

Definition at line 792 of file ap.h.

792  :
793  bool wrongIdx(int i) const { return i<m_iLow || i>m_iHigh; };
794 
795  T *m_Vec;
796  long m_iVecSize;
797  long m_iLow, m_iHigh;
798 };

◆ getvector() [4/4]

template<class T >
const_raw_vector<T> ap::template_1d_array< T >::getvector ( int  iStart,
int  iEnd 
) const
inline

Definition at line 800 of file svd_si.h.

800  :
801  bool wrongIdx(int i) const { return i<m_iLow || i>m_iHigh; };
802 
803  T *m_Vec;
804  long m_iVecSize;
805  long m_iLow, m_iHigh;
806 };

◆ operator()() [1/4]

template<class T >
T& ap::template_1d_array< T >::operator() ( int  i)
inline

Definition at line 733 of file ap.h.

736  {
737  if(m_Vec)
738  delete[] m_Vec;
739  m_iLow = iLow;

◆ operator()() [2/4]

template<class T >
T& ap::template_1d_array< T >::operator() ( int  i)
inline

Definition at line 741 of file svd_si.h.

744  {
745  if(m_Vec)
746  delete[] m_Vec;
747  m_iLow = iLow;

◆ operator()() [3/4]

template<class T >
const T& ap::template_1d_array< T >::operator() ( int  i) const
inline

Definition at line 724 of file ap.h.

727  {
728  #ifndef NO_AP_ASSERT
730  #endif

◆ operator()() [4/4]

template<class T >
const T& ap::template_1d_array< T >::operator() ( int  i) const
inline

Definition at line 732 of file svd_si.h.

735  {
736  #ifndef NO_AP_ASSERT
738  #endif

◆ operator=() [1/2]

template<class T >
const template_1d_array& ap::template_1d_array< T >::operator= ( const template_1d_array< T > &  rhs)
inline

Definition at line 698 of file ap.h.

702  {
703  m_Vec = new T[m_iVecSize];
704  #ifndef UNSAFE_MEM_COPY
705  for(int i=0; i<m_iVecSize; i++)
706  m_Vec[i] = rhs.m_Vec[i];
707  #else
708  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
709  #endif
710  }
711  else
712  m_Vec=0;
713  return *this;
714  };
715 
716 
717  const T& operator()(int i) const
718  {
719  #ifndef NO_AP_ASSERT
721  #endif

◆ operator=() [2/2]

template<class T >
const template_1d_array& ap::template_1d_array< T >::operator= ( const template_1d_array< T > &  rhs)
inline

Definition at line 706 of file svd_si.h.

710  {
711  m_Vec = new T[m_iVecSize];
712  #ifndef UNSAFE_MEM_COPY
713  for(int i=0; i<m_iVecSize; i++)
714  m_Vec[i] = rhs.m_Vec[i];
715  #else
716  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
717  #endif
718  }
719  else
720  m_Vec=0;
721  return *this;
722  };
723 
724 
725  const T& operator()(int i) const
726  {
727  #ifndef NO_AP_ASSERT
729  #endif

◆ setbounds() [1/2]

template<class T >
void ap::template_1d_array< T >::setbounds ( int  iLow,
int  iHigh 
)
inline

Definition at line 742 of file ap.h.

747  {
748  setbounds(iLow, iHigh);
749  for(int i=iLow; i<=iHigh; i++)
750  (*this)(i) = pContent[i-iLow];

◆ setbounds() [2/2]

template<class T >
void ap::template_1d_array< T >::setbounds ( int  iLow,
int  iHigh 
)
inline

Definition at line 750 of file svd_si.h.

755  {
756  setbounds(iLow, iHigh);
757  for(int i=iLow; i<=iHigh; i++)
758  (*this)(i) = pContent[i-iLow];

◆ setcontent() [1/2]

template<class T >
void ap::template_1d_array< T >::setcontent ( int  iLow,
int  iHigh,
const T pContent 
)
inline

Definition at line 753 of file ap.h.

755  {
756  return m_Vec;
757  };
758 

◆ setcontent() [2/2]

template<class T >
void ap::template_1d_array< T >::setcontent ( int  iLow,
int  iHigh,
const T pContent 
)
inline

Definition at line 761 of file svd_si.h.

763  {
764  return m_Vec;
765  };
766 

◆ wrongIdx() [1/2]

template<class T >
bool ap::template_1d_array< T >::wrongIdx ( int  i) const
inlineprivate

Definition at line 800 of file ap.h.

807 {

◆ wrongIdx() [2/2]

template<class T >
bool ap::template_1d_array< T >::wrongIdx ( int  i) const
inlineprivate

Definition at line 808 of file svd_si.h.

815 {

Field Documentation

◆ m_iHigh

template<class T >
long ap::template_1d_array< T >::m_iHigh
private

Definition at line 804 of file ap.h.

◆ m_iLow

template<class T >
long ap::template_1d_array< T >::m_iLow
private

Definition at line 804 of file ap.h.

◆ m_iVecSize

template<class T >
long ap::template_1d_array< T >::m_iVecSize
private

Definition at line 803 of file ap.h.

◆ m_Vec

template<class T >
T * ap::template_1d_array< T >::m_Vec
private

Definition at line 802 of file ap.h.


The documentation for this class was generated from the following files:
ap::template_1d_array::m_iVecSize
long m_iVecSize
Definition: ap.h:803
i
int i
Definition: cfEzgcd.cc:125
T
static jList * T
Definition: janet.cc:31
ap::template_1d_array::m_iHigh
long m_iHigh
Definition: ap.h:804
ap::ap_error::make_assertion
static void make_assertion(bool bClause)
Definition: ap.h:61
ap::template_1d_array::wrongIdx
bool wrongIdx(int i) const
Definition: ap.h:800
ap::template_1d_array::setbounds
void setbounds(int iLow, int iHigh)
Definition: ap.h:742
ap::template_1d_array::m_iLow
long m_iLow
Definition: ap.h:804
ap::template_1d_array::operator()
const T & operator()(int i) const
Definition: ap.h:724
ap::template_1d_array::m_Vec
T * m_Vec
Definition: ap.h:800