You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
468 B

  1. Matrix3f m = Matrix3f::Random();
  2. std::ptrdiff_t i, j;
  3. float minOfM = m.minCoeff(&i,&j);
  4. cout << "Here is the matrix m:\n" << m << endl;
  5. cout << "Its minimum coefficient (" << minOfM
  6. << ") is at position (" << i << "," << j << ")\n\n";
  7. RowVector4i v = RowVector4i::Random();
  8. int maxOfV = v.maxCoeff(&i);
  9. cout << "Here is the vector v: " << v << endl;
  10. cout << "Its maximum coefficient (" << maxOfV
  11. << ") is at position " << i << endl;