Esempio n. 1
0
  /** Dimensionality check during initialization */
  bool dimCheck(){

    if( Sx_.rows() != Sx_.cols() ){
      std::cerr << "Error: MatType must be a square matrix \n";
      return false;
    }
    if( Sx_.rows() != x_.size() ){
      std::cerr << "Error: VecType and MatType dimension mismatch \n";
      return false;
    }
    nDim_ = x_.size();
    return true;
  }
Esempio n. 2
0
void Recipe::set_coefficients(int i, int j, const MatType &coef) {
    for(int in_chan = 0; in_chan < coef.rows(); ++in_chan)
    for(int out_chan = 0; out_chan < coef.cols(); ++out_chan)
    {
        int ac_map_i = in_chan*height + i;
        int ac_map_j = out_chan*width +j;
        ac(ac_map_i, ac_map_j) = coef(in_chan,out_chan);
    }
}