protected static float costReplace(char x, char y) {
		int cost = 1;
		for(char[] xy: repCostChars){
			if(xy[0]==x&&xy[1]==y){
				cost =2;
				break;
			}else if(xy[0]==y&&xy[1]==x){
				cost =2;
				break;
			}
		}
		return cost;//noCostChars.indexOf(c)!=-1?1:0;
	}
protected static float costReplace ( char x , char y ) { int cost = 1 ; for ( char [ ] xy : repCostChars ) { if ( xy [ 0 ] == x && xy [ 1 ] == y ) { cost = 2 ; break ; } else if ( xy [ 0 ] == y && xy [ 1 ] == x ) { cost = 2 ; break ; } } return cost ; }
x和y肯定不同的
@param x
@param y
@return 代价