My Project  UNKNOWN_GIT_VERSION
Public Member Functions | Private Member Functions | Private Attributes
ap::template_2d_array< T > Class Template Reference

#include <ap.h>

Public Member Functions

 template_2d_array ()
 
 ~template_2d_array ()
 
 template_2d_array (const template_2d_array &rhs)
 
const template_2d_arrayoperator= (const template_2d_array &rhs)
 
const Toperator() (int i1, int i2) const
 
Toperator() (int i1, int i2)
 
void setbounds (int iLow1, int iHigh1, int iLow2, int iHigh2)
 
void setcontent (int iLow1, int iHigh1, int iLow2, int iHigh2, const T *pContent)
 
Tgetcontent ()
 
const Tgetcontent () const
 
int getlowbound (int iBoundNum) const
 
int gethighbound (int iBoundNum) const
 
raw_vector< Tgetcolumn (int iColumn, int iRowStart, int iRowEnd)
 
raw_vector< Tgetrow (int iRow, int iColumnStart, int iColumnEnd)
 
const_raw_vector< Tgetcolumn (int iColumn, int iRowStart, int iRowEnd) const
 
const_raw_vector< Tgetrow (int iRow, int iColumnStart, int iColumnEnd) const
 
 template_2d_array ()
 
 ~template_2d_array ()
 
 template_2d_array (const template_2d_array &rhs)
 
const template_2d_arrayoperator= (const template_2d_array &rhs)
 
const Toperator() (int i1, int i2) const
 
Toperator() (int i1, int i2)
 
void setbounds (int iLow1, int iHigh1, int iLow2, int iHigh2)
 
void setcontent (int iLow1, int iHigh1, int iLow2, int iHigh2, const T *pContent)
 
Tgetcontent ()
 
const Tgetcontent () const
 
int getlowbound (int iBoundNum) const
 
int gethighbound (int iBoundNum) const
 
raw_vector< Tgetcolumn (int iColumn, int iRowStart, int iRowEnd)
 
raw_vector< Tgetrow (int iRow, int iColumnStart, int iColumnEnd)
 
const_raw_vector< Tgetcolumn (int iColumn, int iRowStart, int iRowEnd) const
 
const_raw_vector< Tgetrow (int iRow, int iColumnStart, int iColumnEnd) const
 

Private Member Functions

bool wrongRow (int i) const
 
bool wrongColumn (int j) const
 
bool wrongRow (int i) const
 
bool wrongColumn (int j) const
 

Private Attributes

Tm_Vec
 
long m_iVecSize
 
long m_iLow1
 
long m_iLow2
 
long m_iHigh1
 
long m_iHigh2
 
long m_iConstOffset
 
long m_iLinearMember
 

Detailed Description

template<class T>
class ap::template_2d_array< T >

Definition at line 811 of file ap.h.

Constructor & Destructor Documentation

◆ template_2d_array() [1/4]

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

Definition at line 816 of file ap.h.

816  {
817  if(m_Vec)
818  delete[] m_Vec;
819  };
820 

◆ ~template_2d_array() [1/2]

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

Definition at line 822 of file ap.h.

