or-syntax for lookup matches

This commit is contained in:
Arndt Brenschede 2015-02-23 20:47:55 +01:00
parent e0dbb0eb66
commit 1aa62b0b71
2 changed files with 24 additions and 8 deletions

View file

@ -706,9 +706,16 @@ public final class BExpressionContext
return minWriteIdx;
}
float getLookupMatch( int nameIdx, int valueIdx )
float getLookupMatch( int nameIdx, int[] valueIdxArray )
{
return lookupData[nameIdx] == valueIdx ? 1.0f : 0.0f;
for( int i=0; i<valueIdxArray.length; i++ )
{
if ( lookupData[nameIdx] == valueIdxArray[i] )
{
return 1.0f;
}
}
return 0.0f;
}
public int getLookupNameIdx( String name )