00001 // EnsembleMember.cpp: implementation of the CEnsembleMember class. 00002 // 00004 00005 #include "EnsembleMember.h" 00006 00008 // Construction/Destruction 00010 00011 CEnsembleMember::CEnsembleMember(int nParameters, double *parameters, int nResiduals, double *residuals, double quadratic, double cost) 00012 { 00013 int i; 00014 m_iPSize = nParameters; 00015 m_iRSize = nResiduals; 00016 m_pdParameters = new double[nParameters]; 00017 m_pdResiduals = new double[nResiduals]; 00018 for(i = 0; i < m_iPSize; i++) 00019 { 00020 m_pdParameters[i] = parameters[i]; 00021 } 00022 for(i = 0; i < m_iRSize; i++) 00023 { 00024 m_pdResiduals[i] = residuals[i]; 00025 } 00026 m_dQuadratic = quadratic; 00027 m_dCost = cost; 00028 return; 00029 } 00030 00031 CEnsembleMember::~CEnsembleMember() 00032 { 00033 delete [] m_pdParameters; 00034 delete [] m_pdResiduals; 00035 }