Biomechanical Joint Model
 Author: Anderson Maciel

vecarray.cpp

Go to the documentation of this file.
00001 #include "vecarray.h"
00002 
00003 namespace LinAlg{
00004 
00005 
00006 
00007 VEC& VECArray::specialVEC::operator=(const VEC &A)
00008 { 
00009    assert(n_==A.dim()); // dimension MAY NOT be changed
00010    return VEC::operator=(A);
00011 }
00012 
00013 
00014 VECArray::~VECArray() 
00015 { 
00016    destroy(); 
00017 }
00018 
00019 void VECArray::init_vv()
00020 {
00021    if (vv == NULL)
00022    {
00023       vv = new specialVEC[n_/k_];
00024       for (int k=0; k<n_/k_; k++)
00025          vv[k].resize(k_);
00026    }
00027    
00028    for (int i=0; i<n_/k_; i++)
00029    {
00030       vv[i].redirect(v_ + i*k_);
00031   }
00032 }
00033 
00034 void VECArray::initialize(unsigned N)
00035 {
00036    VEC::initialize(N);
00037    init_vv();
00038 }
00039 
00040 void VECArray::destroy()
00041 {  
00042    VEC::destroy();
00043    delete [] vv;
00044    vv = NULL;
00045 }
00046 
00047 }

Generated on Thu Dec 1 10:13:40 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5