Search in sources :

Example 86 with DataRow

use of org.knime.core.data.DataRow in project knime-core by knime.

the class DoubleCellFilterRowGeneratorTest method testOneBorder2.

/**
 * Test on left border using <b>5.0</b>.
 */
public void testOneBorder2() {
    DataRow row = new MyTestRow(5.0);
    FilterRowGenerator gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_IN);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_OUT);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_IN);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_OUT);
    assertFalse(gen.isIn(row));
}
Also used : DataRow(org.knime.core.data.DataRow)

Example 87 with DataRow

use of org.knime.core.data.DataRow in project knime-core by knime.

the class DoubleCellFilterRowGeneratorTest method testOneBorder1.

/**
 * Test on left border using <b>3.0</b>.
 */
public void testOneBorder1() {
    DataRow row = new MyTestRow(3.0);
    FilterRowGenerator gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_IN);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_OUT);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_IN);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_OUT);
    assertFalse(gen.isIn(row));
}
Also used : DataRow(org.knime.core.data.DataRow)

Example 88 with DataRow

use of org.knime.core.data.DataRow in project knime-core by knime.

the class DoubleCellFilterRowGeneratorTest method testOneBorder4.

/**
 * Test on left border using <b>8.0</b>.
 */
public void testOneBorder4() {
    DataRow row = new MyTestRow(8.0);
    FilterRowGenerator gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, 5);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, 6);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, 9);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, 10);
    assertTrue(gen.isIn(row));
}
Also used : DataRow(org.knime.core.data.DataRow)

Example 89 with DataRow

use of org.knime.core.data.DataRow in project knime-core by knime.

the class DoubleCellFilterRowGeneratorTest method testOneBorder5.

/**
 * Test on left border using <b>9.0</b>.
 */
public void testOneBorder5() {
    DataRow row = new MyTestRow(9.0);
    FilterRowGenerator gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_IN);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_OUT);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_IN);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_OUT);
    assertTrue(gen.isIn(row));
}
Also used : DataRow(org.knime.core.data.DataRow)

Example 90 with DataRow

use of org.knime.core.data.DataRow in project knime-core by knime.

the class DoubleCellFilterRowGeneratorTest method testTwoBorder3.

/**
 * Test on left and right border using <b>7.0</b>.
 */
public void testTwoBorder3() {
    DataRow row = new MyTestRow(7.0);
    FilterRowGenerator gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_IN, m_dblRight, RIGHT_IN);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_OUT, m_dblRight, RIGHT_IN);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_IN, m_dblRight, RIGHT_OUT);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, LEFT_OUT, m_dblRight, RIGHT_OUT);
    assertFalse(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_IN, m_dblRight, LEFT_IN);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_OUT, m_dblRight, LEFT_OUT);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_OUT, m_dblRight, LEFT_IN);
    assertTrue(gen.isIn(row));
    gen = new DoubleCellFilterRowGenerator(IDX, m_dblLeft, RIGHT_IN, m_dblRight, LEFT_OUT);
    assertTrue(gen.isIn(row));
}
Also used : DataRow(org.knime.core.data.DataRow)

Aggregations

DataRow (org.knime.core.data.DataRow)482 DataCell (org.knime.core.data.DataCell)268 DataTableSpec (org.knime.core.data.DataTableSpec)159 BufferedDataTable (org.knime.core.node.BufferedDataTable)125 DataColumnSpec (org.knime.core.data.DataColumnSpec)109 RowKey (org.knime.core.data.RowKey)88 DefaultRow (org.knime.core.data.def.DefaultRow)88 BufferedDataContainer (org.knime.core.node.BufferedDataContainer)80 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)76 ColumnRearranger (org.knime.core.data.container.ColumnRearranger)73 DoubleValue (org.knime.core.data.DoubleValue)72 ArrayList (java.util.ArrayList)65 DataColumnSpecCreator (org.knime.core.data.DataColumnSpecCreator)65 RowIterator (org.knime.core.data.RowIterator)62 DataType (org.knime.core.data.DataType)61 DoubleCell (org.knime.core.data.def.DoubleCell)57 StringCell (org.knime.core.data.def.StringCell)53 SingleCellFactory (org.knime.core.data.container.SingleCellFactory)48 ExecutionMonitor (org.knime.core.node.ExecutionMonitor)44 CanceledExecutionException (org.knime.core.node.CanceledExecutionException)43