* @author Stanislav Poslavsky
*/
class ProviderFractionFactory implements IndexMappingProviderFactory {
@Override
public IndexMappingProvider create(IndexMappingProvider opu, Tensor from, Tensor to, boolean allowDiffStates) {
final Fraction fromF = (Fraction) from, toF = (Fraction) to;
if (!IndexMappings.mappingExists(fromF.getDenominator(), toF.getDenominator(), allowDiffStates))
return IndexMappingProvider.Util.EMPTY_PROVIDER;
return IndexMappings.createPort(opu, fromF.getNumerator(), toF.getNumerator(), allowDiffStates);
}