void
UZRectMollerup::output (Log& log) const
{
  output_lazy (std::vector<double> (Theta_error.begin (), Theta_error.end ()),
               "Theta_error", log);
  output_lazy (std::vector<double> (Kedge.begin (), Kedge.end ()),
               "Kedge", log);
}
Beispiel #2
0
bool read_vector(FILE* file, boost::numeric::ublas::vector<T>& v) {
  unsigned magic, rowCount, columnCount;
  if (fread(&magic, sizeof(unsigned), 1, file) != 1)
    return false;
  if (!check_magic<T>(magic))
    return false;

  if (fread(&rowCount, sizeof(unsigned), 1, file) != 1)
    return false;
  if (fread(&columnCount, sizeof(unsigned), 1, file) != 1)
    return false;

  const unsigned count = rowCount * columnCount;
  if (count != v.size())
    v.resize(count, false);
  T* buffer = new T[count];
  if (fread(buffer, sizeof(T), count, file) != count)
    return false;

  std::copy(buffer, buffer + count, v.begin());

  return true;
}
	BOOST_FOREACH(const ublas::vector<double>& p, cloud){
		copy(p.begin(), p.end(), ostream_iterator<double>(mOS, "\t"));
		mOS << mGen->getClassID(pap.getBackground());
		mOS << endl;
	}