All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kabouterlabs.jodeint.cdopri5.Cdopri5Library Maven / Gradle / Ivy

package com.kabouterlabs.jodeint.cdopri5;
import java.util.Collections;
import java.util.Iterator;
import org.bridj.BridJ;
import org.bridj.CRuntime;
import org.bridj.Callback;
import org.bridj.FlagSet;
import org.bridj.IntValuedEnum;
import org.bridj.Pointer;
import org.bridj.ann.Library;
import org.bridj.ann.Ptr;
import org.bridj.ann.Runtime;
/**
 * Wrapper for library cdopri5
* This file was autogenerated by JNAerator,
* a tool written by Olivier Chafik that uses a few opensource projects..
* For help, please visit NativeLibs4Java or BridJ . */ @Library("cdopri5") @Runtime(CRuntime.class) public class Cdopri5Library { static { BridJ.register(); } /** * enum values
* native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h */ public enum dopri5_idid_e implements IntValuedEnum { SUCCESS(1), SUCCESS_INTR(2), INPUT_INCONSISTENT(-1), NMAX_TOO_SMALL(-2), STEP_TOO_SMALL(-3), STIFF_PROBLEM(-4); dopri5_idid_e(long value) { this.value = value; } public final long value; public long value() { return this.value; } public Iterator iterator() { return Collections.singleton(this).iterator(); } public static IntValuedEnum fromValue(int value) { return FlagSet.fromValue(value, values()); } }; /** * enum values
* native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h */ public enum dopri5_itol_e implements IntValuedEnum { ALL_SCALAR(1), ALL_ARRAY(2); dopri5_itol_e(long value) { this.value = value; } public final long value; public long value() { return this.value; } public Iterator iterator() { return Collections.singleton(this).iterator(); } public static IntValuedEnum fromValue(int value) { return FlagSet.fromValue(value, values()); } }; /** * enum values
* native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h */ public enum dopri5_iout_e implements IntValuedEnum { NEVER_CALLED(0), OUTPUT(2), DENSE_OUTPUT(3); dopri5_iout_e(long value) { this.value = value; } public final long value; public long value() { return this.value; } public Iterator iterator() { return Collections.singleton(this).iterator(); } public static IntValuedEnum fromValue(int value) { return FlagSet.fromValue(value, values()); } }; /** native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h */ public static abstract class dopri5_ode_func extends Callback { public void apply(Pointer n, Pointer x, Pointer y, Pointer f, Pointer rpar, Pointer ipar) { apply(Pointer.getPeer(n), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(f), Pointer.getPeer(rpar), Pointer.getPeer(ipar)); } public void apply(@Ptr long n, @Ptr long x, @Ptr long y, @Ptr long f, @Ptr long rpar, @Ptr long ipar) { apply((Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(x, Double.class), (Pointer)Pointer.pointerToAddress(y, Double.class), (Pointer)Pointer.pointerToAddress(f, Double.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class)); } }; /** native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h */ public static abstract class dopri5_solout extends Callback { public void apply(Pointer nr, Pointer xold, Pointer x, Pointer y, Pointer n, Pointer con, Pointer icomp, Pointer nd, Pointer rpar, Pointer ipar, Pointer irtrn) { apply(Pointer.getPeer(nr), Pointer.getPeer(xold), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(n), Pointer.getPeer(con), Pointer.getPeer(icomp), Pointer.getPeer(nd), Pointer.getPeer(rpar), Pointer.getPeer(ipar), Pointer.getPeer(irtrn)); } public void apply(@Ptr long nr, @Ptr long xold, @Ptr long x, @Ptr long y, @Ptr long n, @Ptr long con, @Ptr long icomp, @Ptr long nd, @Ptr long rpar, @Ptr long ipar, @Ptr long irtrn) { apply((Pointer)Pointer.pointerToAddress(nr, Integer.class), (Pointer)Pointer.pointerToAddress(xold, Double.class), (Pointer)Pointer.pointerToAddress(x, Double.class), (Pointer)Pointer.pointerToAddress(y, Double.class), (Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(con, Double.class), (Pointer)Pointer.pointerToAddress(icomp, Integer.class), (Pointer)Pointer.pointerToAddress(nd, Integer.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class), (Pointer)Pointer.pointerToAddress(irtrn, Integer.class)); } }; /** native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h:56 */ public static abstract class dopri5_fcn_callback extends Callback { public void apply(Pointer n, Pointer x, Pointer y, Pointer f, Pointer rpar, Pointer ipar) { apply(Pointer.getPeer(n), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(f), Pointer.getPeer(rpar), Pointer.getPeer(ipar)); } public void apply(@Ptr long n, @Ptr long x, @Ptr long y, @Ptr long f, @Ptr long rpar, @Ptr long ipar) { apply((Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(x, Double.class), (Pointer)Pointer.pointerToAddress(y, Double.class), (Pointer)Pointer.pointerToAddress(f, Double.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class)); } }; /** native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h:63 */ public static abstract class dopri5_solout_callback extends Callback { public void apply(Pointer nr, Pointer xold, Pointer x, Pointer y, Pointer n, Pointer con, Pointer icomp, Pointer nd, Pointer rpar, Pointer ipar, Pointer irtrn) { apply(Pointer.getPeer(nr), Pointer.getPeer(xold), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(n), Pointer.getPeer(con), Pointer.getPeer(icomp), Pointer.getPeer(nd), Pointer.getPeer(rpar), Pointer.getPeer(ipar), Pointer.getPeer(irtrn)); } public void apply(@Ptr long nr, @Ptr long xold, @Ptr long x, @Ptr long y, @Ptr long n, @Ptr long con, @Ptr long icomp, @Ptr long nd, @Ptr long rpar, @Ptr long ipar, @Ptr long irtrn) { apply((Pointer)Pointer.pointerToAddress(nr, Integer.class), (Pointer)Pointer.pointerToAddress(xold, Double.class), (Pointer)Pointer.pointerToAddress(x, Double.class), (Pointer)Pointer.pointerToAddress(y, Double.class), (Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(con, Double.class), (Pointer)Pointer.pointerToAddress(icomp, Integer.class), (Pointer)Pointer.pointerToAddress(nd, Integer.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class), (Pointer)Pointer.pointerToAddress(irtrn, Integer.class)); } }; /** * Original signature : DOPRI5_RETVAL dopri5_basic(double*, double*, dopri5_ode_func, int, double, double, double)
* native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h:52 */ public static IntValuedEnum dopri5_basic(Pointer stack, Pointer y, Pointer f_func, int n, double xstart, double xend, double deltax) { return FlagSet.fromValue(dopri5_basic(Pointer.getPeer(stack), Pointer.getPeer(y), Pointer.getPeer(f_func), n, xstart, xend, deltax), Cdopri5Library.dopri5_idid_e.class); } protected native static int dopri5_basic(@Ptr long stack, @Ptr long y, @Ptr long f_func, int n, double xstart, double xend, double deltax); /** * Original signature : void dopri5(int*, dopri5_fcn_callback*, double*, double*, double*, double*, double*, const int*, dopri5_solout_callback*, int*, double*, int*, int*, int*, double*, int*, int*)
* native declaration : src/main/native/codeint/cdopri5/include/cdopri5.h:54 */ public static void dopri5(Pointer n, Pointer fcn, Pointer x, Pointer y, Pointer xend, Pointer rtol, Pointer atol, Pointer itol, Pointer solout, Pointer iout, Pointer work, Pointer lwork, Pointer iwork, Pointer liwork, Pointer rpar, Pointer ipar, Pointer idid) { dopri5(Pointer.getPeer(n), Pointer.getPeer(fcn), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(xend), Pointer.getPeer(rtol), Pointer.getPeer(atol), Pointer.getPeer(itol), Pointer.getPeer(solout), Pointer.getPeer(iout), Pointer.getPeer(work), Pointer.getPeer(lwork), Pointer.getPeer(iwork), Pointer.getPeer(liwork), Pointer.getPeer(rpar), Pointer.getPeer(ipar), Pointer.getPeer(idid)); } protected native static void dopri5(@Ptr long n, @Ptr long fcn, @Ptr long x, @Ptr long y, @Ptr long xend, @Ptr long rtol, @Ptr long atol, @Ptr long itol, @Ptr long solout, @Ptr long iout, @Ptr long work, @Ptr long lwork, @Ptr long iwork, @Ptr long liwork, @Ptr long rpar, @Ptr long ipar, @Ptr long idid); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy