[ https://issues.apache.org/jira/browse/METRON-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100488#comment-16100488 ]
ASF GitHub Bot commented on METRON-1038: ---------------------------------------- Github user mattf-horton commented on a diff in the pull request: https://github.com/apache/metron/pull/650#discussion_r129384031 --- Diff: metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/utils/math/MathOperation.java --- @@ -0,0 +1,39 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.metron.stellar.common.utils.math; + +import java.util.function.Function; + +public class MathOperation { + private int maxArgs; + private Function<Number[], Number> operation; + public MathOperation(Function<Number[], Number> operation, int maxArgs) { + this.operation = operation; + this.maxArgs = maxArgs; + } --- End diff -- If you give equal billing to binary ops in MathOperations.java, as requested below, then this also needs an additional constructor with BiFunction arg, I think. > Stellar should have a better collection of basic math operations > ---------------------------------------------------------------- > > Key: METRON-1038 > URL: https://issues.apache.org/jira/browse/METRON-1038 > Project: Metron > Issue Type: Improvement > Reporter: Casey Stella > > At the moment the math functions are woefully incomplete. > We should add at least the ones difficult or impossible to reconstruct using > existing stellar primitives/math functions: > * log10 > * log2 > * ln > * sqrt > * ceil > * floor > * sin > * cos > * tan -- This message was sent by Atlassian JIRA (v6.4.14#64029)