Examples of simplify()


Examples of org.sbml.jsbml.UnitDefinition.simplify()

    ud2.addUnit(new Unit(Unit.Kind.JOULE, level, version));
    ud2.addUnit(new Unit(Unit.Kind.MOLE, -1, level, version));
   
    System.out.printf("\n%s / %s\t=\t", UnitDefinition.printUnits(ud, true), UnitDefinition.printUnits(ud2, true));
    ud.divideBy(ud2);
    ud.simplify();
    System.out.println(UnitDefinition.printUnits(ud, true));
   
    ud = new UnitDefinition(level, version);
    ud.addUnit(new Unit(-3, Unit.Kind.MOLE, 1d, level, version));
    ud.addUnit(new Unit(Unit.Kind.LITRE, -1d, level, version));
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    ud2 = new UnitDefinition(level, version);
    ud2.addUnit(new Unit(-3, Unit.Kind.MOLE, 1d, level, version));
    ud2.addUnit(new Unit(Unit.Kind.LITRE, -1d, level, version));
    ud.divideBy(ud2);
    System.out.println(UnitDefinition.printUnits(ud, true));
    ud.simplify();
    System.out.println(UnitDefinition.printUnits(ud, true));
  }

}
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    udef = ud1.clone().multiplyWith(ud2).simplify();
    printTask('*', ud1, ud2, udef);
    assertTrue(UnitDefinition.printUnits(udef, true).equals("\u03BCmol"));
   
    udef = ud1.clone().multiplyWith(ud2);
    udef = udef.simplify();
    udef = udef.divideBy(ud3);
    System.out.println(c(ud1) + '*' + c(ud2) + '/' + c(ud3) + " = " + c(udef));
    assertTrue(UnitDefinition.printUnits(udef, true).equals("\u03BCmol*(3600*s)^(-1)"));
   
    udef = ud3.clone().divideBy(ud4).simplify();
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    // u.setOffset(-271.15);
    ud.addUnit(u);
    ud.addUnit(new Unit(Unit.Kind.NEWTON, 2, level, version));
    ud.addUnit(new Unit(Unit.Kind.GRAM, 0, level, version));
    System.out.println(UnitDefinition.printUnits(ud, true));
    System.out.println(UnitDefinition.printUnits(ud.simplify(), true));
    ud.convertToSIUnits();
    System.out.println(UnitDefinition.printUnits(ud,true));

    // AMPERE CELSIUS GRAM NEWTON SIEMENS VOLT WEBER
    // A °C^3 1 N^2 S^4 V^2 1
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    ud2.addUnit(new Unit(Unit.Kind.JOULE, 5, level, version));
    ud2.addUnit(new Unit(Unit.Kind.MOLE, 5, level, version));

    System.out.printf("\n%s / %s\t=\t", UnitDefinition.printUnits(ud, true), UnitDefinition.printUnits(ud2, true));
    ud.divideBy(ud2);
    ud.simplify();
    System.out.println(UnitDefinition.printUnits(ud, true));

    ud = new UnitDefinition(level, version);
    ud.addUnit(new Unit(-3, Unit.Kind.MOLE, 2, level, version));
    ud.addUnit(new Unit(-3, Unit.Kind.LITRE, -2, level, version));
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    ud2.addUnit(new Unit(-3, Unit.Kind.LITRE, -1, level, version));

    System.out.printf("\n%s * %s\t=\t", UnitDefinition.printUnits(ud, true), UnitDefinition.printUnits(ud2, true));

    ud.multiplyWith(ud2);
    ud.simplify();
    System.out.println(UnitDefinition.printUnits(ud, true));

    ud = new UnitDefinition(level, version);
    ud.addUnit(new Unit(18, Unit.Kind.JOULE, 6, level, version));
    ud2 = new UnitDefinition(level, version);
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    ud2 = new UnitDefinition(level, version);
    ud2.addUnit(new Unit(-3, Unit.Kind.MOLE, -6, level, version));

    System.out.printf("\n%s / %s\t=\t", UnitDefinition.printUnits(ud, true), UnitDefinition.printUnits(ud2, true));
    ud.divideBy(ud2);
    ud.simplify();
    System.out.println(UnitDefinition.printUnits(ud, true));

    ud = new UnitDefinition(level, version);
    ud.addUnit(new Unit(18, Unit.Kind.JOULE, 6, level, version));
    ud.addUnit(new Unit(-3, Unit.Kind.MOLE, -6, level, version));
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    ud2.addUnit(new Unit(Unit.Kind.JOULE, level, version));
    ud2.addUnit(new Unit(Unit.Kind.MOLE, -1, level, version));

    System.out.printf("\n%s / %s\t=\t", UnitDefinition.printUnits(ud, true), UnitDefinition.printUnits(ud2, true));
    ud.divideBy(ud2);
    ud.simplify();
    System.out.println(UnitDefinition.printUnits(ud, true));

    ud = new UnitDefinition(level, version);
    ud.addUnit(new Unit(-3, Unit.Kind.MOLE, 1d, level, version));
    ud.addUnit(new Unit(Unit.Kind.LITRE, -1d, level, version));
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    ud2 = new UnitDefinition(level, version);
    ud2.addUnit(new Unit(-3, Unit.Kind.MOLE, 1d, level, version));
    ud2.addUnit(new Unit(Unit.Kind.LITRE, -1d, level, version));
    ud.divideBy(ud2);
    System.out.println(UnitDefinition.printUnits(ud, true));
    ud.simplify();
    System.out.println(UnitDefinition.printUnits(ud, true));
  }

}
View Full Code Here

Examples of org.sbml.jsbml.UnitDefinition.simplify()

    // u.setOffset(-271.15);
    ud.addUnit(u);
    ud.addUnit(new Unit(Unit.Kind.NEWTON, 2, level, version));
    ud.addUnit(new Unit(Unit.Kind.GRAM, 0, level, version));
    System.out.println(UnitDefinition.printUnits(ud, true));
    System.out.println(UnitDefinition.printUnits(ud.simplify(), true));
    ud.convertToSIUnits();
    System.out.println(UnitDefinition.printUnits(ud,true));

    // AMPERE CELSIUS GRAM NEWTON SIEMENS VOLT WEBER
    // A °C^3 1 N^2 S^4 V^2 1
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.