Package com.moseph.modelutils.curve

Examples of com.moseph.modelutils.curve.LinearInterpolator


      columns = new ArrayList<String>( Arrays.asList( reader.getHeaders() ));
    }
    columns.remove( xCol );
   
    for( String s : columns ) {
      map.put( s, new LinearInterpolator() );
    }
   
    while( reader.readRecord() && reader.get( xCol ).length() > 0 )
    {
      double year = Double.parseDouble( reader.get( xCol ));
View Full Code Here


      columns[i-1] = Integer.parseInt( reader.getHeaders()[i] );
    }
    while( reader.readRecord() )
    {
      String name = reader.get( 0 );
      LinearInterpolator bi = new LinearInterpolator();
      for( int i = 1; i < reader.getHeaderCount(); i++ )
      {
        double val = 0;
        String textVal =  reader.get( i )
        try
        {
          val = Double.parseDouble( textVal );
          bi.addPoint( columns[i-1], val );
        } catch( Exception e )
        {
          log.error( "Bad string for value " + columns[i-1] + " line " + reader.getCurrentRecord() + " file " + csvFile + " was: '" + textVal + "'");
          log.error( e.getMessage() );
        }
View Full Code Here

TOP

Related Classes of com.moseph.modelutils.curve.LinearInterpolator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.