822  {
823  m_iVecSize = rhs.m_iVecSize;
824  m_iLow1 = rhs.m_iLow1;
825  m_iLow2 = rhs.m_iLow2;
826  m_iHigh1 = rhs.m_iHigh1;

◆ template_2d_array() [2/4]

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

Definition at line 828 of file ap.h.

831  {
832  m_Vec = new T[m_iVecSize];
833  #ifndef UNSAFE_MEM_COPY
834  for(int i=0; i<m_iVecSize; i++)
835  m_Vec[i] = rhs.m_Vec[i];
836  #else
837  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
838  #endif
839  }
840  else
841  m_Vec=0;
842  };
844  {
845  if( this==&rhs )
846  return *this;
847 
848  m_iLow1 = rhs.m_iLow1;
849  m_iLow2 = rhs.m_iLow2;

◆ template_2d_array() [3/4]

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

Definition at line 824 of file svd_si.h.

824  {
825  if(m_Vec)
826  delete[] m_Vec;
827  };
828 

◆ ~template_2d_array() [2/2]

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

Definition at line 830 of file svd_si.h.

830  {
831  m_iVecSize = rhs.m_iVecSize;
832  m_iLow1 = rhs.m_iLow1;
833  m_iLow2 = rhs.m_iLow2;
834  m_iHigh1 = rhs.m_iHigh1;

◆ template_2d_array() [4/4]

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

Definition at line 836 of file svd_si.h.

839  {
840  m_Vec = new T[m_iVecSize];
841  #ifndef UNSAFE_MEM_COPY
842  for(int i=0; i<m_iVecSize; i++)
843  m_Vec[i] = rhs.m_Vec[i];
844  #else
845  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
846  #endif
847  }
848  else
849  m_Vec=0;
850  };
852  {
853  if( this==&rhs )
854  return *this;
855 
856  m_iLow1 = rhs.m_iLow1;
857  m_iLow2 = rhs.m_iLow2;

Member Function Documentation

◆ getcolumn() [1/4]

template<class T >
raw_vector<T> ap::template_2d_array< T >::getcolumn ( int  iColumn,
int  iRowStart,
int  iRowEnd 
)
inline

Definition at line 938 of file ap.h.

940  {
941  if( (iColumnStart>iColumnEnd) || wrongRow(iRow) || wrongColumn(iColumnStart) || wrongColumn(iColumnEnd))
942  return raw_vector<T>(0, 0, 1);
943  else
944  return raw_vector<T>(&((*this)(iRow, iColumnStart)), iColumnEnd-iColumnStart+1, 1);

◆ getcolumn() [2/4]

template<class T >
raw_vector<T> ap::template_2d_array< T >::getcolumn ( int  iColumn,
int  iRowStart,
int  iRowEnd 
)
inline

Definition at line 946 of file svd_si.h.

948  {
949  if( (iColumnStart>iColumnEnd) || wrongRow(iRow) || wrongColumn(iColumnStart) || wrongColumn(iColumnEnd))
950  return raw_vector<T>(0, 0, 1);
951  else
952  return raw_vector<T>(&((*this)(iRow, iColumnStart)), iColumnEnd-iColumnStart+1, 1);

◆ getcolumn() [3/4]

template<class T >
const_raw_vector<T> ap::template_2d_array< T >::getcolumn ( int  iColumn,
int  iRowStart,
int  iRowEnd 
) const
inline

Definition at line 954 of file ap.h.

956  {
957  if( (iColumnStart>iColumnEnd) || wrongRow(iRow) || wrongColumn(iColumnStart) || wrongColumn(iColumnEnd))
958  return const_raw_vector<T>(0, 0, 1);
959  else
960  return const_raw_vector<T>(&((*this)(iRow, iColumnStart)), iColumnEnd-iColumnStart+1, 1);

◆ getcolumn() [4/4]

template<class T >
const_raw_vector<T> ap::template_2d_array< T >::getcolumn ( int  iColumn,
int  iRowStart,
int  iRowEnd 
) const
inline

Definition at line 962 of file svd_si.h.

964  {
965  if( (iColumnStart>iColumnEnd) || wrongRow(iRow) || wrongColumn(iColumnStart) || wrongColumn(iColumnEnd))
966  return const_raw_vector<T>(0, 0, 1);
967  else
968  return const_raw_vector<T>(&((*this)(iRow, iColumnStart)), iColumnEnd-iColumnStart+1, 1);

◆ getcontent() [1/4]

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

Definition at line 918 of file ap.h.

922  {

◆ getcontent() [2/4]

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

Definition at line 926 of file svd_si.h.

930  {

◆ getcontent() [3/4]

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

Definition at line 923 of file ap.h.

923  : m_iLow2;
924  };
925 
926  int gethighbound(int iBoundNum) const

◆ getcontent() [4/4]

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

Definition at line 931 of file svd_si.h.

931  : m_iLow2;
932  };
933 
934  int gethighbound(int iBoundNum) const

◆ gethighbound() [1/2]

template<class T >
int ap::template_2d_array< T >::gethighbound ( int  iBoundNum) const
inline

Definition at line 933 of file ap.h.

940  {

◆ gethighbound() [2/2]

template<class T >
int ap::template_2d_array< T >::gethighbound ( int  iBoundNum) const
inline

Definition at line 941 of file svd_si.h.

948  {

◆ getlowbound() [1/2]

template<class T >
int ap::template_2d_array< T >::getlowbound ( int  iBoundNum) const
inline

Definition at line 928 of file ap.h.

928  : m_iHigh2;
929  };
930 
931  raw_vector<T> getcolumn(int iColumn, int iRowStart, int iRowEnd)

◆ getlowbound() [2/2]

template<class T >
int ap::template_2d_array< T >::getlowbound ( int  iBoundNum) const
inline

Definition at line 936 of file svd_si.h.

936  : m_iHigh2;
937  };
938 
939  raw_vector<T> getcolumn(int iColumn, int iRowStart, int iRowEnd)

◆ getrow() [1/4]

template<class T >
raw_vector<T> ap::template_2d_array< T >::getrow ( int  iRow,
int  iColumnStart,
int  iColumnEnd 
)
inline

Definition at line 946 of file ap.h.

948  {
949  if( (iRowStart>iRowEnd) || wrongColumn(iColumn) || wrongRow(iRowStart) ||wrongRow(iRowEnd) )
950  return const_raw_vector<T>(0, 0, 1);
951  else
952  return const_raw_vector<T>(&((*this)(iRowStart, iColumn)), iRowEnd-iRowStart+1, m_iLinearMember);

◆ getrow() [2/4]

template<class T >
raw_vector<T> ap::template_2d_array< T >::getrow ( int  iRow,
int  iColumnStart,
int  iColumnEnd 
)
inline

Definition at line 954 of file svd_si.h.

956  {
957  if( (iRowStart>iRowEnd) || wrongColumn(iColumn) || wrongRow(iRowStart) ||wrongRow(iRowEnd) )
958  return const_raw_vector<T>(0, 0, 1);
959  else
960  return const_raw_vector<T>(&((*this)(iRowStart, iColumn)), iRowEnd-iRowStart+1, m_iLinearMember);

◆ getrow() [3/4]

template<class T >
const_raw_vector<T> ap::template_2d_array< T >::getrow ( int  iRow,
int  iColumnStart,
int  iColumnEnd 
) const
inline

Definition at line 962 of file ap.h.

962  :
963  bool wrongRow(int i) const { return i<m_iLow1 || i>m_iHigh1; };
964  bool wrongColumn(int j) const { return j<m_iLow2 || j>m_iHigh2; };
965 
966  T *m_Vec;
967  long m_iVecSize;

◆ getrow() [4/4]

template<class T >
const_raw_vector<T> ap::template_2d_array< T >::getrow ( int  iRow,
int  iColumnStart,
int  iColumnEnd 
) const
inline

Definition at line 970 of file svd_si.h.

970  :
971  bool wrongRow(int i) const { return i<m_iLow1 || i>m_iHigh1; };
972  bool wrongColumn(int j) const { return j<m_iLow2 || j>m_iHigh2; };
973 
974  T *m_Vec;
975  long m_iVecSize;

◆ operator()() [1/4]

template<class T >
T& ap::template_2d_array< T >::operator() ( int  i1,
int  i2 
)
inline

Definition at line 888 of file ap.h.

891  {
892  if(m_Vec)
893  delete[] m_Vec;
894  m_iVecSize = (iHigh1-iLow1+1)*(iHigh2-iLow2+1);
895  m_Vec = new T[m_iVecSize];

◆ operator()() [2/4]

template<class T >
T& ap::template_2d_array< T >::operator() ( int  i1,
int  i2 
)
inline

Definition at line 896 of file svd_si.h.

899  {
900  if(m_Vec)
901  delete[] m_Vec;
902  m_iVecSize = (iHigh1-iLow1+1)*(iHigh2-iLow2+1);
903  m_Vec = new T[m_iVecSize];

◆ operator()() [3/4]

template<class T >
const T& ap::template_2d_array< T >::operator() ( int  i1,
int  i2 
) const
inline

Definition at line 879 of file ap.h.

882  {
883  #ifndef NO_AP_ASSERT
886  #endif

◆ operator()() [4/4]

template<class T >
const T& ap::template_2d_array< T >::operator() ( int  i1,
int  i2 
) const
inline

Definition at line 887 of file svd_si.h.

890  {
891  #ifndef NO_AP_ASSERT
894  #endif

◆ operator=() [1/2]

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

Definition at line 850 of file ap.h.

858  {
859  m_Vec = new T[m_iVecSize];
860  #ifndef UNSAFE_MEM_COPY
861  for(int i=0; i<m_iVecSize; i++)
862  m_Vec[i] = rhs.m_Vec[i];
863  #else
864  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
865  #endif
866  }
867  else
868  m_Vec=0;
869  return *this;
870  };
871 
872  const T& operator()(int i1, int i2) const
873  {
874  #ifndef NO_AP_ASSERT
877  #endif

◆ operator=() [2/2]

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

Definition at line 858 of file svd_si.h.

866  {
867  m_Vec = new T[m_iVecSize];
868  #ifndef UNSAFE_MEM_COPY
869  for(int i=0; i<m_iVecSize; i++)
870  m_Vec[i] = rhs.m_Vec[i];
871  #else
872  memcpy(m_Vec, rhs.m_Vec, m_iVecSize*sizeof(T));
873  #endif
874  }
875  else
876  m_Vec=0;
877  return *this;
878  };
879 
880  const T& operator()(int i1, int i2) const
881  {
882  #ifndef NO_AP_ASSERT
885  #endif

◆ setbounds() [1/2]

template<class T >
void ap::template_2d_array< T >::setbounds ( int  iLow1,
int  iHigh1,
int  iLow2,
int  iHigh2 
)
inline

Definition at line 897 of file ap.h.

905  {
906  setbounds(iLow1, iHigh1, iLow2, iHigh2);
907  for(int i=0; i<m_iVecSize; i++)
908  m_Vec[i]=pContent[i];
909  };

◆ setbounds() [2/2]

template<class T >
void ap::template_2d_array< T >::setbounds ( int  iLow1,
int  iHigh1,
int  iLow2,
int  iHigh2 
)
inline

Definition at line 905 of file svd_si.h.

913  {
914  setbounds(iLow1, iHigh1, iLow2, iHigh2);
915  for(int i=0; i<m_iVecSize; i++)
916  m_Vec[i]=pContent[i];
917  };

◆ setcontent() [1/2]

template<class T >
void ap::template_2d_array< T >::setcontent ( int  iLow1,
int  iHigh1,
int  iLow2,
int  iHigh2,
const T pContent 
)
inline

Definition at line 911 of file ap.h.

912  {
913  return m_Vec;
914  };
915 
916  const T* getcontent() const

◆ setcontent() [2/2]

template<class T >
void ap::template_2d_array< T >::setcontent ( int  iLow1,
int  iHigh1,
int  iLow2,
int  iHigh2,
const T pContent 
)
inline

Definition at line 919 of file svd_si.h.

920  {
921  return m_Vec;
922  };
923 
924  const T* getcontent() const

◆ wrongColumn() [1/2]

template<class T >
bool ap::template_2d_array< T >::wrongColumn ( int  j) const
inlineprivate

Definition at line 971 of file ap.h.

◆ wrongColumn() [2/2]

template<class T >
bool ap::template_2d_array< T >::wrongColumn ( int  j) const
inlineprivate

Definition at line 979 of file svd_si.h.

1032 {

◆ wrongRow() [1/2]

template<class T >
bool ap::template_2d_array< T >::wrongRow ( int  i) const
inlineprivate

Definition at line 970 of file ap.h.

◆ wrongRow() [2/2]

template<class T >
bool ap::template_2d_array< T >::wrongRow ( int  i) const
inlineprivate

Definition at line 978 of file svd_si.h.

1032 {

Field Documentation

◆ m_iConstOffset

template<class T >
long ap::template_2d_array< T >::m_iConstOffset
private

Definition at line 976 of file ap.h.

◆ m_iHigh1

template<class T >
long ap::template_2d_array< T >::m_iHigh1
private

Definition at line 975 of file ap.h.

◆ m_iHigh2

template<class T >
long ap::template_2d_array< T >::m_iHigh2
private

Definition at line 975 of file ap.h.

◆ m_iLinearMember

template<class T >
long ap::template_2d_array< T >::m_iLinearMember
private

Definition at line 976 of file ap.h.

◆ m_iLow1

template<class T >
long ap::template_2d_array< T >::m_iLow1
private

Definition at line 975 of file ap.h.

◆ m_iLow2

template<class T >
long ap::template_2d_array< T >::m_iLow2
private

Definition at line 975 of file ap.h.

◆ m_iVecSize

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

Definition at line 974 of file ap.h.

◆ m_Vec

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

Definition at line 973 of file ap.h.


The documentation for this class was generated from the following files:
ap::template_2d_array::getcontent
T * getcontent()
Definition: ap.h:918
ap::template_2d_array::template_2d_array
template_2d_array()
Definition: ap.h:816
j
int j
Definition: facHensel.cc:105
ap::template_2d_array::m_Vec
T * m_Vec
Definition: ap.h:971
ap::template_2d_array::m_iLinearMember
long m_iLinearMember
Definition: ap.h:976
ap::template_2d_array::gethighbound
int gethighbound(int iBoundNum) const
Definition: ap.h:933
ap::template_2d_array::wrongColumn
bool wrongColumn(int j) const
Definition: ap.h:971
ap::template_2d_array::m_iLow1
long m_iLow1
Definition: ap.h:975
ap::template_2d_array::setbounds
void setbounds(int iLow1, int iHigh1, int iLow2, int iHigh2)
Definition: ap.h:897
ap::template_2d_array::m_iHigh2
long m_iHigh2
Definition: ap.h:975
ap::template_2d_array::getcolumn
raw_vector< T > getcolumn(int iColumn, int iRowStart, int iRowEnd)
Definition: ap.h:938
i
int i
Definition: cfEzgcd.cc:125
ap::template_2d_array::wrongRow
bool wrongRow(int i) const
Definition: ap.h:970
T
static jList * T
Definition: janet.cc:31
ap::template_2d_array::m_iLow2
long m_iLow2
Definition: ap.h:975
ap::template_2d_array::m_iVecSize
long m_iVecSize
Definition: ap.h:974
ap::ap_error::make_assertion
static void make_assertion(bool bClause)
Definition: ap.h:61
const
#define const
Definition: fegetopt.c:41
ap::template_2d_array::operator()
const T & operator()(int i1, int i2) const
Definition: ap.h:879
ap::template_2d_array::operator=
const template_2d_array & operator=(const template_2d_array &rhs)
Definition: ap.h:850
ap::template_2d_array::m_iHigh1
long m_iHigh1
Definition: ap.h:975