public class WeightedBipolarSentiment extends Object implements Sentiment, BipolarSentimentProvider, ScalarArithmetic<WeightedBipolarSentiment,Double>, ObjectArithmetic<WeightedBipolarSentiment>
| Constructor and Description |
|---|
WeightedBipolarSentiment()
all weights set to 0
|
WeightedBipolarSentiment(double positive,
double negative,
double neutral) |
public WeightedBipolarSentiment()
public WeightedBipolarSentiment(double positive, double negative, double neutral)
positive - the positivenegative - the negativeneutral - the neutralpublic double positive()
public double negative()
public double neutral()
public BipolarSentiment bipolar()
bipolar in interface BipolarSentimentProviderpublic BipolarSentiment bipolar(double deltaThresh)
bipolar in interface BipolarSentimentProviderdeltaThresh - A a proportional thresholdpublic void fromMap(Map<String,?> map) throws UnrecognisedMapException
fromMap in interface Sentimentmap - the map containing this sentimentUnrecognisedMapExceptionpublic WeightedBipolarSentiment addInplace(WeightedBipolarSentiment that)
ObjectArithmeticaddInplace in interface ObjectArithmetic<WeightedBipolarSentiment>that - add s to thispublic WeightedBipolarSentiment add(WeightedBipolarSentiment that)
ObjectArithmeticadd in interface ObjectArithmetic<WeightedBipolarSentiment>that - add s to a copy of thispublic WeightedBipolarSentiment divide(WeightedBipolarSentiment that)
ObjectArithmeticdivide in interface ObjectArithmetic<WeightedBipolarSentiment>that - divide a copy of this by spublic WeightedBipolarSentiment divideInplace(WeightedBipolarSentiment that)
ObjectArithmeticdivideInplace in interface ObjectArithmetic<WeightedBipolarSentiment>that - divide this by spublic WeightedBipolarSentiment clone()
public double total()
public WeightedBipolarSentiment add(Double f)
ScalarArithmeticadd in interface ScalarArithmetic<WeightedBipolarSentiment,Double>f - add s to a copy of thispublic WeightedBipolarSentiment addInplace(Double f)
ScalarArithmeticaddInplace in interface ScalarArithmetic<WeightedBipolarSentiment,Double>f - add s to thispublic WeightedBipolarSentiment divide(Double d)
ScalarArithmeticdivide in interface ScalarArithmetic<WeightedBipolarSentiment,Double>d - divide a copy of this by spublic WeightedBipolarSentiment divideInplace(Double d)
ScalarArithmeticdivideInplace in interface ScalarArithmetic<WeightedBipolarSentiment,Double>d - divide this by spublic WeightedBipolarSentiment subtract(WeightedBipolarSentiment s)
ObjectArithmeticsubtract in interface ObjectArithmetic<WeightedBipolarSentiment>s - minus a copy of this by spublic WeightedBipolarSentiment subtractInplace(WeightedBipolarSentiment f)
ObjectArithmeticsubtractInplace in interface ObjectArithmetic<WeightedBipolarSentiment>f - minus this by spublic WeightedBipolarSentiment multiply(WeightedBipolarSentiment that)
ObjectArithmeticmultiply in interface ObjectArithmetic<WeightedBipolarSentiment>that - times a copy of this by spublic WeightedBipolarSentiment multiplyInplace(WeightedBipolarSentiment that)
ObjectArithmeticmultiplyInplace in interface ObjectArithmetic<WeightedBipolarSentiment>that - times this by spublic WeightedBipolarSentiment multiply(Double value)
ScalarArithmeticmultiply in interface ScalarArithmetic<WeightedBipolarSentiment,Double>value - times a copy of this by spublic WeightedBipolarSentiment multiplyInplace(Double value)
ScalarArithmeticmultiplyInplace in interface ScalarArithmetic<WeightedBipolarSentiment,Double>value - times this by spublic WeightedBipolarSentiment subtract(Double s)
ScalarArithmeticsubtract in interface ScalarArithmetic<WeightedBipolarSentiment,Double>s - minus a copy of this by spublic WeightedBipolarSentiment subtractInplace(Double s)
ScalarArithmeticsubtractInplace in interface ScalarArithmetic<WeightedBipolarSentiment,Double>s - minus this by spublic boolean containsNaN()
public WeightedBipolarSentiment logInplace()
public void neutral(double neutral)
neutral - public void negative(double negative)
negative - public void positive(double positive)
positive - public void correctNaN(double d)
d - set NaN instances to this valuepublic WeightedBipolarSentiment expInplace()
Math.exp(double) each value inplacepublic WeightedBipolarSentiment clipMaxInplace(double d)
d -