Vector< T > Class Template Reference

#include <Vector.h>

List of all members.


Detailed Description

template<class T>
class Vector< T >

1-D Vector class.

Definition at line 98 of file Vector.h.

Public Member Functions

 Vector (void)
 Vector (int l)
 Vector (int l, T init)
 Vector (T *_data, int l)
 Vector (Vector< T > &v)
 ~Vector (void)
void Set (T *_data, const int l)
void Clean ()
const T * DataPtr () const
 Useful for passing data to third party libraries.
T * Data ()
 Useful for passing data to third party libraries.
Vector< T > Clone () const
Vector< T > Slice (int start, int end)
const bool IsMemoryManaged () const
const int Length () const
void Init (const T init)
Vector< T > & Rand ()
Vector< T > & Rand (const double max)
Vector< T > & Add (Vector< T > &m)
Vector< T > & Subtract (Vector< T > &m)
Vector< T > & Multiply (Vector< T > &m)
Vector< T > & Divide (Vector< T > &m)
Vector< T > & Add (T v)
Vector< T > & Subtract (T v)
Vector< T > & Multiply (T v)
Vector< T > & Divide (T v)
Vector< T > & operator= (Vector< T > &m)
Vector< T > & operator= (Matrix< T > &m)
Vector< T > & operator= (Array< T > &m)
Vector< T > operator+ ()
Vector< T > operator- ()
Vector< int > operator! ()
T & operator() (const int i)
T & operator[] (const int i)
Vector< T > operator() (int start, int end)
T & Elem (const int i)
 Vector element access. Bounds are checked.
T & ElemNC (const int i)
 Vector element access. Bounds are not checked.
Vector< T > & operator+= (Vector< T > &m)
Vector< T > & operator-= (Vector< T > &m)
Vector< T > & operator *= (Vector< T > &m)
Vector< T > & operator/= (Vector< T > &m)
Vector< T > & operator+= (T v)
Vector< T > & operator-= (T v)
Vector< T > & operator *= (T v)
Vector< T > & operator/= (T v)
 Vector (Array< T > &m)
 Vector (Matrix< T > &m)

Static Public Member Functions

Vector< T > Rand (const int l)
Vector< T > Rand (const int l, const double max)
Inner (Vector< T > &m1, Vector< T > &m2)
Vector< int > And (Vector< T > &m1, Vector< T > &m2)
Vector< int > Or (Vector< T > &m1, Vector< T > &m2)
Vector< int > Lt (Vector< T > &m1, Vector< T > &m2)
Vector< int > Gt (Vector< T > &m1, Vector< T > &m2)
Vector< int > Le (Vector< T > &m1, Vector< T > &m2)
Vector< int > Ge (Vector< T > &m1, Vector< T > &m2)
Vector< int > Eq (Vector< T > &m1, Vector< T > &m2)
Vector< int > Ne (Vector< T > &m1, Vector< T > &m2)
Vector< int > And (Vector< T > &m, T v)
Vector< int > Or (Vector< T > &m, T v)
Vector< int > Lt (Vector< T > &m, T v)
Vector< int > Gt (Vector< T > &m, T v)
Vector< int > Le (Vector< T > &m, T v)
Vector< int > Ge (Vector< T > &m, T v)
Vector< int > Eq (Vector< T > &m, T v)
Vector< int > Ne (Vector< T > &m, T v)
Vector< T > Add (Vector< T > &m1, Vector< T > &m2)
Vector< T > Subtract (Vector< T > &m1, Vector< T > &m2)
Vector< T > Multiply (Vector< T > &m1, Vector< T > &m2)
Vector< T > Divide (Vector< T > &m1, Vector< T > &m2)
Vector< T > Add (Vector< T > &m1, T v2)
Vector< T > Subtract (Vector< T > &m1, T v2)
Vector< T > Subtract (T v2, Vector< T > &m1)
Vector< T > Multiply (Vector< T > &m1, T v2)
Vector< T > Divide (Vector< T > &m1, T v2)
Vector< T > Divide (T v2, Vector< T > &m1)

Protected Attributes

T * data
int length
bool memoryManaged
Cleaner< T > * clean

Friends

class Array<T>
class Matrix<T>
ostream & operator<< (ostream &output, const Vector< T > &v)
operator & (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator && (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator|| (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator< (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator> (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator<= (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator>= (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator== (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator!= (Vector< T > &m1, Vector< T > &m2)
Vector< int > operator && (Vector< T > &m, T v)
Vector< int > operator && (T v, Vector< T > &m)
Vector< int > operator|| (Vector< T > &m, T v)
Vector< int > operator|| (T v, Vector< T > &m)
Vector< int > operator< (Vector< T > &m, T v)
Vector< int > operator< (T v, Vector< T > &m)
Vector< int > operator> (Vector< T > &m, T v)
Vector< int > operator> (T v, Vector< T > &m)
Vector< int > operator<= (Vector< T > &m, T v)
Vector< int > operator<= (T v, Vector< T > &m)
Vector< int > operator>= (Vector< T > &m, T v)
Vector< int > operator>= (T v, Vector< T > &m)
Vector< int > operator== (Vector< T > &m, T v)
Vector< int > operator== (T v, Vector< T > &m)
Vector< int > operator!= (Vector< T > &m, T v)
Vector< int > operator!= (T v, Vector< T > &m)
Vector< T > operator+ (Vector< T > &m1, Vector< T > &m2)
Vector< T > operator- (Vector< T > &m1, Vector< T > &m2)
Vector< T > operator * (Vector< T > &m1, Vector< T > &m2)
Vector< T > operator/ (Vector< T > &m1, Vector< T > &m2)
Vector< T > operator+ (Vector< T > &m, T v)
Vector< T > operator+ (T v, Vector< T > &m)
Vector< T > operator- (Vector< T > &m, T v)
Vector< T > operator- (T v, Vector< T > &m)
Vector< T > operator * (Vector< T > &m, T v)
Vector< T > operator * (T v, Vector< T > &m)
Vector< T > operator/ (Vector< T > &m, T v)
Vector< T > operator/ (T v, Vector< T > &m)


Constructor & Destructor Documentation

template<class T>
Vector< T >::Vector void   ) 
 

Definition at line 62 of file Vector.inl.

References Vector< T >::clean, Vector< T >::data, and Vector< T >::memoryManaged.

00063     : length(0)
00064 {
00065     data = 0;
00066     clean = 0;
00067     memoryManaged = false;
00068 }

template<class T>
Vector< T >::Vector int  l  )  [explicit]
 

Definition at line 72 of file Vector.inl.

References Utility::CheckPointer(), Vector< T >::clean, Vector< T >::data, Vector< T >::length, Vector< T >::memoryManaged, and Utility::RunTimeError().

00073 {
00074     if(l < 1)
00075     {
00076         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00077         Utility::RunTimeError("Vector length should be larger than 0!");
00078     }
00079 
00080     length = l;
00081     data = new T[length];
00082     Utility::CheckPointer(data);
00083 
00084     clean = new Cleaner<T>(data);
00085     memoryManaged = true;
00086 
00087 }

template<class T>
Vector< T >::Vector int  l,
init
 

Definition at line 90 of file Vector.inl.

References Utility::CheckPointer(), Vector< T >::clean, Vector< T >::data, Vector< T >::length, Vector< T >::memoryManaged, and Utility::RunTimeError().

00091 {
00092     if(l < 1)
00093     {
00094         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00095         Utility::RunTimeError("Vector length should be larger than 0!");
00096     }
00097 
00098     length = l;
00099     data = new T[length];
00100     Utility::CheckPointer(data);
00101 
00102     clean = new Cleaner<T>(data);
00103     memoryManaged = true;
00104     for(int i=0;i<length;i++)
00105     {
00106         data[i] = init;
00107     }
00108 
00109 }

template<class T>
Vector< T >::Vector T *  _data,
int  l
 

Definition at line 113 of file Vector.inl.

References Vector< T >::clean, Vector< T >::data, Vector< T >::length, Vector< T >::memoryManaged, and Utility::RunTimeError().

00114 {
00115     if(l < 1)
00116     {
00117         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00118         Utility::RunTimeError("Vector length should be larger than 0!");
00119     }
00120 
00121     length = l;
00122     data = _data;
00123     clean = 0;
00124     memoryManaged = false;
00125 
00126 }

template<class T>
Vector< T >::Vector Vector< T > &  v  ) 
 

Definition at line 131 of file Vector.inl.

References Vector< T >::clean, Vector< T >::data, Vector< T >::length, Vector< T >::memoryManaged, and Utility::RunTimeError().

00132 {
00133     length = m.length;
00134 
00135     data = m.data;
00136 
00137     if(m.memoryManaged == true)
00138     {
00139         clean = new Cleaner<T>(data);
00140         memoryManaged = true;
00141     }
00142     else
00143     {
00144         Utility::RunTimeError("Using copy constructor from an unmanaged vector is not allowed!\nUse Clone() instead.");
00145     }
00146 
00147 }

template<class T>
Vector< T >::~Vector void   ) 
 

Definition at line 152 of file Vector.inl.

References Vector< T >::clean, and Vector< T >::memoryManaged.

00153 {
00154 
00155     if(clean != 0 && memoryManaged == true)
00156     {
00157         delete clean;
00158     }
00159 }

template<class T>
Vector< T >::Vector Array< T > &  m  ) 
 

Definition at line 1179 of file Vector.inl.

References Vector< T >::clean, Array< T >::data, Vector< T >::data, Array< T >::length, Vector< T >::length, and Vector< T >::memoryManaged.

01180 {
01181     length = m.length;
01182     
01183     data = m.data;
01184     
01185     clean = new Cleaner<T>(data);
01186     
01187     memoryManaged = true;
01188 
01189 }

template<class T>
Vector< T >::Vector Matrix< T > &  m  ) 
 

Definition at line 1163 of file Vector.inl.

References Vector< T >::clean, Matrix< T >::data, Vector< T >::data, Matrix< T >::length, Vector< T >::length, and Vector< T >::memoryManaged.

01164 {
01165     length = m.length;
01166     
01167     data = m.data;
01168     
01169     clean = new Cleaner<T>(data);
01170     
01171     memoryManaged = true;
01172     
01173 }


Member Function Documentation

template<class T>
Vector< T > & Vector< T >::Add v  ) 
 

Definition at line 884 of file Vector.inl.

References Vector< T >::data.

00885 {
00886     for(int i=0;i<this->length;i++)
00887     {
00888         this->data[i] += v;
00889     }
00890     return *this;
00891 }

template<class T>
Vector< T > & Vector< T >::Add Vector< T > &  m  ) 
 

Definition at line 807 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00808 {
00809     if(length != m.length)
00810     {
00811         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00812         Utility::RunTimeError("Vector lengths are not the same!");
00813     }
00814 
00815     for(int i=0;i<this->length;i++)
00816     {
00817         this->data[i] += m.data[i];
00818     }
00819     
00820     return *this;
00821 }

template<class T>
Vector< T > Vector< T >::Add Vector< T > &  m1,
v2
[static]
 

Definition at line 723 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00724 {
00725     Vector<T> temp(m1.length);
00726     for(int i=0;i<temp.length;i++)
00727     {
00728         temp.data[i] = m1.data[i] + v2;
00729     }
00730     return temp;
00731 }

template<class T>
Vector< T > Vector< T >::Add Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 639 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

Referenced by Vector< T >::operator+=().

00640 {
00641     if(m1.length != m2.length)
00642     {
00643         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00644         Utility::RunTimeError("Vector lengths are not the same!");
00645     }
00646 
00647     Vector<T> temp(m1.length);
00648     for(int i=0;i<temp.length;i++)
00649     {
00650         temp.data[i] = m1.data[i] + m2.data[i];
00651     }
00652     
00653     return temp;
00654 }

template<class T>
Vector< int > Vector< T >::And Vector< T > &  m,
v
[static]
 

