void System::setTSample(double tsample){ Ts=tsample; if ( Phi ) delete Phi; if ( Psi ) delete Psi; Phi = computePhi(A,Ts); Psi = computePsi(A,B,Phi); }
// factors[d] = (p_d, e_d) // computes phiVec[d] = phi(p_d^{e_d}) = (p_d-1) p_i{e_d-1} void computePhiVec(Vec<long>& phiVec, const Vec< Pair<long, long> >& factors) { long k = factors.length(); phiVec.SetLength(k); for (long d = 0; d < k; d++) phiVec[d] = computePhi(factors[d]); }
bool System::rebuild(void){ setDimenciones(A->rows,B->cols,C->rows); if ( Phi ) delete Phi; if ( Psi ) delete Psi; if ( cntrl ) delete cntrl; if ( obser ) delete obser; Phi = Psi = cntrl = obser = 0; bool ret_val = checkDimensions(); if( ret_val == true ){ Phi = computePhi(A,Ts); Psi = computePsi(A,B,Phi); cntrl = Cntrl(A,B); obser = Obser(A,C); ret_val &= testCntrl(); ret_val &= testObser(); } if ( notify && ret_val ) notify->reportStatus(__func__,""); return ret_val; }