-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSHARP-5527: Support $sigmoid expression #1638
base: main
Are you sure you want to change the base?
Conversation
...ionExpressionTranslators/MethodTranslators/SigmoidMethodToAggregationExpressionTranslator.cs
Outdated
Show resolved
Hide resolved
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Jira/CSharp5527Tests.cs
Outdated
Show resolved
Hide resolved
tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Jira/CSharp5527Tests.cs
Outdated
Show resolved
Hide resolved
...ionExpressionTranslators/MethodTranslators/SigmoidMethodToAggregationExpressionTranslator.cs
Outdated
Show resolved
Hide resolved
...ionExpressionTranslators/MethodTranslators/SigmoidMethodToAggregationExpressionTranslator.cs
Outdated
Show resolved
Hide resolved
/// </summary> | ||
/// <param name="value">The input value.</param> | ||
/// <returns>The transformed value.</returns> | ||
public static double Sigmoid(double value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is a perfectly reasonable place to declare this method we should discuss a bit whether going forward we want all new methods like this to live in the Mql
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM + minor suggestion
} | ||
|
||
[Fact] | ||
public void Sigmoid_should_work() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: I would suggest test to check failure in case non-numeric representation.
No description provided.