mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r1074830 - /mahout/trunk/math/src/main/java/org/apache/mahout/math/function/DoubleFunction.java
Date Sat, 26 Feb 2011 11:52:58 GMT
Author: srowen
Date: Sat Feb 26 11:52:57 2011
New Revision: 1074830

URL: http://svn.apache.org/viewvc?rev=1074830&view=rev
Log:
Resurrect DoubleFunction, even though all such classes really belong in mahout-collections,
for consistency.

Added:
    mahout/trunk/math/src/main/java/org/apache/mahout/math/function/DoubleFunction.java

Added: mahout/trunk/math/src/main/java/org/apache/mahout/math/function/DoubleFunction.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/function/DoubleFunction.java?rev=1074830&view=auto
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/function/DoubleFunction.java (added)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/function/DoubleFunction.java Sat
Feb 26 11:52:57 2011
@@ -0,0 +1,44 @@
+/**
+ * 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.mahout.math.function;
+
+/*
+Copyright 1999 CERN - European Organization for Nuclear Research.
+Permission to use, copy, modify, distribute and sell this software and its documentation
for any purpose 
+is hereby granted without fee, provided that the above copyright notice appear in all copies
and 
+that both that copyright notice and this permission notice appear in supporting documentation.

+CERN makes no representations about the suitability of this software for any purpose. 
+It is provided "as is" without expressed or implied warranty.
+*/
+
+/**
+ * Interface that represents a function object: a function that takes a single argument and
returns a single value.
+ */
+public interface DoubleFunction {
+
+  /**
+   * Apply the function to the argument and return the result
+   *
+   * @param arg1 double for the argument
+   * @return the result of applying the function
+   */
+  double apply(double arg1);
+
+}



Mime
View raw message