net.sourceforge.cilib.util
Class Vectors

java.lang.Object
  extended by net.sourceforge.cilib.util.Vectors

public final class Vectors
extends Object

Utility methods for Vectors.


Method Summary
static
<T extends Number>
Vector
create(T... result)
          Utility method to create a Vector, given any number of Number instances.
static Vector lowerBoundVector(Vector vector)
          Constructs a Vector from vector Vector with each component's value set to the lower bound of that component.
static Vector upperBoundVector(Vector vector)
          Constructs a Vector from vector Vector with each component's value set to the upper bound of that component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

upperBoundVector

public static Vector upperBoundVector(Vector vector)
Constructs a Vector from vector Vector with each component's value set to the upper bound of that component.

Parameters:
vector - The Vector to create the upper bound vector from.
Returns:
a Vector with all the elements set to their respective upper bounds
Throws:
UnsupportedOperationException - When an element in the Vector is not a Numeric

lowerBoundVector

public static Vector lowerBoundVector(Vector vector)
Constructs a Vector from vector Vector with each component's value set to the lower bound of that component.

Parameters:
vector - The Vector from which to create the lower bound vector.
Returns:
a Vector with all the elements set to their respective lower bounds
Throws:
UnsupportedOperationException - when an element in the Vector is not a Numeric

create

public static <T extends Number> Vector create(T... result)
Utility method to create a Vector, given any number of Number instances.

Type Parameters:
T - The type extending Number.
Parameters:
result - The list of values to include within the created Vector.
Returns:
The created Vector object, containing the provided list of items.


Copyright © 2009 CIRG. All Rights Reserved.