Definition at line 519 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00520 {
00521     Vector<int> temp(m1.length);
00522     for(int i=0;i<temp.length;i++)
00523     {
00524         temp[i] = (m1.data[i] != 0 && v != 0) ? 1 : 0;
00525     }
00526     
00527     return temp;
00528 }

template<class T>
Vector< int > Vector< T >::And Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 370 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00371 {
00372     if(m1.length != m2.length)
00373     {
00374         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00375         Utility::RunTimeError("Vector lengths are not the same!");
00376     }
00377 
00378     Vector<int> temp(m1.length);
00379     for(int i=0;i<temp.length;i++)
00380     {
00381         temp[i] = (m1.data[i] != 0 && m2.data[i] != 0) ? 1 : 0;
00382     }
00383     
00384     return temp;
00385 }

template<class T>
void Vector< T >::Clean  ) 
 

Definition at line 182 of file Vector.inl.

References Vector< T >::clean, Vector< T >::data, and Vector< T >::memoryManaged.

00183 {
00184     if(clean != 0 && memoryManaged == true)
00185     {
00186         delete clean;
00187         data = 0;
00188         clean = 0;
00189     }
00190 }

template<class T>
Vector< T > Vector< T >::Clone  )  const
 

Definition at line 211 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

Referenced by Conj().

00212 {
00213     Vector<T> temp(length);
00214     
00215     //memcopy here...
00216     for(int j=0;j<temp.length;j++)
00217     {
00218         temp.data[j] = data[j];
00219     }
00220 
00221     return temp;
00222 }

template<class T>
T * Vector< T >::Data  )  [inline]
 

Useful for passing data to third party libraries.

Definition at line 203 of file Vector.inl.

Referenced by Conj(), and Vector< T >::operator!().

00204 {
00205     return data;
00206 }

template<class T>
const T * Vector< T >::DataPtr  )  const [inline]
 

Useful for passing data to third party libraries.

Definition at line 196 of file Vector.inl.

00197 {
00198     return data;
00199 }

template<class T>
Vector< T > & Vector< T >::Divide v  ) 
 

Definition at line 914 of file Vector.inl.

References Vector< T >::data, and Utility::RunTimeError().

00915 {
00916     if(v == 0)
00917     {
00918         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00919         Utility::RunTimeError("Divide by zero in vector by value division!");
00920     }
00921     
00922     for(int i=0;i<this->length;i++)
00923     {
00924         this->data[i] /= v;
00925     }
00926     return *this;
00927 }

template<class T>
Vector< T > & Vector< T >::Divide Vector< T > &  m  ) 
 

Definition at line 858 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00859 {
00860     if(length != m.length)
00861     {
00862         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00863         Utility::RunTimeError("Vector lengths are not the same!");
00864     }
00865 
00866     for(int i=0;i<this->length;i++)
00867     {
00868         if(m.data[i] != 0)
00869         {
00870             this->data[i] /= m.data[i];
00871         }
00872         else
00873         {
00874             cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00875             Utility::RunTimeError("Divide by zero in vector division!");
00876         }
00877     }
00878     
00879     return *this;
00880 }

template<class T>
Vector< T > Vector< T >::Divide v2,
Vector< T > &  m1
[static]
 

Definition at line 785 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00786 {
00787     Vector<T> temp(m1.length);
00788     for(int i=0;i<temp.length;i++)
00789     {
00790         if(m1.data[i] != 0)
00791         {
00792             temp.data[i] = v2 / m1.data[i];
00793         }
00794         else
00795         {
00796             cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00797             Utility::RunTimeError("Divide by zero in value by vector division!");
00798         }
00799     }
00800     return temp;
00801 }

template<class T>
Vector< T > Vector< T >::Divide Vector< T > &  m1,
v2
[static]
 

Definition at line 768 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00769 {
00770     if(v2 == 0)
00771     {
00772         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00773         Utility::RunTimeError("Divide by zero in vector by value division!");
00774     }
00775 
00776     Vector<T> temp(m1.length);
00777     for(int i=0;i<temp.length;i++)
00778     {
00779         temp.data[i] = m1.data[i] / v2;
00780     }
00781     return temp;
00782 }

template<class T>
Vector< T > Vector< T >::Divide Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 694 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

Referenced by Vector< T >::operator/=().

00695 {
00696     if(m1.length != m2.length)
00697     {
00698         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00699         Utility::RunTimeError("Vector lengths are not the same!");
00700     }
00701 
00702     Vector<T> temp(m1.length);
00703     for(int i=0;i<temp.length;i++)
00704     {
00705         //catch division exception instead...
00706         if(m2.data[i] != 0)
00707         {
00708             temp.data[i] = m1.data[i] / m2.data[i];
00709         }
00710         else
00711         {
00712             cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00713             Utility::RunTimeError("Divide by zero in vector division!");
00714         }
00715     }
00716     
00717     return temp;
00718 }

template<class T>
T & Vector< T >::Elem const int  i  )  [inline]
 

Vector element access. Bounds are checked.

Definition at line 1084 of file Vector.inl.

References Vector< T >::data, and Utility::RunTimeError().

01085 {
01086     if(i<0 || i>=length)
01087     {
01088         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01089         Utility::RunTimeError("Index outside bounds!");
01090     }
01091     return data[i];
01092 }

template<class T>
T & Vector< T >::ElemNC const int  i  )  [inline]
 

Vector element access. Bounds are not checked.

Definition at line 1096 of file Vector.inl.

References Vector< T >::data.

01097 {
01098     return data[i];
01099 }

template<class T>
Vector< int > Vector< T >::Eq Vector< T > &  m,
v
[static]
 

Definition at line 597 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00598 {
00599     Vector<int> temp(m1.length);
00600     for(int i=0;i<temp.length;i++)
00601     {
00602         temp[i] = (m1.data[i] == v) ? 1 : 0;
00603     }
00604     
00605     return temp;
00606 }

