public class UpperTriangularTest extends MahoutTestCase {
@Test
public void testBasics() {
Matrix a = new UpperTriangular(new double[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, false);
assertEquals(0, a.viewDiagonal().minus(new DenseVector(new double[]{1, 5, 8, 10})).norm(1), 1.0e-10);
assertEquals(0, a.viewPart(0, 3, 1, 3).viewDiagonal().minus(
new DenseVector(new double[]{2, 6, 9})).norm(1), 1.0e-10);
assertEquals(4, a.get(0, 3), 1.0e-10);
print(a);
Matrix m = new DenseMatrix(4, 4).assign(a);