Beispiel #1
0
void
check_length(const_Vector<T, Block> vec, length_type len)
{
  test_assert(vec.length() == len);
  test_assert(vec.size() == len);
  test_assert(vec.size(0) == len);
}
Beispiel #2
0
T
sum(const_Vector<T, Block> v)
{
  // std::cout << "sum(" << Block_name<Block>::name() << ")\n";
  T total = T();
  for (index_type i=0; i<v.length(); ++i)
    total += v.get(i);
  return total;
}