template<class T>
Vector< int > Vector< T >::Eq Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 478 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00479 {
00480     if(m1.length != m2.length)
00481     {
00482         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00483         Utility::RunTimeError("Vector lengths are not the same!");
00484     }
00485 
00486     Vector<int> temp(m1.length);
00487     for(int i=0;i<temp.length;i++)
00488     {
00489         temp[i] = (m1.data[i] == m2.data[i]) ? 1 : 0;
00490     }
00491     
00492     return temp;
00493 }

template<class T>
Vector< int > Vector< T >::Ge Vector< T > &  m,
v
[static]
 

Definition at line 584 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00585 {
00586     Vector<int> temp(m1.length);
00587     for(int i=0;i<temp.length;i++)
00588     {
00589         temp[i] = (m1.data[i] >= v) ? 1 : 0;
00590     }
00591     
00592     return temp;
00593 }

template<class T>
Vector< int > Vector< T >::Ge Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 460 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00461 {
00462     if(m1.length != m2.length)
00463     {
00464         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00465         Utility::RunTimeError("Vector lengths are not the same!");
00466     }
00467 
00468     Vector<int> temp(m1.length);
00469     for(int i=0;i<temp.length;i++)
00470     {
00471         temp[i] = (m1.data[i] >= m2.data[i]) ? 1 : 0;
00472     }
00473     
00474     return temp;
00475 }

template<class T>
Vector< int > Vector< T >::Gt Vector< T > &  m,
v
[static]
 

Definition at line 558 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00559 {
00560     Vector<int> temp(m1.length);
00561     for(int i=0;i<temp.length;i++)
00562     {
00563         temp[i] = (m1.data[i] > v) ? 1 : 0;
00564     }
00565     
00566     return temp;
00567 }

template<class T>
Vector< int > Vector< T >::Gt Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 424 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00425 {
00426     if(m1.length != m2.length)
00427     {
00428         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00429         Utility::RunTimeError("Vector lengths are not the same!");
00430     }
00431 
00432     Vector<int> temp(m1.length);
00433     for(int i=0;i<temp.length;i++)
00434     {
00435         temp[i] = (m1.data[i] > m2.data[i]) ? 1 : 0;
00436     }
00437     
00438     return temp;
00439 }

template<class T>
void Vector< T >::Init const T  init  )  [inline]
 

Definition at line 264 of file Vector.inl.

References Vector< T >::data.

Referenced by Matrix< T >::MMultiply().

00265 {
00266     for(int i=0;i<length;i++)
00267     {
00268         data[i] = init;
00269     }
00270 }

template<class T>
T Vector< T >::Inner Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 339 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00340 {
00341     if(m1.length != m2.length)
00342     {
00343         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00344         Utility::RunTimeError("Vector lengths are not the same!");
00345     }
00346 
00347     T inner = 0;
00348     for(int i=0; i<m1.length; i++)
00349     {
00350         inner += m1.data[i]*m2.data[i];
00351     }
00352     
00353     return inner;
00354 }

template<class T>
const bool Vector< T >::IsMemoryManaged  )  const [inline]
 

Definition at line 247 of file Vector.inl.

00248 {
00249     return memoryManaged;
00250 }

template<class T>
Vector< int > Vector< T >::Le Vector< T > &  m,
v
[static]
 

Definition at line 571 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00572 {
00573     Vector<int> temp(m1.length);
00574     for(int i=0;i<temp.length;i++)
00575     {
00576         temp[i] = (m1.data[i] <= v) ? 1 : 0;
00577     }
00578     
00579     return temp;
00580 }

template<class T>
Vector< int > Vector< T >::Le Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 442 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00443 {
00444     if(m1.length != m2.length)
00445     {
00446         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00447         Utility::RunTimeError("Vector lengths are not the same!");
00448     }
00449 
00450     Vector<int> temp(m1.length);
00451     for(int i=0;i<temp.length;i++)
00452     {
00453         temp[i] = (m1.data[i] <= m2.data[i]) ? 1 : 0;
00454     }
00455     
00456     return temp;
00457 }

template<class T>
const int Vector< T >::Length  )  const [inline]
 

Definition at line 255 of file Vector.inl.

Referenced by Complex(), Conj(), Imag(), Real(), ToComplexDouble(), ToComplexFloat(), and ToDouble().

00256 {
00257     return length;
00258 }

template<class T>
Vector< int > Vector< T >::Lt Vector< T > &  m,
v
[static]
 

Definition at line 545 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00546 {
00547     Vector<int> temp(m1.length);
00548     for(int i=0;i<temp.length;i++)
00549     {
00550         temp[i] = (m1.data[i] < v) ? 1 : 0;
00551     }
00552     
00553     return temp;
00554 }

template<class T>
Vector< int > Vector< T >::Lt Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 406 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00407 {
00408     if(m1.length != m2.length)
00409     {
00410         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00411         Utility::RunTimeError("Vector lengths are not the same!");
00412     }
00413 
00414     Vector<int> temp(m1.length);
00415     for(int i=0;i<temp.length;i++)
00416     {
00417         temp[i] = (m1.data[i] < m2.data[i]) ? 1 : 0;
00418     }
00419     
00420     return temp;
00421 }

template<class T>
Vector< T > & Vector< T >::Multiply v  ) 
 

Definition at line 904 of file Vector.inl.

References Vector< T >::data.

00905 {
00906     for(int i=0;i<this->length;i++)
00907     {
00908         this->data[i] *= v;
00909     }
00910     return *this;
00911 }

template<class T>
Vector< T > & Vector< T >::Multiply Vector< T > &  m  ) 
 

Definition at line 841 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00842 {
00843     if(length != m.length)
00844     {
00845         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00846         Utility::RunTimeError("Vector lengths are not the same!");
00847     }
00848 
00849     for(int i=0;i<this->length;i++)
00850     {
00851         this->data[i] *= m.data[i];
00852     }
00853     
00854     return *this;
00855 }

template<class T>
Vector< T > Vector< T >::Multiply Vector< T > &  m1,
v2
[static]
 

Definition at line 757 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00758 {
00759     Vector<T> temp(m1.length);
00760     for(int i=0;i<temp.length;i++)
00761     {
00762         temp.data[i] = m1.data[i] * v2;
00763     }
00764     return temp;
00765 }

