Examples of Rational


Examples of DSP.filter.Rational

   *
   * @return     Rational object containing the resulting transfer function representation.
   */
  protected void computeTransferFunction() {
   
    T = new Rational( 1.0 );
   
    for ( int i = 0;  i < sections.size();  i++ )
      T.timesEquals( sections.get(i) );
   
  }
View Full Code Here

Examples of DSP.filter.Rational

   *
   * @return      Rational object containing the transfer function representation for the filter.
   */
  public Rational getTransferFunction() {
    if ( T == null ) computeTransferFunction();
    return new Rational( T );
  }
View Full Code Here

Examples of cc.redberry.core.number.Rational

        List<Tensor> toMultiply = new ArrayList<>(map.size());
        for (SortedMap.Entry<GenPolynomial<BigInteger>, Long> entry : map.entrySet())
            toMultiply.add(Tensors.pow(poly2Tensor(entry.getKey(), varsArray),
                    new Complex(entry.getValue())));
        if (!gcd.equals(java.math.BigInteger.ONE) || !lcm.equals(java.math.BigInteger.ONE))
            toMultiply.add(new Complex(new Rational(gcd, lcm)));

        return Tensors.multiply(toMultiply.toArray(new Tensor[toMultiply.size()]));
    }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.types.real.Rational

  private static BigDecimal decimal(String s) {
    return new BigDecimal( s );
  }

  private static Rational rational(Number n, Number d) {
    return new Rational( n, d );
  }
View Full Code Here

Examples of com.drew.lang.Rational

    }

    public void testXResolutionDescription() throws Exception
    {
        ExifDirectory directory = new ExifDirectory();
        directory.setRational(ExifDirectory.TAG_X_RESOLUTION, new Rational(72, 1));
        // 2 is for 'Inch'
        directory.setInt(ExifDirectory.TAG_RESOLUTION_UNIT, 2);
        ExifDescriptor descriptor = new ExifDescriptor(directory);
        assertEquals("72 dots per inch", descriptor.getDescription(ExifDirectory.TAG_X_RESOLUTION));
    }
View Full Code Here

Examples of com.drew.lang.Rational

    }

    public void testYResolutionDescription() throws Exception
    {
        ExifDirectory directory = new ExifDirectory();
        directory.setRational(ExifDirectory.TAG_Y_RESOLUTION, new Rational(50, 1));
        // 3 is for 'cm'
        directory.setInt(ExifDirectory.TAG_RESOLUTION_UNIT, 3);
        ExifDescriptor descriptor = new ExifDescriptor(directory);
        assertEquals("50 dots per cm", descriptor.getDescription(ExifDirectory.TAG_Y_RESOLUTION));
    }
View Full Code Here

Examples of com.drew.lang.Rational

    }

    public String getDigitalZoomDescription() throws MetadataException
    {
        if (!_directory.containsTag(NikonType1MakernoteDirectory.TAG_NIKON_TYPE1_DIGITAL_ZOOM)) return null;
        Rational value = _directory.getRational(NikonType1MakernoteDirectory.TAG_NIKON_TYPE1_DIGITAL_ZOOM);
        if (value.getNumerator() == 0) {
            return "No digital zoom";
        }
        return value.toSimpleString(true) + "x digital zoom";
    }
View Full Code Here

Examples of com.drew.lang.Rational

    }

    public String getFocusDescription() throws MetadataException
    {
        if (!_directory.containsTag(NikonType1MakernoteDirectory.TAG_NIKON_TYPE1_FOCUS)) return null;
        Rational value = _directory.getRational(NikonType1MakernoteDirectory.TAG_NIKON_TYPE1_FOCUS);
        if (value.getNumerator() == 1 && value.getDenominator() == 0) {
            return "Infinite";
        }
        return value.toSimpleString(true);
    }
View Full Code Here

Examples of com.drew.lang.Rational

    public void testXResolution() throws Exception
    {
        String fileName = "src/com/drew/metadata/exif/test/manuallyAddedThumbnail.jpg";
        Metadata metadata = new ExifReader(new File(fileName)).extract();
        Directory directory = metadata.getDirectory(ExifDirectory.class);
        Rational rational = directory.getRational(ExifDirectory.TAG_X_RESOLUTION);
        assertEquals(72, rational.getNumerator());
        assertEquals(1, rational.getDenominator());
    }
View Full Code Here

Examples of com.drew.lang.Rational

    public void testYResolution() throws Exception
    {
        String fileName = "src/com/drew/metadata/exif/test/manuallyAddedThumbnail.jpg";
        Metadata metadata = new ExifReader(new File(fileName)).extract();
        Directory directory = metadata.getDirectory(ExifDirectory.class);
        Rational rational = directory.getRational(ExifDirectory.TAG_Y_RESOLUTION);
        assertEquals(72, rational.getNumerator());
        assertEquals(1, rational.getDenominator());
    }
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.