Esempio n. 1
0
vec diag(DistMat & mat){
  assert(info.is_square());
  vec ret = zeros(info.total());
  for (int i=0; i< info.total(); i++){
    ret[i] = latent_factors_inmem[i].A_ii;
  }
  return ret;
}
Esempio n. 2
0
void init_lanczos(bipartite_graph_descriptor & info){
  data_size = nsv + nv+1 + max_iter;
  actual_vector_len = data_size;
#pragma omp parallel for
  for (int i=0; i< info.total(); i++){
      latent_factors_inmem[i].pvec = zeros(actual_vector_len);
  } 
  logstream(LOG_INFO)<<"Allocated a total of: " << ((double)actual_vector_len * info.total() * sizeof(double)/ 1e6) << " MB for storing vectors." << std::endl;
}
Esempio n. 3
0
vec diag(DistMat & mat){
  assert(info.is_square());
  vec ret = zeros(info.total());
  for (int i=0; i< info.total(); i++){
    //TODO ret[i] = pgraph->vertex_data(i).A_ii;
    assert(false);
  }
  return ret;
}
Esempio n. 4
0
 DistSlicedMat(int _start_offset, int _end_offset, bool _transpose, const bipartite_graph_descriptor &_info, std::string _name){
   //assert(_start_offset < _end_offset);
   assert(_start_offset >= 0);
   assert(_info.total() > 0);
   transpose = _transpose;
   info = _info;
   init();
   start_offset = _start_offset;
   end_offset = _end_offset;
   name = _name;
 }