All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.carrot2.mahout.math.function.Mult Maven / Gradle / Ivy

Go to download

Carrot2 search results clustering framework. Minimal functional subset (core algorithms and infrastructure, no document sources).

There is a newer version: 3.16.3
Show newest version
/* Imported from Mahout. */package org.carrot2.mahout.math.function;



public final class Mult implements DoubleFunction {

  private double multiplicator;

  Mult(double multiplicator) {
    this.multiplicator = multiplicator;
  }

  
  @Override
  public double apply(double a) {
    return a * multiplicator;
  }

  
  public static Mult div(double constant) {
    return mult(1 / constant);
  }

  
  public static Mult mult(double constant) {
    return new Mult(constant);
  }

  public double getMultiplicator() {
    return multiplicator;
  }

  public void setMultiplicator(double multiplicator) {
    this.multiplicator = multiplicator;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy