public List < Assignment > getNonzeroAssignments ( ) { Iterator < Outcome > outcomeIter = outcomeIterator ( ) ; List < Assignment > assignments = Lists . newArrayList ( ) ; while ( outcomeIter . hasNext ( ) ) { Outcome outcome = outcomeIter . next ( ) ; if ( outcome . getProbability ( ) != 0.0 ) { assignments . add ( outcome . getAssignment ( ) ) ; } } return assignments ; }
Gets all assignments to this factor which have non - zero weight .