My Project  debian-1:4.1.1-p2+ds-4build1
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 641 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 645 of file ap.h.

657 {

◆ ~template_1d_array() [1/2]

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

Definition at line 651 of file ap.h.

657 {

◆ 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 657 of file ap.h.

657 {
658 public:
660  {
661  m_Vec=0;
662  m_iVecSize = 0;
663  };
664 
666  {
667  if(m_Vec)
668  delete[] m_Vec;
669  };
670 
672  {
673  m_iVecSize = rhs.m_iVecSize;
674  m_iLow = rhs.m_iLow;

◆ template_1d_array() [3/4]

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

Definition at line 653 of file svd_si.h.

665 {

◆ ~template_1d_array() [2/2]

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

Definition at line 659 of file svd_si.h.

665 {

◆ 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 665 of file svd_si.h.

665 {
666 public:
668  {
669  m_Vec=0;
670  m_iVecSize = 0;
671  };
672 
674  {
675  if(m_Vec)
676  delete[] m_Vec;
677  };
678 
680  {
681  m_iVecSize = rhs.m_iVecSize;
682  m_iLow = rhs.m_iLow;

Member Function Documentation

◆ getcontent() [1/4]

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

Definition at line 740 of file ap.h.

747  {

◆ getcontent() [2/4]

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

Definition at line 748 of file svd_si.h.

755  {

◆ getcontent() [3/4]

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

Definition at line 745 of file ap.h.

747  {
748  setbounds(iLow, iHigh);

◆ getcontent() [4/4]

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

Definition at line 753 of file svd_si.h.

755  {
756  setbounds(iLow, iHigh);

◆ gethighbound() [1/2]

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

Definition at line 757 of file ap.h.

760  {

◆ gethighbound() [2/2]

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

Definition at line 765 of file svd_si.h.

768  {

◆ getlowbound() [1/2]

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

Definition at line 751 of file ap.h.

755  {

◆ getlowbound() [2/2]

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

Definition at line 759 of file svd_si.h.

763  {

◆ getvector() [1/4]

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

Definition at line 762 of file ap.h.

766  {
767  return m_iLow;
768  };

◆ getvector() [2/4]

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

Definition at line 770 of file svd_si.h.

774  {
775  return m_iLow;
776  };

◆ 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 771 of file ap.h.

772  {
773  return m_iHigh;
774  };
775 
776  raw_vector<T> getvector(int iStart, int iEnd)
777  {

◆ 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 779 of file svd_si.h.

780  {
781  return m_iHigh;
782  };
783 
784  raw_vector<T> getvector(int iStart, int iEnd)
785  {

◆ operator()() [1/4]

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

Definition at line 712 of file ap.h.

718  {

◆ operator()() [2/4]

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

Definition at line 720 of file svd_si.h.

726  {

◆ operator()() [3/4]

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

Definition at line 703 of file ap.h.

718  {

◆ operator()() [4/4]

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

Definition at line 711 of file svd_si.h.

726  {

◆ 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 677 of file ap.h.

677  {
678  m_Vec = new T[m_iVecSize];
679  #ifndef UNSAFE_MEM_COPY
680  for(int i=0; i<m_iVecSize; i++)
681  m_Vec[i] = rhs.m_Vec[i];
682  #else
683  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
684  #endif
685  }
686  else
687  m_Vec=0;
688  };
689 
690 
692  {
693  if( this==&rhs )
694  return *this;
695 
696  m_iLow = rhs.m_iLow;
697  m_iHigh = rhs.m_iHigh;
698  m_iVecSize = rhs.m_iVecSize;
699  if(m_Vec)
700  delete[] m_Vec;

◆ 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 685 of file svd_si.h.

685  {
686  m_Vec = new T[m_iVecSize];
687  #ifndef UNSAFE_MEM_COPY
688  for(int i=0; i<m_iVecSize; i++)
689  m_Vec[i] = rhs.m_Vec[i];
690  #else
691  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
692  #endif
693  }
694  else
695  m_Vec=0;
696  };
697 
698 
700  {
701  if( this==&rhs )
702  return *this;
703 
704  m_iLow = rhs.m_iLow;
705  m_iHigh = rhs.m_iHigh;
706  m_iVecSize = rhs.m_iVecSize;
707  if(m_Vec)
708  delete[] m_Vec;

◆ setbounds() [1/2]

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

Definition at line 721 of file ap.h.

727  {
728  #ifndef NO_AP_ASSERT

◆ setbounds() [2/2]

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

Definition at line 729 of file svd_si.h.

735  {
736  #ifndef NO_AP_ASSERT

◆ setcontent() [1/2]

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

Definition at line 732 of file ap.h.

736  {
737  if(m_Vec)

◆ setcontent() [2/2]

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

Definition at line 740 of file svd_si.h.

744  {
745  if(m_Vec)

◆ wrongIdx() [1/2]

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

Definition at line 779 of file ap.h.

786 {

◆ wrongIdx() [2/2]

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

Definition at line 787 of file svd_si.h.

794 {

Field Documentation

◆ m_iHigh

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

Definition at line 783 of file ap.h.

◆ m_iLow

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

Definition at line 783 of file ap.h.

◆ m_iVecSize

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

Definition at line 782 of file ap.h.

◆ m_Vec

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

Definition at line 779 of file ap.h.


The documentation for this class was generated from the following files:
ap::template_1d_array::getvector
raw_vector< T > getvector(int iStart, int iEnd)
Definition: ap.h:762
ap::template_1d_array::operator=
const template_1d_array & operator=(const template_1d_array &rhs)
Definition: ap.h:677
ap::template_1d_array::m_iVecSize
long m_iVecSize
Definition: ap.h:782
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:783
ap::ap_error::make_assertion
static void make_assertion(bool bClause)
Definition: ap.h:51
ap::template_1d_array::setbounds
void setbounds(int iLow, int iHigh)
Definition: ap.h:721
ap::template_1d_array::m_iLow
long m_iLow
Definition: ap.h:783
ap::template_1d_array::template_1d_array
template_1d_array()
Definition: ap.h:645
ap::template_1d_array::m_Vec
T * m_Vec
Definition: ap.h:779
ap::template_1d_array::~template_1d_array
~template_1d_array()
Definition: ap.h:651