Changeset abbbbef in tol


Ignore:
Timestamp:
Mar 6, 2012, 9:35:28 AM (15 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
3c5b71c
Parents:
bb3467e
Message:

Fixes #1464

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@4292 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol/btol/vmatrix_type
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/vmatrix_type/tol_bvmat_bsr_impl.h

    rbb3467e rabbbbef  
    800800  //Std(BText("\nassign_sigma_to_noise(")+str.c_str()+")");
    801801  //Std(BText("sigmaIdx=")+sigInf->index);
    802     t->noise_info_->sigmaName = sigInf.name;
    803     t->noise_info_->sigmaIdx = sigInf.index;
    804     t->noise_info_->sigmaCte = BDat::Nan();
     802    if(!noise_info_->size)
     803    {
     804      Warning(BSR()+"Cannot define a variance parameter "+
     805        sigInf.name.c_str()+" over an empty noise. It will be skyped.");
     806      t->noise_info_->sigmaName = "";
     807      t->noise_info_->sigmaIdx = -1;
     808    }
     809    else
     810    {
     811      t->noise_info_->sigmaName = sigInf.name;
     812      t->noise_info_->sigmaIdx = sigInf.index;
     813    }
     814    t->noise_info_->sigmaCte = BDat::Nan(); 
    805815    t->noise_info_->sigPriExpr = "";
    806816    t->noise_info_->cov.Eye(noise_info_->size,noise_info_->size,0,1);
  • tol/btol/vmatrix_type/vmat_bsr_primary.cpp

    rbb3467e rabbbbef  
    563563    if(!b)
    564564    {
    565       Error(BSR()+"At least a vector of noise with independent normal distribution must be defined");
     565      Error(BSR()+"There are no defined noise");
    566566      return(-4);
    567567    }
    568     if(!m)
    569     {
    570       Error(BSR()+"At least a linear equation must be defined");
     568    else if(b>1)
     569    {
     570      Error(BSR()+"There are more than one defined noise");
     571      return(-4);
     572    }
     573    else if(noise.vec[0].size!=m)
     574    {
     575      Error(BSR()+"There are "+m+" linear equations but noise is defined "
     576              "with length "<<noise.vec[0].size);
    571577      return(-5);
     578    }
     579    else if(!m)
     580    {
     581      Warning(BSR()+"Segment has no linear equation");
    572582    }
    573583    return(0);
    … …  
    591601    int r = ine_vec.size();
    592602    if(!n && !X_.Rows()) { X_.BlasRDense(m,0); }
     603    if(!m) { m = X.Rows(); }
    593604  //Std(BSR()+" Building model definition of primary module\n");
    594605    int result = checkDimensions(m);
Note: See TracChangeset for help on using the changeset viewer.