model_server/edge/src/matrix.cxx
/*
 * barycenter_row
 * returns the barycenter of row r
 * that means the lower barycenter of item on position r
 */
barycenter_row
returns the barycenter of row r
that means the lower barycenter of item on position r
barycenter_row returns the barycenter of row r that means the lower barycenter of item on position r
float 
matrix::barycenter_row(int r) 
{
  int b1=0;
  int b2=0;
  for (int l=0; l<columns; l++) {
    b1 += l * m[r].v[l];
    b2 += m[r].v[l];
  };
  if (b2) return float(b1) / b2; else return r;
}
float matrix :: barycenter_row ( int r ) { int b1 = 0 ; int b2 = 0 ; for ( int l = 0 ; l < columns ; l ++ ) { b1 += l * m [ r ] . v [ l ] ; b2 += m [ r ] . v [ l ] ; } ; if ( b2 ) return float ( b1 ) / b2 ; else return r ; }
barycenter_row
 returns the barycenter of row r
 that means the lower barycenter of item on position r
barycenter_row returns the barycenter of row r that means the lower barycenter of item on position r