input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public double inverse double probability check range probability return math floor find root probability n 2 0 0 0 n | inverse of the cumulative binomial distribution function |
public double get interval parameter return lambda | returns the interval parameter |
public double probability double x return math exp x mean x mean 2 variance pdf denominator | probability density function of a normal gaussian distribution |
public double cumulative double x check range x 0 0 double max value return beta cumulative p x q p x | cumulative f distribution function |
public double inverse double probability check range probability if probability 0 0 return 0 0 if probability 1 0 return double max value final double y beta inverse probability if y 2 23e 308 avoid overflow return double max value else return q p y 1 0 y | inverse of the cumulative f distribution function |
public double get variance return lambda | returns the variance |
public double cumulative double x return special math complementary error x mean cdf denominator 2 | cumulative normal distribution function |
public double get success parameter return success | returns the success parameter |
public double probability double x check range x 0 0 double max value return math exp x math log lambda lambda extra math log factorial x | probability density function of a poisson distribution |
public double get mean return 1 0 success | returns the mean |
public double cumulative double x check range x 0 0 double max value double sum 0 0 for double i 0 0 i x i sum probability i return sum | cumulative poisson distribution function |
public double get variance return failure success success | returns the variance |
public double inverse double probability check range probability return math round find root probability lambda 0 0 double max value | inverse of the cumulative poisson distribution function |
public double probability double x check range x 0 0 double max value return success math pow failure x 1 | probability density function of a geometric distribution |
public double cumulative double x check range x 0 0 double max value return 1 0 math pow failure x | cumulative geometric distribution function |
public int get degrees of freedom return dgr freedom | returns the degrees of freedom |
public double inverse double probability check range probability return math log 1 0 probability math log failure | inverse of the cumulative geometric distribution function |
public double inverse double probability check range probability return alpha gamma math tan math pi probability | inverse of the cumulative cauchy distribution function |
public double probability double x double log pdf log pdf freedom log pdf 0 5 dgr freedom 1 math log 1 0 x x dgr freedom return math exp log pdf | probability density function of a students t distribution |
public double cumulative double x double a 0 5 special math incomplete beta dgr freedom dgr freedom x x 0 5 dgr freedom 0 5 return x 0 1 a a | cumulative students t distribution function |
public double inverse double probability check range probability if probability 0 0 return double max value if probability 1 0 return double max value if probability 0 5 return 0 0 return find root probability 0 0 0 5 double max value 0 5 double max value | inverse of the cumulative students t distribution function |
public double get mu parameter return normal get mean | returns the mu parameter |
public double get sigma parameter return math sqrt normal get variance | returns the sigma parameter |
public double probability double x check range x 0 0 double max value return normal probability math log x x | probability density function of a lognormal distribution |
public double cumulative double x check range x 0 0 double max value return normal cumulative math log x | cumulative lognormal distribution function |
public double inverse double probability return math exp normal inverse probability | inverse of the cumulative lognormal distribution function |
public te xformula add string s throws parse exception if s null s length 0 reset parsing variables text style null pos 0 parse and add the string parse s return this | parses the given string and inserts the resulting formula |
public int get icon height return int box get height box get depth size 0 99 insets top insets bottom | get the total height of the te xicon |
public int get icon width return int box get width size 0 99 insets left insets right | get the total width of the te xicon |
public te xformula add fraction te xformula num te xformula denom boolean rule return add new fraction atom num null null num root denom null null denom root rule | uses the given te xformulas as the numerator num and denominator denom of |
public te xformula add op te xformula op te xformula low te xformula up return add new big operator atom op null null op root low null null low root up null null up root | uses the given te xformulas as a big operator |
public te xformula add phantom te xformula phantom return add new phantom atom phantom null null phantom root | inserts the given te xformula as a phantom te xformula at the |
public te xformula add sqrt te xformula base return add nth root base te xformula null | displays the given te xformula under a root |
public astnode optimize function final function node function node return f visitor optimize function function node | optimize an already parsed in code function node code into an |
public te xformula make phantom root new phantom atom root return this | changes this te xformula into a phantom te xformula |
public te xformula make phantom boolean width boolean height boolean depth root new phantom atom root width height depth return this | changes this te xformula into a phantom te xformula |
public te xformula nth root string nth root throws parse exception return nth root new te xformula nth root | parses the given string into a te xformula puts it in the upper |
public void set insets insets insets this insets insets this insets top int 0 18f size this insets bottom int 0 18f size | set the insets of the te xicon |
public string get group char open char close throws parse exception if pos len return null int group spos char ch parse string char at pos if pos len ch open group 1 spos pos while pos len 1 group 0 pos ch parse string char at pos if ch open group else if ch close group else if ch escape pos if group 0 end of string reached but not processed properly throw new parse exception illegal end missing close pos return parse string substring spos 1 pos 1 else throw new parse exception missing open | get the contents between two delimiters |
public atom get argument throws parse exception skip white space char ch parse string char at pos if ch l group te xformula tf new te xformula te xformula sformula this formula this formula tf pos group parse this formula sformula if this formula root null row atom at new row atom at add tf root return at return tf root if ch escape atom at process escape if insertion insertion false return get argument return at pos return convert character ch | get the argument of a command in his atomic format |
public void mod environment a environment int a stack top big number a y big number a z throws exception lisp error check a environment a stack top a y java big integer null lisp error not an integer a y to string internal lisp error check a environment a stack top a z java big integer null lisp error not an integer a z to string internal todo fixme lisp error check is zero a z lisp error invalid argument java big integer a y java big integer mod a z java big integer java big decimal null | perform y mod z on the two specified integers |
public int get arity return func get arg count | get the number of arguments required by this function |
synchronized public double value double argument values return value argument values eval stack per thread | find the value of this function for a specified list of arguments |
public double value double argument values eval stack stack int arg ct func get arg count if arg ct 0 if argument values null argument values length 0 throw new illegal argument exception internal error incorrect number of arguments provided to function func apply stack return stack pop else if argument values null argument values length arg ct throw new illegal argument exception internal error incorrect number of arguments provided to function for double x argument values stack push x func apply stack return stack pop | find the value of this function for a specified list of arguments |
public expression parse string str return parse expression str | parse an expression |
public expression parse expression string str context context new context str symbol table false context bldr start 0 type real type type do parse context if type type complex error context vmm parser expected real found complex if type type boolean error context vmm parser expected real found boolean return new expression context bldr finish type real | parse a real valued expression |
public function1 parse function1 string name string definition string argument name return function1 parse function name definition argument name | define a real valued function of one real argument by parsing its definition |
public function2 parse function2 string name string definition string argument name1 string argument name2 return function2 parse function name definition argument name1 argument name2 | define a real valued function of two real arguments by parsing its definition |
public function3 parse function3 string name string definition string argument name1 string argument name2 string argument name3 return function3 parse function name definition argument name1 argument name2 argument name3 | define a real valued function of three real arguments by parsing its definition |
public complex expression parse complex expression string str context context new context str symbol table true context bldr start 0 type complex type type do parse context if type type boolean error context vmm parser expected compplex found boolean if type type real context bldr add stack op stack op real to complex return new complex expression context bldr finish type complex | parse a complex valued expression |
public complex function1 parse complex function1 string name string definition string argument name return complex function1 parse complex function name definition argument name | define a complex valued function of one real argumentsby parsing its definition |
public complex function2 parse complex function2 string name string definition string argument name1 string argument name2 return complex function2 parse complex function name definition argument name1 argument name2 | define a conplex valued function of two complex arguments by parsing its definition |
public complex function3 parse complex function3 string name string definition string argument name1 string argument name2 string argument name3 return complex function3 parse complex function name definition argument name1 argument name2 argument name3 | define a conplex valued function of three complex arguments by parsing its definition |
public void add variable v symbol table put v get name to lower case v | add a variable that can then be used as a parameter in expressions |
public double get val return x | returns the current value of this variable |
public void set val double x this x x | sets the value of this variable |
public complex value eval stack stack func apply stack return stack pop complex | evaluate this expression using a non null stack provided as a parameter |
public void value eval stack stack complex answer func apply stack stack pop complex answer | evaluate this expression using a non null stack provided as a parameter |
public complex get val return new complex re im | returns the value of this variable as an object of type complex |
public void set val double re double im this re im this im im | sets the value of this variable |
public void set val complex c if c null this re 0 this im 0 else this re c re this im c im | set the value of this variable |
public double value eval stack stack func apply stack return stack pop | evaluate this expression using a stack provided as a parameter |
public object get string name return symbol table get name to lower case | gets the object from the parsers symbol table that has the specified name |
public void remove string object name symbol table remove object name to lower case | removes the object from the parsers symbol table that has the specified name |
protected vector3 d extract point from data double point data if is autonomous return new vector3 d point data 0 point data 1 point data 2 else return new vector3 d point data 1 point data 2 point data 3 | extract from the data for a point on the integral curve the actual |
public point2 d get point int i return points get i | gets the i th point from the list |
public void set style int style if this style style style dots style lines this style style | set the style used to draw the points either orbit point2 d |
public void add point point2 d pt points add pt | adds a specified point to the end of the list |
public void add points point2 d pts if pts null pts length 0 for int i 0 i pts length i points add pts i | adds all the points from an array to the curve by calling |
protected void do draw graphics2 d g view view transform transform if can show vector field return if view instanceof odeview odeview view show direction field draw direction field view transform | draws a direction field but only for an exhbit in which the |
public void draw point view view int index point2 d p1 p0 p1 points get index if p1 null return switch style case lines p0 index 0 p1 point2 d points get index 1 if p0 null return view draw line p0 p1 break case dots view draw dot p1 dot diameter break | draws the point at the specified index with a connecting line to the |
public void draw graphics2 d g view view transform transform color save color g get color if color null g set color color if style lines point2 d pts new point2 d points size points to array pts view draw curve pts else for point2 d p points view draw dot p dot diameter if color null g set color save color | draws the entire list of points |
public view get default view return new odeview | returns a view of type |
protected point2 d extract point from data double point data if is autonomous return new point2 d double point data 0 point data 1 else return new point2 d double point data 1 point data 2 | extract from the data for a point on the integral curve the actual |
public vector3 d get point int i return points get i | gets the i th point from the list |
public void add point vector3 d pt points add pt | adds a specified point to the end of the list |
public void add points vector3 d pts if pts null pts length 0 for int i 0 i pts length i points add pts i | adds all the points from an array to the curve by calling |
public void draw point view3 d view int index vector3 d p1 p0 p1 points get index if p1 null return switch style case lines p0 index 0 p1 vector3 d points get index 1 if p0 null return view draw line p0 p1 break case dots view draw dot p1 dot diameter break | draws the point at the specified index with a connecting line to the |
public void draw graphics2 d g view3 d view transform transform color save color g get color if view get view style view3 d red green stereo view g set color color white else if color null g set color color if style lines vector3 d pts new vector3 d points size points to array pts view draw curve pts else for vector3 d p points view draw dot p dot diameter if color null g set color save color | draws the entire list of points |
public view get default view return new ifsview | returns a view of type |
public void parameter changed parameter param object old value object new value super parameter changed param old value new value if param truncation stellation wanted false double val truncation get value if val 0 995 truncation select set selected index 0 else if math abs val 2 0 3 0 0 005 truncation select set selected index 1 else if val 0 505 truncation select set selected index 2 else truncation select set selected index 1 | this is overridden to keep the selected item in the action group |
protected orbit get current orbit return current orbit | returns the current orbit shown in green if any |
protected void set current orbit orbit orbit if current orbit orbit return if current orbit null current orbit set is current orbit false current orbit orbit if current orbit null current orbit set is current orbit true continue orbit action set enabled current orbit null | sets the current orbit shown in green |
public boolean get connect dots on orbit return connect dots on orbit | tells whether orbits should be drawn as dots or as solid lines |
public double x value double t double aa amplitude1 get value get the current values of the three parameters long n math round frequency2 get value double p phase get value return aa math sin n t p | define the x coordinate function for the curve |
public double y value double t double bb amplitude2 get value long m math round frequency1 get value return bb math cos m t | define the y coordinate function for the curve |
public double x derivative value double t return 2 sin t 2 sin 2 t | override the numerical differentiation x value t |
public double y derivative value double t return 2 cos t 2 cos 2 t | override the numerical differentiation y value t |
private void abbreviations double t a aa get value xa x value t ya y value t aux math sqrt ya 2 a ya xco xa math signum xa aux yco 2 ya a rotx xa math signum xa aux roty a rotx xco yco a ex xco rotx ey yco a nn math sqrt ex ex ey ey tx roty ya ty rotx xa dt tmax get value tmin get value t resolution get value | t dependent abbreviations for draw needed stuff |
public double x value double t aa aa get value return aa math sin t | define the x coordinate function x t aa sin t for the curve |
public void do draw graphics2 d g view view transform limits if points length 0 return super do draw g view limits if view instanceof plane curve parametric view plane curve parametric view view fraction to draw 1 return general path curve new general path curve move to float points 0 get x float points 0 get y for int i 1 i points length i curve line to float points i get x float points i get y g draw curve | draw the hyperbola |
public view get default view view view new mmoview view set show axes true return view | overridden to return a view of type mmoview |
public basic animator get morphing animation view view int looping final basic animator anim super get morphing animation view looping if anim null return null final decorateable owner view null decorateable this decorateable view anim add change listener new change listener this change listener is reponsible for adding the decoration when the animation starts and for removing it when the animation ends decoration dec new focus directrix decoration public void state changed change event evt if anim is running owner add decoration dec else owner remove decoration dec return anim | returns a modified morphing animation that adds foci and directrix during the animation |
public boolean get use cloud return use cloud | tells whether grid lines are drawn in colors |
public double y value double t double aa aa get value return aa cosh t aa | define the y coordinate function y t aa cosh t for the curve |
public double x value double t return t t 1 t 1 3 t 3 t t | define the x coordinate function for the curve |
public double y value double t return t 1 2 t t t 1 3 t 3 t t | define the y coordinate function for the curve |
public double x value double t return t | define the x coordinate function x t t for the parametric curve |
public double x derivative value double t double dx 0 001 todo decide what value to use here and in second derivative double f1 x value t dx double f2 x value t 2 dx double g1 x value t dx double g2 x value t 2 dx return 8 f1 g2 f2 8 g1 12 dx | computes x t for a given value of t |
public double y derivative value double t double dx 0 001 double f1 y value t dx double f2 y value t 2 dx double g1 y value t dx double g2 y value t 2 dx return 8 f1 g2 f2 8 g1 12 dx | computes y t for a given value of t |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.