org.neuroph.util
Class VectorParser

java.lang.Object
  extended by org.neuroph.util.VectorParser

public class VectorParser
extends Object

Provides methods to parse strings as Integer or Double vectors.

Author:
Zoran Sevarac

Constructor Summary
VectorParser()
           
 
Method Summary
static double[] convertToArray(List<Double> list)
           
static ArrayList<Double> convertToVector(double[] array)
           
static double[] parseDoubleArray(String inputStr)
          This method parses input String and returns double array
static ArrayList<Integer> parseInteger(String str)
          This method parses input String and returns Integer vector
static double[] toDoubleArray(List<Double> list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorParser

public VectorParser()
Method Detail

parseInteger

public static ArrayList<Integer> parseInteger(String str)
This method parses input String and returns Integer vector

Parameters:
str - input String
Returns:
Integer vector

parseDoubleArray

public static double[] parseDoubleArray(String inputStr)
This method parses input String and returns double array

Parameters:
inputStr - input String
Returns:
double array

toDoubleArray

public static double[] toDoubleArray(List<Double> list)

convertToVector

public static ArrayList<Double> convertToVector(double[] array)

convertToArray

public static double[] convertToArray(List<Double> list)


Copyright © 2012. All Rights Reserved.