Ignore:
Timestamp:
Oct 3, 2007, 3:14:29 PM (18 years ago)
Author:
ansari
Message:

Ajout decodage nouveaux attributs (min max sumsq norm2) pour tableaux/matrices/vecteurs (${tab.norm2} ${tab.min} ...) - Reza 02/10/2007 "

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/nomtmatvecadapter.cc

    r3222 r3333  
    117117      return mtv.Convert(s);
    118118    }
     119    else if (opts[0] == "sumsq") {
     120      MuTyV mtv(mMtx->SumSq());
     121      string s;
     122      return mtv.Convert(s);
     123    }
     124    else if (opts[0] == "norm2") {
     125      MuTyV mtv(mMtx->Norm2());
     126      string s;
     127      return mtv.Convert(s);
     128    }
     129    else if ((opts[0] == "min")||(opts[0] == "max")||(opts[0] == "minmax")) {
     130      T amin, amax;
     131      MuTyV mtv;
     132      string s;
     133      mMtx->MinMax(amin, amax);
     134      if (opts[0] == "minmax") {
     135        mtv = amin;  mtv.Convert(s);
     136        s += " ";
     137        string mms;
     138        mtv = amax;  mtv.Convert(mms);
     139        s += mms;
     140      }
     141      else {
     142        if (opts[0] == "min")  mtv = amin;
     143        else if (opts[0] == "max")  mtv = amax;
     144        mtv.Convert(s);
     145      }
     146      return s;
     147    }
    119148    else if (opts[0] == "info") { // Acces aux valeurs stockes ds le DVList Info()
    120149      if (opts.size() < 2)  return string("");
     
    122151      else return mMtx->Info().GetS(opts[1]);
    123152    }
    124     else return "TMatrix.Att: rank size/nelts nrow/nrows ncol/ncols sum info.varname";
     153    else return "TMatrix.Att: rank size/nelts nrow/nrows ncol/ncols sum sumsq norm2 min max minmax info.varname";
    125154  }
    126155}
Note: See TracChangeset for help on using the changeset viewer.