template<class T>
Vector< T > Vector< T >::Multiply Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 676 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

Referenced by Vector< T >::operator *=().

00677 {
00678     if(m1.length != m2.length)
00679     {
00680         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00681         Utility::RunTimeError("Vector lengths are not the same!");
00682     }
00683 
00684     Vector<T> temp(m1.length);
00685     for(int i=0;i<temp.length;i++)
00686     {
00687         temp.data[i] = m1.data[i] * m2.data[i];
00688     }
00689     
00690     return temp;
00691 }

template<class T>
Vector< int > Vector< T >::Ne Vector< T > &  m,
v
[static]
 

Definition at line 610 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00611 {
00612     Vector<int> temp(m1.length);
00613     for(int i=0;i<temp.length;i++)
00614     {
00615         temp[i] = (m1.data[i] != v) ? 1 : 0;
00616     }
00617     
00618     return temp;
00619 }

template<class T>
Vector< int > Vector< T >::Ne Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 496 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00497 {
00498     if(m1.length != m2.length)
00499     {
00500         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00501         Utility::RunTimeError("Vector lengths are not the same!");
00502     }
00503 
00504     Vector<int> temp(m1.length);
00505     for(int i=0;i<temp.length;i++)
00506     {
00507         temp[i] = (m1.data[i] != m2.data[i]) ? 1 : 0;
00508     }
00509     
00510     return temp;
00511 }

template<class T>
Vector< T > & Vector< T >::operator *= v  ) 
 

Definition at line 1146 of file Vector.inl.

References Vector< T >::Multiply().

01147 {
01148     return this->Multiply(v);
01149 }

template<class T>
Vector< T > & Vector< T >::operator *= Vector< T > &  m  ) 
 

Definition at line 1121 of file Vector.inl.

References Vector< T >::Multiply().

01122 {
01123     return this->Multiply(m);
01124 }

template<class T>
Vector< int > Vector< T >::operator!  )  [inline]
 

Definition at line 1006 of file Vector.inl.

References Vector< T >::Data(), and Vector< T >::data.

01007 {
01008     Vector<int> temp(yDim, xDim);
01009     for(int i=0;i<length;i++)
01010     {
01011         if(data[i] == 0)
01012         {
01013             temp.Data()[i] = 1;
01014         }
01015         else
01016         {
01017             temp.Data()[i] = 0;
01018         }
01019     }
01020     return temp;
01021 }

template<class T>
Vector< T > Vector< T >::operator() int  start,
int  end
[inline]
 

Definition at line 1049 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

01050 {
01051 
01052     if(start<0 || start>=length || end<0 || end>=length)
01053     {
01054         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01055         Utility::RunTimeError("Index outside bounds!");
01056     }
01057     
01058     if(start > end)
01059     {
01060         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01061         Utility::RunTimeError("Second slice parameter cannot be less than the first parameter!");
01062     }
01063     
01064     Vector<T> temp(end-start+1);
01065     //memcopy here...
01066     for(int i=start; i<=end; i++)
01067     {
01068         temp[i-start] = data[i];
01069     }
01070 
01071     return temp;
01072 }

template<class T>
T & Vector< T >::operator() const int  i  )  [inline]
 

Definition at line 1027 of file Vector.inl.

References Vector< T >::data, and Utility::RunTimeError().

01028 {
01029     if(i<0 || i>=length)
01030     {
01031         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01032         Utility::RunTimeError("Index outside bounds!");
01033     }
01034     return data[i];
01035 }

template<class T>
Vector< T > Vector< T >::operator+  )  [inline]
 

Definition at line 987 of file Vector.inl.

00988 {
00989     return *this;
00990 }

template<class T>
Vector< T > & Vector< T >::operator+= v  ) 
 

Definition at line 1134 of file Vector.inl.

References Vector< T >::Add().

01135 {
01136     return this->Add(v);
01137 }

template<class T>
Vector< T > & Vector< T >::operator+= Vector< T > &  m  ) 
 

Definition at line 1109 of file Vector.inl.

References Vector< T >::Add().

01110 {
01111     return this->Add(m);
01112 }

template<class T>
Vector< T > Vector< T >::operator-  )  [inline]
 

Definition at line 994 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00995 {
00996     Vector<T> temp(length);
00997     for(int i=0;i<length;i++)
00998     {
00999         temp.data[i] = - data[i];
01000     }
01001     return temp;
01002 }

template<class T>
Vector< T > & Vector< T >::operator-= v  ) 
 

Definition at line 1140 of file Vector.inl.

References Vector< T >::Subtract().

01141 {
01142     return this->Subtract(v);
01143 }

template<class T>
Vector< T > & Vector< T >::operator-= Vector< T > &  m  ) 
 

Definition at line 1115 of file Vector.inl.

References Vector< T >::Subtract().

01116 {
01117     return this->Subtract(m);
01118 }

template<class T>
Vector< T > & Vector< T >::operator/= v  ) 
 

Definition at line 1152 of file Vector.inl.

References Vector< T >::Divide().

01153 {
01154     return this->Divide(v);
01155 }

template<class T>
Vector< T > & Vector< T >::operator/= Vector< T > &  m  ) 
 

Definition at line 1127 of file Vector.inl.

References Vector< T >::Divide().

01128 {
01129     return this->Divide(m);
01130 }

template<class T>
Vector< T > & Vector< T >::operator= Array< T > &  m  ) 
 

Definition at line 958 of file Vector.inl.

References Vector< T >::clean, Array< T >::data, Vector< T >::data, Array< T >::length, Vector< T >::length, and Vector< T >::memoryManaged.

00959 {
00960     length = m.length;
00961     
00962     data = m.data;
00963     clean = new Cleaner(data);
00964     
00965     memoryManaged = true;
00966 
00967     return *this;
00968 }

template<class T>
Vector< T > & Vector< T >::operator= Matrix< T > &  m  ) 
 

Definition at line 971 of file Vector.inl.

References Vector< T >::clean, Matrix< T >::data, Vector< T >::data, Matrix< T >::length, Vector< T >::length, and Vector< T >::memoryManaged.

