Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28548 > unrolled thread

create varX = new Variable.Local<Rational>("x");

Started byMohamad Khaleghy <mohamad.khaleghy@gmail.com>
First post2014-05-23 07:09 -0700
Last post2014-05-23 17:12 +0200
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  create varX = new Variable.Local<Rational>("x"); Mohamad Khaleghy <mohamad.khaleghy@gmail.com> - 2014-05-23 07:09 -0700
    Re: create varX = new Variable.Local<Rational>("x"); Joerg Meier <joergmmeier@arcor.de> - 2014-05-23 17:12 +0200

#28548 — create varX = new Variable.Local<Rational>("x");

FromMohamad Khaleghy <mohamad.khaleghy@gmail.com>
Date2014-05-23 07:09 -0700
Subjectcreate varX = new Variable.Local<Rational>("x");
Message-ID<492ebb41-4310-45a4-981e-0782b2d5db9b@googlegroups.com>
Hi 
I have sample code downloaded for using jscience.

But when I use it, it gives this message:

E/AndroidRuntime(1296): java.lang.NoClassDefFoundError:org.jscience.mathematics.function.Variable$Local

Am i I missing something? Of course I imported the jscience jar lib to my project. But still can't figure this out.

    Variable.Local<Rational> varX = new Variable.Local<Rational>("x");
    Variable.Local<Rational> varY = new Variable.Local<Rational>("y");

    // f(x, y) =  x² + x·y + 1;
    Polynomial<Rational> x = Polynomial.valueOf(Rational.ONE, varX);
    Polynomial<Rational> y = Polynomial.valueOf(Rational.ONE, varY);
    Polynomial<Rational> fx_y = x.pow(2).plus(x.times(y)).plus(Rational.ONE);
    System.out.println("f(x,y) = " + fx_y);

    // Evaluates f(1,0) 
    System.out.println("f(1,0) = " + fx_y.evaluate(Rational.ONE, Rational.ZERO));

    // Calculates df(x,y)/dx
    System.out.println("df(x,y)/dx = " + fx_y.differentiate(varX));

[toc] | [next] | [standalone]


#28549

FromJoerg Meier <joergmmeier@arcor.de>
Date2014-05-23 17:12 +0200
Message-ID<1q9qgupto90tr.x0g85o1ga7zb$.dlg@40tude.net>
In reply to#28548
On Fri, 23 May 2014 07:09:05 -0700 (PDT), Mohamad Khaleghy wrote:

> Am i I missing something? Of course I imported the jscience jar lib to my project. But still can't figure this out.

Importing it lets you compile. Are you also making sure that they get
exported into the final apk ?

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web