/** * Sets the coefficient of the products. * * @param coefficients An array of double's containing the coefficients of the products * @return true if coefficients have been set. * @see #getProductCoefficients */ @Override public boolean setProductCoefficients(Double[] coefficients) { boolean result = products.setMultipliers(coefficients); return result; }
/** * Sets the coefficients of the reactants. * * @param coefficients An array of double's containing the coefficients of the reactants * @return true if coefficients have been set. * @see #getReactantCoefficients */ @Override public boolean setReactantCoefficients(Double[] coefficients) { boolean result = reactants.setMultipliers(coefficients); return result; }
/** * Sets the coefficients of the reactants. * * @param coefficients An array of double's containing the coefficients of the reactants * @return true if coefficients have been set. * @see #getReactantCoefficients */ @Override public boolean setReactantCoefficients(Double[] coefficients) { boolean result = reactants.setMultipliers(coefficients); return result; }
/** * Sets the coefficient of the products. * * @param coefficients An array of double's containing the coefficients of the products * @return true if coefficients have been set. * @see #getProductCoefficients */ @Override public boolean setProductCoefficients(Double[] coefficients) { boolean result = products.setMultipliers(coefficients); return result; }
/** * Sets the coefficient of the products. * * @param coefficients An array of double's containing the coefficients of the products * @return true if coefficients have been set. * @see #getProductCoefficients */ @Override public boolean setProductCoefficients(Double[] coefficients) { boolean result = products.setMultipliers(coefficients); notifyChanged(); return result; }
/** * Sets the coefficients of the reactants. * * @param coefficients An array of double's containing the coefficients of the reactants * @return true if coefficients have been set. * @see #getReactantCoefficients */ @Override public boolean setReactantCoefficients(Double[] coefficients) { boolean result = reactants.setMultipliers(coefficients); notifyChanged(); return result; }
/** * Sets the coefficient of the products. * * @param coefficients An array of double's containing the coefficients of the products * @return true if coefficients have been set. * @see #getProductCoefficients */ @Override public boolean setProductCoefficients(Double[] coefficients) { boolean result = products.setMultipliers(coefficients); notifyChanged(); return result; }
/** * Sets the coefficients of the reactants. * * @param coefficients An array of double's containing the coefficients of the reactants * @return true if coefficients have been set. * @see #getReactantCoefficients */ @Override public boolean setReactantCoefficients(Double[] coefficients) { boolean result = reactants.setMultipliers(coefficients); notifyChanged(); return result; }
@Test public void testSetMultipliers_arrayDouble() { IAtomContainerSet som = (IAtomContainerSet) newChemObject(); IAtomContainer container = som.getBuilder().newInstance(IAtomContainer.class); som.addAtomContainer(container); IAtomContainer container2 = som.getBuilder().newInstance(IAtomContainer.class); som.addAtomContainer(container2); Assert.assertEquals(1.0, som.getMultiplier(0), 0.00001); Assert.assertEquals(1.0, som.getMultiplier(1), 0.00001); Double[] multipliers = new Double[2]; multipliers[0] = 2.0; multipliers[1] = 3.0; som.setMultipliers(multipliers); Assert.assertEquals(2.0, som.getMultiplier(0), 0.00001); Assert.assertEquals(3.0, som.getMultiplier(1), 0.00001); }