00972 {
00973     length = m.length;
00974     
00975     data = m.data;
00976     clean = new Cleaner(data);
00977     
00978     memoryManaged = true;
00979 
00980     return *this;
00981 }

template<class T>
Vector< T > & Vector< T >::operator= Vector< T > &  m  ) 
 

Definition at line 935 of file Vector.inl.

References Vector< T >::clean, Vector< T >::data, Vector< T >::length, Vector< T >::memoryManaged, and Utility::RunTimeError().

00936 {
00937     length = m.length;
00938     
00939     data = m.data;
00940     
00941     
00942     if(m.memoryManaged == true)
00943     {
00944         delete clean;
00945         clean = new Cleaner<T>(data);
00946         memoryManaged = true;
00947     }
00948     else
00949     {
00950         Utility::RunTimeError("Assignment of an unmanaged vector to another vector is not allowed!\nUse Clone() instead.");
00951     }
00952     
00953     return *this;
00954 }

template<class T>
T & Vector< T >::operator[] const int  i  )  [inline]
 

Definition at line 1039 of file Vector.inl.

References Vector< T >::data.

01040 {
01041     return data[i];
01042 }

template<class T>
Vector< int > Vector< T >::Or Vector< T > &  m,
v
[static]
 

Definition at line 532 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00533 {
00534     Vector<int> temp(m1.length);
00535     for(int i=0;i<temp.length;i++)
00536     {
00537         temp[i] = (m1.data[i] == 0 && v == 0) ? 0 : 1;
00538     }
00539     
00540     return temp;
00541 }

template<class T>
Vector< int > Vector< T >::Or Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 388 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00389 {
00390     if(m1.length != m2.length)
00391     {
00392         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00393         Utility::RunTimeError("Vector lengths are not the same!");
00394     }
00395 
00396     Vector<int> temp(m1.length);
00397     for(int i=0;i<temp.length;i++)
00398     {
00399         temp[i] = (m1.data[i] == 0 && m2.data[i] == 0) ? 0 : 1;
00400     }
00401     
00402     return temp;
00403 }

template<class T>
Vector< T > Vector< T >::Rand const int  l,
const double  max
[static]
 

Definition at line 319 of file Vector.inl.

References Vector< T >::data, RandomGen::Initialize(), and RandomGen::Initialized().

00320 {
00321     Vector<T> m(l);
00322     if(!RandomGen::Initialized())
00323     {
00324         RandomGen::Initialize();
00325     }
00326     for(int i=0;i<l;i++)
00327     {
00328         m.data[i] = (T)(rand()/(double)RAND_MAX*max);
00329     }
00330     return m;
00331 }

template<class T>
Vector< T > Vector< T >::Rand const int  l  )  [static]
 

Definition at line 303 of file Vector.inl.

References Vector< T >::data, RandomGen::Initialize(), and RandomGen::Initialized().

00304 {
00305     Vector<T> m(l);
00306     if(!RandomGen::Initialized())
00307     {
00308         RandomGen::Initialize();
00309     }
00310     for(int i=0;i<l;i++)
00311     {
00312         m.data[i] = (T)rand();
00313     }
00314     return m;
00315 }

template<class T>
Vector< T > & Vector< T >::Rand const double  max  )  [inline]
 

Definition at line 288 of file Vector.inl.

References Vector< T >::data, RandomGen::Initialize(), and RandomGen::Initialized().

00289 {
00290     if(!RandomGen::Initialized())
00291     {
00292         RandomGen::Initialize();
00293     }
00294     for(int i=0;i<length;i++)
00295     {
00296         data[i] = (T)(rand()/(double)RAND_MAX*max);
00297     }
00298     return *this;
00299 }

template<class T>
Vector< T > & Vector< T >::Rand  )  [inline]
 

Definition at line 273 of file Vector.inl.

References Vector< T >::data, RandomGen::Initialize(), and RandomGen::Initialized().

00274 {
00275     if(!RandomGen::Initialized())
00276     {
00277         RandomGen::Initialize();
00278     }
00279     for(int i=0;i<length;i++)
00280     {
00281         data[i] = (T)rand();
00282     }
00283     return *this;
00284 }

template<class T>
void Vector< T >::Set T *  _data,
const int  l
 

Definition at line 164 of file Vector.inl.

References Vector< T >::clean, Vector< T >::data, Vector< T >::length, Vector< T >::memoryManaged, and Utility::RunTimeError().

Referenced by Matrix< T >::Matrix().

00165 {
00166     if(l < 1)
00167     {
00168         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00169         Utility::RunTimeError("Vector length should be larger than 0!");
00170     }
00171 
00172     length = l;
00173     data = _data;
00174     delete clean;
00175     clean = 0;
00176     memoryManaged = false;
00177 
00178 }

template<class T>
Vector< T > Vector< T >::Slice int  start,
int  end
 

Definition at line 226 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00227 {
00228     if(start<0 || start>=length || end<0 || end>=length)
00229     {
00230         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00231         Utility::RunTimeError("Index outside bounds!");
00232     }
00233     if(start > end)
00234     {
00235         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00236         Utility::RunTimeError("Second slice parameter cannot be less than the first parameter!");
00237     }
00238 
00239 
00240     Vector<T> temp(&(data[start]), end-start+1);
00241     return temp;
00242 }

template<class T>
Vector< T > & Vector< T >::Subtract v  ) 
 

Definition at line 894 of file Vector.inl.

References Vector< T >::data.

00895 {
00896     for(int i=0;i<this->length;i++)
00897     {
00898         this->data[i] -= v;
00899     }
00900     return *this;
00901 }

template<class T>
Vector< T > & Vector< T >::Subtract Vector< T > &  m  ) 
 

Definition at line 824 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

00825 {
00826     if(length != m.length)
00827     {
00828         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00829         Utility::RunTimeError("Vector lengths are not the same!");
00830     }
00831 
00832     for(int i=0;i<this->length;i++)
00833     {
00834         this->data[i] -= m.data[i];
00835     }
00836     
00837     return *this;
00838 }

