private void checkDimension(DataPoint point){
  if ((point.getDimension() > 1) && (point.getDimension() != dimensions)) {
    throw new IllegalArgumentException("Error: Dataset is " + dimensions + " dimensional, added data is "+ point.getDimension()+ " dimensional");
  }
}

private void checkDimension ( DataPoint point ) { if ( ( point . getDimension ( ) > 1 ) && ( point . getDimension ( ) != dimensions ) ) { throw new IllegalArgumentException ( "Error: Dataset is " + dimensions + " dimensional, added data is " + point . getDimension ( ) + " dimensional" ) ; } }
verifies that the point is compatible with this set
