com.dreizak.miniball
Class Utils

java.lang.Object
  extended by com.dreizak.miniball.Utils

public class Utils
extends java.lang.Object

Utility methods for point sets and miniballs.


Constructor Summary
Utils()
           
 
Method Summary
static ArrayPointSet pointsFromStream(java.io.InputStream s)
          Reads a point set from an input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

pointsFromStream

public static final ArrayPointSet pointsFromStream(java.io.InputStream s)
Reads a point set from an input stream.

The stream is assumed to be encoded in UTF-8 and should contain integers and double values, all separated by space or return. The first two numbers must be integers, specifying the number of points in the point set and the dimension. The following numbers are all doubles and specify the points by their Euclidean coordinates.

For example, the three two-dimensional points (0,0), (2,3), (4,5) could be stored as follows:

  3 2
  0 0
  2 3
  4 5
 

Parameters:
s - the input stream to read from
Returns:


Copyright © 2013. All Rights Reserved.