public int get(int collapse) {
public long get(int collapse) {
    public int get(int collapse) {	// return memoized value if we have it	if (A[collapse]!=-1) {	    return A[collapse];	}	// otherwise calculate cost...	int cost;		LinearAnalyzer lfa = partitioner.getLinearAnalyzer();	// we don't worry about counting cost of non-linear nodes	if (!lfa.hasLinearRepresentation(filter)) {	    cost = 0;	} else {	    // otherwise get the representation	    LinearFilterRepresentation linearRep = lfa.getLinearRepresentation(filter);	    	    switch(collapse) {			    case LinearPartitioner.COLLAPSE_ANY: {		// if we still have flexibility, do better out of		// collapsing or not		cost = Math.min(get(LinearPartitioner.COLLAPSE_LINEAR),				Math.min(get(LinearPartitioner.COLLAPSE_FREQ),					 get(LinearPartitioner.COLLAPSE_NONE)));		break;	    }			    case LinearPartitioner.COLLAPSE_FREQ: {		if (!LEETFrequencyReplacer.canReplace(filter, lfa)) {		    cost = Integer.MAX_VALUE;		} else {		    cost = getScalingFactor(linearRep, filter) * linearRep.getCost().getFrequencyCost();		}		break;	    }			    case LinearPartitioner.COLLAPSE_LINEAR:	    case LinearPartitioner.COLLAPSE_NONE: {		cost = getScalingFactor(linearRep, filter) * linearRep.getCost().getDirectCost();		break;	    }			    default: {		Utils.fail("Unrecognized collapse value: " + collapse);		cost = -1;	    }	    }	}	if (LinearPartitioner.DEBUG) { System.err.println("Returning filter.get " + filter.getIdent() + "[" + LinearPartitioner.COLLAPSE_STRING(collapse) + "] = " + cost); }	// memoize value and return it	A[collapse] = cost;	return cost;    }