DivideBy

See javadoc - uk.gov.gchq.koryphe.impl.function.DivideBy

Available since Koryphe version 1.0.0

Divide the input integer by the provide number. x -> [x/divideBy, remainder]

Examples

Divide by 2

Java
JSON
Full JSON
Python
final DivideBy function = new DivideBy(2);
{
  "class" : "DivideBy",
  "by" : 2
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.DivideBy",
  "by" : 2
}
g.DivideBy( 
  by=2 
)

Input type:

java.lang.Integer

Example inputs:

Input TypeInputResult TypeResult
java.lang.Integer6[java.lang.Integer, java.lang.Integer][3, 0]
java.lang.Integer5[java.lang.Integer, java.lang.Integer][2, 1]
nullnull
java.lang.Double6.1ClassCastException: java.lang.Double cannot be cast to java.lang.Integer

results matching ""

    No results matching ""