
org.carrot2.mahout.math.function.PlusMult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of carrot2-mini Show documentation
Show all versions of carrot2-mini Show documentation
Carrot2 search results clustering framework. Minimal functional subset
(core algorithms and infrastructure, no document sources).
/* Imported from Mahout. */package org.carrot2.mahout.math.function;
public final class PlusMult implements DoubleDoubleFunction {
private double multiplicator;
public PlusMult(double multiplicator) {
this.multiplicator = multiplicator;
}
@Override
public double apply(double a, double b) {
return a + b * multiplicator;
}
public static PlusMult minusMult(double constant) {
return new PlusMult(-constant);
}
public static PlusMult plusMult(double constant) {
return new PlusMult(constant);
}
public double getMultiplicator() {
return multiplicator;
}
public void setMultiplicator(double multiplicator) {
this.multiplicator = multiplicator;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy