My Project  debian-1:4.1.2-p1+ds-2
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 654 of file svd_si.h.

666 {

◆ ~template_1d_array() [2/2]

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

Definition at line 660 of file svd_si.h.

666 {

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

666 {
667 public:
669  {
670  m_Vec=0;
671  m_iVecSize = 0;
672  };
673 
675  {
676  if(m_Vec)
677  delete[] m_Vec;
678  };
679 
681  {
682  m_iVecSize = rhs.m_iVecSize;
683  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 749 of file svd_si.h.

756  {

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

756  {
757  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 766 of file svd_si.h.

769  {

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

764  {

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

775  {
776  return m_iLow;
777  };

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

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

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

727  {

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

727  {

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

686  {
687  m_Vec = new T[m_iVecSize];
688  #ifndef UNSAFE_MEM_COPY
689  for(int i=0; i<m_iVecSize; i++)
690  m_Vec[i] = rhs.m_Vec[i];
691  #else
692  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
693  #endif
694  }
695  else
696  m_Vec=0;
697  };
698 
699 
701  {
702  if( this==&rhs )
703  return *this;
704 
705  m_iLow = rhs.m_iLow;
706  m_iHigh = rhs.m_iHigh;
707  m_iVecSize = rhs.m_iVecSize;
708  if(m_Vec)
709  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 730 of file svd_si.h.

736  {
737  #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 741 of file svd_si.h.

745  {
746  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 788 of file svd_si.h.

795 {

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
ap::template_1d_array::m_iHigh
long m_iHigh
Definition: ap.h:783
T
STATIC_VAR jList * T
Definition: janet.cc:30
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