public Weight invertSign ( ) { if ( isInfinity ) { if ( posOrNeg ) { return WeightFactory . NEG_INFINITY ; } else { return WeightFactory . POS_INFINITY ; } } return new Weight ( - val ) ; }
Creates a new weight with the opposite sign .