Skip to content

Conversation

@mikeymike
Copy link

Add custom args so that custom comparison methods can provide more args such as max etc.

Fields would change to.

var fields = [
    { name: "x", measure: nn.comparisonMethods.custom, args: {max: 10} },
    { name: "y", measure: nn.comparisonMethods.custom, args: {max: 10} }
];

custom comparison mathods would be

nn.comparisonMethods.custom = function(a, b, args) {
    // Test for args and enforce defaults...

    // compare something...
    var value = ...
    return value; // between 0 and 1
};

Add custom args so that custom comparison methods can provide more args such as max etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant