Skip to content
This repository was archived by the owner on Nov 10, 2017. It is now read-only.
This repository was archived by the owner on Nov 10, 2017. It is now read-only.

Add FITPACK to netlib-java #102

Open

Description

@randallwhitman

Is there interest in adding FITPACK to netlib-java, as in SciPy?
https://github.com/scipy/scipy/tree/master/scipy/interpolate/fitpack

Activity

  1. fommil commented on Mar 17, 2016

    @fommil
    Owner

    depends on #76 and possibly significant extra work if the APU uses callbacks.

  2. randallwhitman commented on Mar 17, 2016

    @randallwhitman
    Author

    Is the dependency on #76 the reason I get near-empty F2jFITPACK.{java,class} when I made a brief attempt at it - as opposed to missing something other than core/pom.xml that would need to be changed?

    $ ls netlib/FITPACK/
    bispeu.f  curfit.f  fpbacp.f   fpcoco.f  fpdeno.f  fpinst.f  fpperi.f  fprppo.f  fptrnp.f  percur.f  sphere.f
    bispev.f  dblint.f  fpbfout.f  fpcons.f  fpdisc.f  fpintb.f  fppocu.f  fprpsp.f  fptrpe.f  pogrid.f  splder.f
    clocur.f  evapol.f  fpbisp.f   fpcosp.f  fpfrno.f  fpknot.f  fppogr.f  fpseno.f  insert.f  polar.f   splev.f
    cocosp.f  fourco.f  fpbspl.f   fpcsin.f  fpgivs.f  fpopdi.f  fppola.f  fpspgr.f  Makefile  profil.f  splint.f
    concon.f  fpader.f  fpchec.f   fpcurf.f  fpgrdi.f  fpopsp.f  fprank.f  fpsphe.f  parcur.f  README    sproot.f
    concur.f  fpadno.f  fpched.f   fpcuro.f  fpgrpa.f  fporde.f  fprati.f  fpsuev.f  parder.f  regrid.f  surev.f
    cualde.f  fpadpo.f  fpchep.f   fpcyt1.f  fpgrre.f  fppara.f  fpregr.f  fpsurf.f  pardeu.f  spalde.f  surfit.f
    curev.f   fpback.f  fpclos.f   fpcyt2.f  fpgrsp.f  fppasu.f  fprota.f  fpsysy.f  parsur.f  spgrid.f
    
           <execution>
               <id>fitpack-interface</id>
               <goals>
                   <goal>interface</goal>
               </goals>
               <configuration>
                   <outputName>com/github/fommil/netlib/FITPACK.java</outputName>
                   <scan>org.netlib.fitpack</scan>
                   <fallback>com.github.fommil.netlib.F2jFITPACK</fallback>
                   <impls>com.github.fommil.netlib.NativeSystemFITPACK,com.github.fommil.netlib.NativeRefFITPACK,com.github.fommil.netlib.F2jFITPACK</impls>
               </configuration>
           </execution>
           <execution>
               <id>fitpack-f2j-implementation</id>
               <goals>
                   <goal>f2j</goal>
               </goals>
               <configuration>
                   <outputName>com/github/fommil/netlib/F2jFITPACK.java</outputName>
                   <scan>org.netlib.fitpack</scan>
                   <implementing>com.github.fommil.netlib.FITPACK</implementing>
               </configuration>
           </execution>

    mvn package

    $ ls -sh ./core/target/classes/com/github/fommil/netlib/
     12K ARPACK.class   36K F2jARPACK.class  4.0K F2jFITPACK.class  4.0K FITPACK.class
     12K BLAS.class     32K F2jBLAS.class    444K F2jLAPACK.class   112K LAPACK.class
    
    $ wc -l core/target/generated-sources/netlib-java/com/github/fommil/netlib/*a 
      13534 core/target/generated-sources/netlib-java/com/github/fommil/netlib/ARPACK.java
      12606 core/target/generated-sources/netlib-java/com/github/fommil/netlib/BLAS.java
        592 core/target/generated-sources/netlib-java/com/github/fommil/netlib/F2jARPACK.java
        722 core/target/generated-sources/netlib-java/com/github/fommil/netlib/F2jBLAS.java
         38 core/target/generated-sources/netlib-java/com/github/fommil/netlib/F2jFITPACK.java
       7037 core/target/generated-sources/netlib-java/com/github/fommil/netlib/F2jLAPACK.java
         86 core/target/generated-sources/netlib-java/com/github/fommil/netlib/FITPACK.java
     158016 core/target/generated-sources/netlib-java/com/github/fommil/netlib/LAPACK.java
    
  3. fommil commented on Mar 17, 2016

    @fommil
    Owner

    if by "near empty" you mean "completely empty". We need to compile the fortran code for the JVM before we can even think about adding it to netlib-java.

  4. randallwhitman commented on Mar 29, 2016

    @randallwhitman
    Author

    For my purposes I got interpolation matching SciPy output, by adapting FITPACK code translated by f2j.
    https://github.com/randallwhitman/netlib-java/tree/fitpack-interpolation-f2j
    Up to you whether to keep this issue open for more general interest in FITPACK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions