congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DoubleResult.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.openscience.cdk.qsar.result.DoubleResult
constructor

Best Java code snippets using org.openscience.cdk.qsar.result.DoubleResult.<init> (Showing top 20 results out of 315)

origin: cdk/cdk

@Override
public IDescriptorResult getDescriptorResultType() {
  return new DoubleResult(0.0);
}
origin: org.openscience.cdk/cdk-io

private IDescriptorResult newDescriptorResult(String descriptorValue) {
  IDescriptorResult result = null;
  if ("xsd:double".equals(currentDescriptorDataType)) {
    result = new DoubleResult(Double.parseDouble(descriptorValue));
  } else if ("xsd:integer".equals(currentDescriptorDataType)) {
    result = new IntegerResult(Integer.parseInt(descriptorValue));
  } else if ("xsd:boolean".equals(currentDescriptorDataType)) {
    result = new BooleanResult(Boolean.valueOf(descriptorValue));
  }
  return result;
}
origin: cdk/cdk

private IDescriptorResult newDescriptorResult(String descriptorValue) {
  IDescriptorResult result = null;
  if ("xsd:double".equals(currentDescriptorDataType)) {
    result = new DoubleResult(Double.parseDouble(descriptorValue));
  } else if ("xsd:integer".equals(currentDescriptorDataType)) {
    result = new IntegerResult(Integer.parseInt(descriptorValue));
  } else if ("xsd:boolean".equals(currentDescriptorDataType)) {
    result = new BooleanResult(Boolean.valueOf(descriptorValue));
  }
  return result;
}
origin: cdk/cdk

private DescriptorValue getDummyDescriptorValue(Exception e) {
  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
      Double.NaN), NAMES, e);
}
origin: org.openscience.cdk/cdk-legacy

private DescriptorValue getDummyDescriptorValue(Exception e) {
  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
      Double.NaN), DESCRIPTOR_NAMES, e);
}
origin: org.openscience.cdk/cdk-qsarmolecular

/**
 *{@inheritDoc}
 *
 * @param e the exception
 * @return a dummy value
 */
private DescriptorValue getDummyDescriptorValue(Exception e) {
  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
      Double.NaN), getDescriptorNames(), e);
}
origin: cdk/cdk

/**
 *{@inheritDoc}
 *
 * @param e the exception
 * @return a dummy value
 */
private DescriptorValue getDummyDescriptorValue(Exception e) {
  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
      Double.NaN), getDescriptorNames(), e);
}
origin: org.openscience.cdk/cdk-qsarmolecular

private DescriptorValue getDummyDescriptorValue(Exception e) {
  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
      Double.NaN), getDescriptorNames(), e);
}
origin: cdk/cdk

private DescriptorValue getDummyDescriptorValue(Exception e) {
  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
      Double.NaN), getDescriptorNames(), e);
}
origin: cdk/cdk

@Override
public DescriptorValue calculate(IBond bond, IAtomContainer ac) {
  ensureIsotopeFactory();
  if (bond.getAtomCount() != 2) {
    return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
        Double.NaN), NAMES, new CDKException("Only 2-center bonds are considered"));
  }
  IAtom[] atoms = BondManipulator.getAtomArray(bond);
  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
      Math.abs(factory.getElement(atoms[0].getSymbol()).getAtomicNumber()
               - factory.getElement(atoms[1].getSymbol()).getAtomicNumber())), NAMES);
}
origin: cdk/cdk

@Test
public void testDescriptorValue_DescriptorSpecification_arrayString_arrayObject_IDescriptorResult_arrayString() {
  DescriptorSpecification spec = new DescriptorSpecification(DESC_REF, DESC_IMPL_TITLE, DESC_IMPL_ID,
      DESC_IMPL_VENDOR);
  DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], new DoubleResult(0.7),
      new String[]{"bla"});
  Assert.assertNotNull(value);
}
origin: cdk/cdk

@Test
public void testDoubleResult_double() {
  DoubleResult result = new DoubleResult(5.0);
  Assert.assertNotNull(result);
}
origin: cdk/cdk

@Test
public void testDoubleValue() {
  DoubleResult result = new DoubleResult(5);
  Assert.assertEquals(5.0, result.doubleValue(), 0.000001);
}
origin: cdk/cdk

@Test
public void testToString() {
  DoubleResult result = new DoubleResult(5.0);
  Assert.assertEquals("5.0", result.toString());
}
origin: cdk/cdk

  @Test
  public void testLength() {
    DoubleResult result = new DoubleResult(5);
    Assert.assertEquals(1, result.length());
  }
}
origin: cdk/cdk

  @Test
  public void testGetException() {
    DescriptorSpecification spec = new DescriptorSpecification(DESC_REF, DESC_IMPL_TITLE, DESC_IMPL_ID,
        DESC_IMPL_VENDOR);
    DoubleResult doubleVal = new DoubleResult(0.7);
    DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], doubleVal, new String[]{"bla"},
        new CDKException("A test exception"));
    Assert.assertThat(value.getException(), is(instanceOf(CDKException.class)));
  }
}
origin: cdk/cdk

@Test
public void testGetParameterNames() {
  DescriptorSpecification spec = new DescriptorSpecification(DESC_REF, DESC_IMPL_TITLE, DESC_IMPL_ID,
      DESC_IMPL_VENDOR);
  DoubleResult doubleVal = new DoubleResult(0.7);
  DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], doubleVal, new String[]{"bla"});
  Assert.assertEquals(0, value.getParameterNames().length);
}
origin: cdk/cdk

@Test
public void testGetParameters() {
  DescriptorSpecification spec = new DescriptorSpecification(DESC_REF, DESC_IMPL_TITLE, DESC_IMPL_ID,
      DESC_IMPL_VENDOR);
  DoubleResult doubleVal = new DoubleResult(0.7);
  DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], doubleVal, new String[]{"bla"});
  Assert.assertEquals(0, value.getParameters().length);
}
origin: cdk/cdk

@Test
public void testGetSpecification() {
  DescriptorSpecification spec = new DescriptorSpecification(DESC_REF, DESC_IMPL_TITLE, DESC_IMPL_ID,
      DESC_IMPL_VENDOR);
  DoubleResult doubleVal = new DoubleResult(0.7);
  DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], doubleVal, new String[]{"bla"});
  Assert.assertEquals(spec, value.getSpecification());
}
origin: cdk/cdk

@Test
public void testGetValue() {
  DescriptorSpecification spec = new DescriptorSpecification(DESC_REF, DESC_IMPL_TITLE, DESC_IMPL_ID,
      DESC_IMPL_VENDOR);
  DoubleResult doubleVal = new DoubleResult(0.7);
  DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], doubleVal, new String[]{"bla"});
  Assert.assertEquals(doubleVal, value.getValue());
}
org.openscience.cdk.qsar.resultDoubleResult<init>

Popular methods of DoubleResult

  • doubleValue
  • length
  • toString

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Path (java.nio.file)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JTextField (javax.swing)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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