public void insertPointConstraint ( Constraint con , int ... ind ) { assert con . getVariableSize ( ) == 1 ; for ( int i : ind ) { for ( int j = 0 ; j < constraints . size ( ) ; j ++ ) { int [ ] index = constraints . get ( j ) . getInds ( ) ; if ( index [ index . length - 1 ] == i ) { constraints . add ( j + 1 , new MappedConst ( con , i ) ) ; break ; } } } }
A point constraint deals with only one element in a match checks its validity . This method injects the parameter constraint multiple times among the list of mapped constraints to the specified indexes .