template<class T>
Vector< T > Vector< T >::Subtract v2,
Vector< T > &  m1
[static]
 

Definition at line 745 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00746 {
00747     Vector<T> temp(m1.length);
00748     for(int i=0;i<temp.length;i++)
00749     {
00750         temp.data[i] = v2 - m1.data[i];
00751     }
00752     return temp;
00753 }

template<class T>
Vector< T > Vector< T >::Subtract Vector< T > &  m1,
v2
[static]
 

Definition at line 734 of file Vector.inl.

References Vector< T >::data, and Vector< T >::length.

00735 {
00736     Vector<T> temp(m1.length);
00737     for(int i=0;i<temp.length;i++)
00738     {
00739         temp.data[i] = m1.data[i] - v2;
00740     }
00741     return temp;
00742 }

template<class T>
Vector< T > Vector< T >::Subtract Vector< T > &  m1,
Vector< T > &  m2
[static]
 

Definition at line 658 of file Vector.inl.

References Vector< T >::data, Vector< T >::length, and Utility::RunTimeError().

Referenced by Vector< T >::operator-=().

00659 {
00660     if(m1.length != m2.length)
00661     {
00662         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00663         Utility::RunTimeError("Vector lengths are not the same!");
00664     }
00665 
00666     Vector<T> temp(m1.length);
00667     for(int i=0;i<temp.length;i++)
00668     {
00669         temp.data[i] = m1.data[i] - m2.data[i];
00670     }
00671     
00672     return temp;
00673 }


Friends And Related Function Documentation

template<class T>
friend class Array<T> [friend]
 

Definition at line 100 of file Vector.h.

template<class T>
friend class Matrix<T> [friend]
 

Definition at line 101 of file Vector.h.

template<class T>
T operator & Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 238 of file Vector.h.

00239     {
00240         return Vector<T>::Inner(m1, m2);
00241     }

template<class T>
Vector<int> operator && v,
Vector< T > &  m
[friend]
 

Definition at line 291 of file Vector.h.

00292     {
00293         return Vector<T>::And(m, v);
00294     }

template<class T>
Vector<int> operator && Vector< T > &  m,
v
[friend]
 

Definition at line 287 of file Vector.h.

00288     {
00289         return Vector<T>::And(m, v);
00290     }

template<class T>
Vector<int> operator && Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 245 of file Vector.h.

00246     {
00247         return Vector<T>::And(m1, m2);
00248     }

template<class T>
Vector<T> operator * v,
Vector< T > &  m
[friend]
 

Definition at line 409 of file Vector.h.

00410     {
00411         return Vector<T>::Multiply(m, v);
00412     }

template<class T>
Vector<T> operator * Vector< T > &  m,
v
[friend]
 

Definition at line 404 of file Vector.h.

00405     {
00406         return Vector<T>::Multiply(m, v);
00407     }

template<class T>
Vector<T> operator * Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 372 of file Vector.h.

00373     {
00374         return Vector<T>::Multiply(m1, m2);
00375     }

template<class T>
Vector<int> operator!= v,
Vector< T > &  m
[friend]
 

Definition at line 354 of file Vector.h.

00355     {
00356         return Vector<T>::Ne(m, v);
00357     }

template<class T>
Vector<int> operator!= Vector< T > &  m,
v
[friend]
 

Definition at line 350 of file Vector.h.

00351     {
00352         return Vector<T>::Ne(m, v);
00353     }

template<class T>
Vector<int> operator!= Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 280 of file Vector.h.

00281     {
00282         return Vector<T>::Ne(m1, m2);
00283     }

template<class T>
Vector<T> operator+ v,
Vector< T > &  m
[friend]
 

Definition at line 389 of file Vector.h.

00390     {
00391         return Vector<T>::Add(m, v);
00392     }

template<class T>
Vector<T> operator+ Vector< T > &  m,
v
[friend]
 

Definition at line 384 of file Vector.h.

00385     {
00386         return Vector<T>::Add(m, v);
00387     }

template<class T>
Vector<T> operator+ Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 362 of file Vector.h.

00363     {
00364         return Vector<T>::Add(m1, m2);
00365     }

template<class T>
Vector<T> operator- v,
Vector< T > &  m
[friend]
 

Definition at line 399 of file Vector.h.

00400     {
00401         return Vector<T>::Subtract(v, m);
00402     }

template<class T>
Vector<T> operator- Vector< T > &  m,
v
[friend]
 

Definition at line 394 of file Vector.h.

00395     {
00396         return Vector<T>::Subtract(m, v);
00397     }

template<class T>
Vector<T> operator- Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 367 of file Vector.h.

00368     {
00369         return Vector<T>::Subtract(m1, m2);
00370     }

template<class T>
Vector<T> operator/ v,
Vector< T > &  m
[friend]
 

Definition at line 419 of file Vector.h.

00420     {
00421         return Vector<T>::Divide(v, m);
00422     }

template<class T>
Vector<T> operator/ Vector< T > &  m,
v
[friend]
 

Definition at line 414 of file Vector.h.

00415     {
00416         return Vector<T>::Divide(m, v);
00417     }

template<class T>
Vector<T> operator/ Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 377 of file Vector.h.

00378     {
00379         return Vector<T>::Divide(m1, m2);
00380     }

template<class T>
Vector<int> operator< v,
Vector< T > &  m
[friend]
 

Definition at line 309 of file Vector.h.

00310     {
00311         return Vector<T>::Gt(m, v);
00312     }

template<class T>
Vector<int> operator< Vector< T > &  m,
v
[friend]
 

Definition at line 305 of file Vector.h.

00306     {
00307         return Vector<T>::Lt(m, v);
00308     }

template<class T>
Vector<int> operator< Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 255 of file Vector.h.

00256     {
00257         return Vector<T>::Lt(m1, m2);
00258     }

template<class T>
ostream& operator<< ostream &  output,
const Vector< T > &  v
[friend]
 

Definition at line 199 of file Vector.h.

