Package com.semedy.reasoner.api.builtin
Interface FunctionalBuiltin
- All Superinterfaces:
Builtin
- All Known Implementing Classes:
Assign
,ClassFunctionBuiltin
,Code
,ConcatMany
,ContainsSequence
,Cosine2
,Cosine3
,CreateCircle
,CreateCircleWithDistanceUnit
,CreateJsonID
,CreatePoint
,CreatePolygon
,CreatePolygon
,CreatePolygon2
,CreatePolygonFromPoints
,Damerau
,Day
,FilterExpression
,Formatter
,FuzzySearch
,Hamming
,Increment
,Increment
,INGBuiltin
,InstanceFunctionBuiltin
,IsAlive
,IsEqual
,Jaccard
,JaroWinkler
,JaroWinkler
,JsonIdToString
,Letters
,Levenshtein
,Levenshtein
,LongestCommonSubsequence
,MatchBuiltin
,MathExpression
,Month
,NGram3
,NGram4
,Now
,Optimal
,ParsePoint
,PointX
,PointY
,QGram3
,QGram4
,RandomBoolean
,RandomDuration
,RandomEnumeration
,RandomInteger
,SimilarityBuiltin
,Sorensondice
,StockPrice
,String2Number
,Substitute
,SWIFT32a
,Text
,Time2MilliSeconds
,ToString
,ToType
,WeatherBuiltin
,WeatherForecast
,Week
,Year
Interface for functional built-ins.
A functional built-in provides one functional result
for every input or checks a functional computation
E.g. plus(1,2,%3FX) returns 3 for X
plus(1,2,5) evaluates to false.
Nearly all methods of the Java Math and String lib
are available as functional built-ins.
The schema how they are integrated is:
- 1st argument is the object
- last argument is the result
- arguments in between are the Java arguments
Examples:
Java String concat: String u = s.concat(t)
results in functional built-in:
concat(s,t,u)
Java startsWith: boolean b = s.startsWith(t)
results in functional built-in:
startsWith(s,t,b)
A functional built-in provides one functional result
for every input or checks a functional computation
E.g. plus(1,2,%3FX) returns 3 for X
plus(1,2,5) evaluates to false.
Nearly all methods of the Java Math and String lib
are available as functional built-ins.
The schema how they are integrated is:
- 1st argument is the object
- last argument is the result
- arguments in between are the Java arguments
Examples:
Java String concat: String u = s.concat(t)
results in functional built-in:
concat(s,t,u)
Java startsWith: boolean b = s.startsWith(t)
results in functional built-in:
startsWith(s,t,b)
-
Method Summary
Methods inherited from interface com.semedy.reasoner.api.builtin.Builtin
clear, cloneBuiltin, evaluationFinished, getArgumentDescriptions, getArity, getDescription, getName, getType, getWeight, init, isEvaluable, isInternal, objectGeneratingArguments, readsSymbolTable, setProperties, setSymbolTable, writesSymbolTable
-
Method Details
-
evaluate
boolean evaluate(long[] input, BitSet grounds) throws InterruptedException, IOException, SemReasonerException Given the input tuple and the instantiated arguments. The evaluation substitutes variables of the input tuple by concrete values- Parameters:
input
- , the codes of the input valuesgrounds
- , which input arguments are ground- Returns:
- Throws:
InterruptedException
IOException
SemReasonerException
-