Tabnine Logo
Constant.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
jscl.math.function.Constant
constructor

Best Java code snippets using jscl.math.function.Constant.<init> (Showing top 8 results out of 315)

origin: org.solovyev/jscl

@Nonnull
public Variable newInstance() {
  return new Constant(name, prime, new Generic[subscripts.length]);
}
origin: org.solovyev.android/calculatorpp-core

@Nonnull
@Override
public Constant getConstant() {
  if (constant == null) {
    constant = new Constant(this.name);
  }
  return constant;
}
origin: org.solovyev/jscl

@Override
public Generic selfExpand() {
  Generic localContent = content;
  try {
    for (String parameterName : parameterNames) {
      localContent = localContent.substitute(new Constant(parameterName), Expression.valueOf(new Constant(getParameterNameForConstant(parameterName))));
    }
    for (int i = 0; i < parameterNames.size(); i++) {
      localContent = localContent.substitute(new Constant(getParameterNameForConstant(parameterNames.get(i))), parameters[i]);
    }
  } finally {
    for (String parameterName : parameterNames) {
      localContent = localContent.substitute(new Constant(getParameterNameForConstant(parameterName)), Expression.valueOf(new Constant(parameterName)));
    }
  }
  return localContent;
}
origin: org.solovyev/jscl

  public ConstantsRegistry() {
    this.add(new PiConstant());
    this.add(new ExtendedConstant(Constants.PI_INV, Math.PI, null));
    this.add(new ExtendedConstant(Constants.INF, Double.POSITIVE_INFINITY, "JsclDouble.valueOf(Double.POSITIVE_INFINITY)"));
    this.add(new ExtendedConstant(Constants.INF_2, Double.POSITIVE_INFINITY, "JsclDouble.valueOf(Double.POSITIVE_INFINITY)"));
    this.add(new ExtendedConstant(Constants.I, "√(-1)", null));
    this.add(new ExtendedConstant(new Constant(E), Math.E, null));
    this.add(new ExtendedConstant(new Constant(C), C_VALUE, null));
    this.add(new ExtendedConstant(new Constant(G), G_VALUE, null));
    this.add(new ExtendedConstant(new Constant(H_REDUCED), H_REDUCED_VALUE, null));
    this.add(new ExtendedConstant(new Constant(NAN), Double.NaN, null));
  }
}
origin: org.solovyev/jscl

  public Constant parse(@Nonnull Parameters p, Generic previousSumElement) throws ParseException {

    final String name = CompoundIdentifier.parser.parse(p, previousSumElement);

    List<Generic> l = new ArrayList<Generic>();
    while (true) {
      try {
        l.add(Subscript.parser.parse(p, previousSumElement));
      } catch (ParseException e) {
        break;
      }
    }

    Integer prime = 0;
    try {
      prime = Prime.parser.parse(p, previousSumElement);
    } catch (ParseException e) {
    }

    return new Constant(name, prime, ArrayUtils.toArray(l, new Generic[l.size()]));
  }
}
origin: org.solovyev/jscl

static Ordering ordering(Generic generic) {
  Variable v = generic.variableValue();
  if (v.compareTo(new Constant("lex")) == 0) return Monomial.lexicographic;
  else if (v.compareTo(new Constant("tdl")) == 0) return Monomial.totalDegreeLexicographic;
  else if (v.compareTo(new Constant("drl")) == 0) return Monomial.degreeReverseLexicographic;
  else if (v instanceof ImplicitFunction) {
    Generic g[] = ((ImplicitFunction) v).getParameters();
    int k = g[0].integerValue().intValue();
    if (v.compareTo(new ImplicitFunction("elim", new Generic[]{JsclInteger.valueOf(k)}, new int[]{0}, new Generic[]{})) == 0)
      return Monomial.kthElimination(k);
  }
  throw new ArithmeticException();
}
origin: org.solovyev/jscl

  protected void operator(MathML element, String name) {
    Variable variable[] = toVariables((JsclVector) GenericVariable.content(parameters[1]));
    MathML e1 = element.element("msub");
    new Constant(name).toMathML(e1, null);
    MathML e2 = element.element("mrow");
    for (int i = 0; i < variable.length; i++) variable[i].expressionValue().toMathML(e2, null);
    e1.appendChild(e2);
    element.appendChild(e1);
  }
}
origin: org.solovyev/jscl

protected void operator(MathML element, String name) {
  Variable variable[] = toVariables(GenericVariable.content(parameters[1]));
  MathML e1 = element.element("msubsup");
  new Constant(name).toMathML(e1, null);
  MathML e2 = element.element("mrow");
  for (int i = 0; i < variable.length; i++) variable[i].expressionValue().toMathML(e2, null);
  e1.appendChild(e2);
  e2 = element.element("mo");
  e2.appendChild(element.text("T"));
  e1.appendChild(e2);
  element.appendChild(e1);
}
jscl.math.functionConstant<init>

Popular methods of Constant

  • getName
  • bodyToMathML
  • compareTo
  • copy
  • equals
  • expressionValue
  • getId
  • hashCode
  • isIdDefined
  • isIdentity
  • isSystem
  • nameToMathML
  • isSystem,
  • nameToMathML,
  • newInstance,
  • primeChars,
  • primeCharsToMathML,
  • primeToMathML,
  • setId,
  • toMathML,
  • underscores

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now