nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
public void putFunctionForId(String id, DifferentialFunction function) {
        if (functionInstancesById.containsKey(id)) {
            throw new ND4JIllegalStateException("Function by id already exists!");
        } else if (function instanceof SDVariable) {
            throw new ND4JIllegalStateException("Function must not be a variable!");
        }

        functionInstancesById.put(id, function);
    }
public void putFunctionForId(String id, DifferentialFunction function) {
        if (functionInstancesById.containsKey(id)) {
            throw new ND4JIllegalStateException("Function by id already exists!");
        } else if (function instanceof SDVariable) {
            throw new ND4JIllegalStateException("Function must not be a variable!");
        }

        functionInstancesById.put(id, function);
    }
public void putFunctionForId ( String id , DifferentialFunction function ) { if ( functionInstancesById . containsKey ( id ) ) { throw new ND4JIllegalStateException ( "Function by id already exists!" ) ; } else if ( function instanceof SDVariable ) { throw new ND4JIllegalStateException ( "Function must not be a variable!" ) ; } functionInstancesById . put ( id , function ) ; }
Put the function for id

@param id       the id
@param function the function
Put the function for id