00200     {
00201         int lm = v.Length();
00202         int rowNoWidth = (int)log10((double)(lm-1))+2;
00203         int maxLength  = 1;
00204         for(int i=0; i<v.Length(); i++)
00205         {
00206             ostringstream oS;
00207             oS << v.data[i];
00208             int l = (int)oS.str().length();
00209             if(l>maxLength)
00210             {
00211                 maxLength = l;
00212             }
00213         }
00214 
00215         output << typeid(v).name() << " of size " << v.length << endl;
00216         output << "----------------------" << endl;
00217         for(int i=0;i<v.length;i++)
00218         {
00219             output << "ROW" << setw(rowNoWidth) << i+1 << "|" << right << setw(maxLength+3) << v.data[i] << " |" << endl;
00220         }
00221         output << "----------------------" << endl;
00222         output << endl;
00223         return output;
00224     }

template<class T>
Vector<int> operator<= v,
Vector< T > &  m
[friend]
 

Definition at line 327 of file Vector.h.

00328     {
00329         return Vector<T>::Ge(m, v);
00330     }

template<class T>
Vector<int> operator<= Vector< T > &  m,
v
[friend]
 

Definition at line 323 of file Vector.h.

00324     {
00325         return Vector<T>::Le(m, v);
00326     }

template<class T>
Vector<int> operator<= Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 265 of file Vector.h.

00266     {
00267         return Vector<T>::Le(m1, m2);
00268     }

template<class T>
Vector<int> operator== v,
Vector< T > &  m
[friend]
 

Definition at line 345 of file Vector.h.

00346     {
00347         return Vector<T>::Eq(m, v);
00348     }

template<class T>
Vector<int> operator== Vector< T > &  m,
v
[friend]
 

Definition at line 341 of file Vector.h.

00342     {
00343         return Vector<T>::Eq(m, v);
00344     }

template<class T>
Vector<int> operator== Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 275 of file Vector.h.

00276     {
00277         return Vector<T>::Eq(m1, m2);
00278     }

template<class T>
Vector<int> operator> v,
Vector< T > &  m
[friend]
 

Definition at line 318 of file Vector.h.

00319     {
00320         return Vector<T>::Lt(m, v);
00321     }

template<class T>
Vector<int> operator> Vector< T > &  m,
v
[friend]
 

Definition at line 314 of file Vector.h.

00315     {
00316         return Vector<T>::Gt(m, v);
00317     }

template<class T>
Vector<int> operator> Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 260 of file Vector.h.

00261     {
00262         return Vector<T>::Gt(m1, m2);
00263     }

template<class T>
Vector<int> operator>= v,
Vector< T > &  m
[friend]
 

Definition at line 336 of file Vector.h.

00337     {
00338         return Vector<T>::Le(m, v);
00339     }

template<class T>
Vector<int> operator>= Vector< T > &  m,
v
[friend]
 

Definition at line 332 of file Vector.h.

00333     {
00334         return Vector<T>::Ge(m, v);
00335     }

template<class T>
Vector<int> operator>= Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 270 of file Vector.h.

00271     {
00272         return Vector<T>::Ge(m1, m2);
00273     }

template<class T>
Vector<int> operator|| v,
Vector< T > &  m
[friend]
 

Definition at line 300 of file Vector.h.

00301     {
00302         return Vector<T>::Or(m, v);
00303     }

template<class T>
Vector<int> operator|| Vector< T > &  m,
v
[friend]
 

Definition at line 296 of file Vector.h.

00297     {
00298         return Vector<T>::Or(m, v);
00299     }

template<class T>
Vector<int> operator|| Vector< T > &  m1,
Vector< T > &  m2
[friend]
 

Definition at line 250 of file Vector.h.

00251     {
00252         return Vector<T>::Or(m1, m2);
00253     }


Member Data Documentation

template<class T>
Cleaner<T>* Vector< T >::clean [protected]
 

Definition at line 108 of file Vector.h.

Referenced by Vector< T >::Clean(), Vector< T >::operator=(), Vector< T >::Set(), Vector< T >::Vector(), and Vector< T >::~Vector().

template<class T>
T* Vector< T >::data [protected]
 

Definition at line 105 of file Vector.h.

Referenced by Vector< T >::Add(), Vector< T >::And(), Vector< T >::Clean(), Vector< T >::Clone(), Vector< T >::Divide(), Vector< T >::Elem(), Vector< T >::ElemNC(), Vector< T >::Eq(), Vector< T >::Ge(), Vector< T >::Gt(), Vector< T >::Init(), Vector< T >::Inner(), Vector< T >::Le(), Vector< T >::Lt(), Matrix< T >::Matrix(), Matrix< T >::MMultiply(), Vector< T >::Multiply(), Vector< T >::Ne(), Vector< T >::operator!(), Vector< T >::operator()(), Vector< T >::operator-(), Vector< T >::operator=(), Vector< T >::operator[](), Vector< T >::Or(), Vector< T >::Rand(), Vector< T >::Set(), Vector< T >::Slice(), Vector< T >::Subtract(), and Vector< T >::Vector().

template<class T>
int Vector< T >::length [protected]
 

Definition at line 106 of file Vector.h.

Referenced by Vector< T >::Add(), Vector< T >::And(), Vector< T >::Clone(), Vector< T >::Divide(), Vector< T >::Eq(), Vector< T >::Ge(), Vector< T >::Gt(), Vector< T >::Inner(), Vector< T >::Le(), Vector< T >::Lt(), Matrix< T >::Matrix(), Matrix< T >::MMultiply(), Vector< T >::Multiply(), Vector< T >::Ne(), Vector< T >::operator()(), Vector< T >::operator-(), Vector< T >::operator=(), Vector< T >::Or(), Vector< T >::Set(), Vector< T >::Slice(), Vector< T >::Subtract(), and Vector< T >::Vector().

template<class T>
bool Vector< T >::memoryManaged [protected]
 

Definition at line 107 of file Vector.h.

Referenced by Vector< T >::Clean(), Vector< T >::operator=(), Vector< T >::Set(), Vector< T >::Vector(), and Vector< T >::~Vector().


The documentation for this class was generated from the following files:
CIMPL 0.1 Code Reference. Copyright © 2004, Baris Sumengen. All rights reserved.