if(s1 >= 0) {  s1 = Math.min(s1,states-2);
s1 = Math.min(s1,states-2); if(s1 >= 0) {
    public LinearFilterRepresentation optimize() {	int s1, s2;					// remove unobservable states	transposeSystem();	s1 = reduceParameters(false);	transposeSystem();		cleanAll();	LinearPrinter.println("got reduction up to value " + s1);					if(s1 >= 0) {	    // for now, leave at least 1 state	    s1 = Math.min(s1,states-2);	    removeUnobservableStates(s1);	}		LinearPrinter.println("After observable reduction, before reachable reduction: " + totalMatrix);		// remove unreachable states 	s2 = reduceParameters(true);	cleanAll();	LinearPrinter.println("got reduction up to value " + s2); 	LinearPrinter.println("Before QR algorithm: " + totalMatrix);				if(s2 >= 0) {	    // for now, leave at least 1 state	    s2 = Math.min(s2,states-2);	    qr_Algorithm(s2); 	    cleanAll(); 	    zeroInitEntries(); 	    cleanAll(); 	    removeUnreachableStates(s2); 	}  			cleanAll();	LinearPrinter.println("After state reduction, before min param: " + totalMatrix);		// minimally parametrize the system			    minParametrize(true);      // put in reachable canonical form	    cleanAll();	    	    LinearFilterRepresentation tempReachableRep = extractRep();	    LinearCost tempReachableCost = tempReachableRep.getCost();	    transposeSystem();	    minParametrize(false);     // put in observable cononical form	    transposeSystem();	    cleanAll();		    LinearFilterRepresentation tempObservableRep = extractRep();	    LinearCost tempObservableCost = tempObservableRep.getCost();	    if(tempObservableCost.lessThan(tempReachableCost)) {		LinearPrinter.println("Observable rep is better");		return tempObservableRep;	    }	    else {		LinearPrinter.println("Reachable rep is better");		return tempReachableRep;	    }	  	    //                return extractRep();    }