Skip to content

Matrix#selectRows/Columns(..) yield non-vector or transposed vector #19

@krevelen

Description

@krevelen

The following jUnit test assertions fail:

@Test
public void matrixTest()
{
	final Matrix m1x1 = Matrix.Factory.zeros( 1, 1 );
	Assert.assertTrue( m1x1.selectRows( Ret.LINK, 0 ).isRowVector() ); // fail
	Assert.assertFalse( m1x1.selectRows( Ret.LINK, 0 ).isColumnVector() ); // ok
	Assert.assertTrue( m1x1.selectColumns( Ret.LINK, 0 ).isColumnVector() ); // fail
	Assert.assertFalse( m1x1.selectColumns( Ret.LINK, 0 ).isRowVector() ); // ok
	
	final Matrix m2x1 = Matrix.Factory.zeros( 2, 1 );
	Assert.assertTrue( m2x1.selectRows( Ret.LINK, 0 ).isRowVector() ); // fail
	Assert.assertFalse( m2x1.selectRows( Ret.LINK, 0 ).isColumnVector() ); // fail
	Assert.assertTrue( m2x1.selectColumns( Ret.LINK, 0 ).isColumnVector() ); // fail
	Assert.assertFalse( m2x1.selectColumns( Ret.LINK, 0 ).isRowVector() ); // fail
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions