private void transferValue( final BasicTable<String> table, final DistanceMatrix distance_matrix, final int row, final int col, final int start_row, final int col_offset ) throws IOException { double d = 0.0; final String table_value = table.getValue( col, row + start_row ); if ( ForesterUtil.isEmpty( table_value ) ) { throw new IOException( "value is null or empty at [" + ( col - 1 ) + ", " + row + "]" ); } try { d = Double.parseDouble( table_value ); } catch ( final NumberFormatException e ) { throw new IOException( "illegal format for distance [" + table_value + "] at [" + ( col - 1 ) + ", " + row + "]" ); } distance_matrix.setValue( ( col - 1 ) + col_offset, row, d ); }
matrix_0.setIdentifier( 2, "C" ); matrix_0.setIdentifier( 3, "0123456789012" ); matrix_0.setValue( 1, 0, 0.00001 ); matrix_0.setValue( 0, 2, 0.0000009 ); matrix_0.setValue( 3, 0, 3.0 ); matrix_0.setValue( 1, 2, 4.0 ); matrix_0.setValue( 3, 1, 5.0 ); matrix_0.setValue( 2, 3, 6.0 ); if ( !matrix_0.getIdentifier( 0 ).equals( "A" ) ) { return false;