model_server/edge/src/matrix.cxx
/*
 * barycenter_row
 * returns the weighted barycenter of row r
 * that means the lower barycenter of item on position r
 * size of vector weight and columns of this matrix must be identical
 */
barycenter_row
returns the weighted barycenter of row r
that means the lower barycenter of item on position r
size of vector weight and columns of this matrix must be identical
barycenter_row returns the weighted barycenter of row r that means the lower barycenter of item on position r size of vector weight and columns of this matrix must be identical
int 
matrix::barycenter_row(int r, edge_vector* weight) 
{
  int b1=0;
  int b2=0;
  for (int l=0; l<columns; l++) {
    b1 += weight->v[l] * m[r].v[l];
    b2 += m[r].v[l];
  };
  if (b2) return b1 / b2; else return 0;
}
int matrix :: barycenter_row ( int r , edge_vector * weight ) { int b1 = 0 ; int b2 = 0 ; for ( int l = 0 ; l < columns ; l ++ ) { b1 += weight -> v [ l ] * m [ r ] . v [ l ] ; b2 += m [ r ] . v [ l ] ; } ; if ( b2 ) return b1 / b2 ; else return 0 ; }
barycenter_row
 returns the weighted barycenter of row r
 that means the lower barycenter of item on position r
 size of vector weight and columns of this matrix must be identical
barycenter_row returns the weighted barycenter of row r that means the lower barycenter of item on position r size of vector weight and columns of this matrix must be identical