Class AggregateDenseReal

java.lang.Object
org.flag4j.linalg.ops.dense.real.AggregateDenseReal

public final class AggregateDenseReal extends Object
This class contains several low-level methods useful for computing aggregation ops on dense tensors.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    argEq(double[] entries, double value)
    Computes the index of the first entry in a tensor which is equal to the specified value.
    static int
    argEq(int[] entries, int value)
    Computes the index of the first entry in a tensor which is equal to the specified value.
    static int
    argmax(double[] entries)
    Computes the index of the maximum value in this tensor.
    static int
    argmaxAbs(double[] entries)
    Computes the index of the maximum absolute value in this tensor.
    static int
    argmin(double[] entries)
    Computes the index of the minimum value in this tensor.
    static int
    argminAbs(double[] entries)
    Computes the index of the minimum absolute value in this tensor.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • argmin

      public static int argmin(double[] entries)
      Computes the index of the minimum value in this tensor. If the minimum value occurs at more than one index, the index of the first occurrence is taken.
      Parameters:
      entries - Entries of the tensor.
      Returns:
      The index of the minimum value in this tensor. If there are zero data in the array, -1 is returned.
    • argminAbs

      public static int argminAbs(double[] entries)
      Computes the index of the minimum absolute value in this tensor. If the minimum absolute value occurs at more than one index, the index of the first occurrence is taken.
      Parameters:
      entries - Entries of the tensor.
      Returns:
      The index of the minimum absolute value in this tensor. If there are zero data in the array, -1 is returned.
    • argmax

      public static int argmax(double[] entries)
      Computes the index of the maximum value in this tensor. If the maximum value occurs at more than one index, the index of the first occurrence is taken.
      Parameters:
      entries - Entries of the tensor.
      Returns:
      The index of the maximum value in this tensor. If there are zero data in the array, -1 is returned.
    • argmaxAbs

      public static int argmaxAbs(double[] entries)
      Computes the index of the maximum absolute value in this tensor. If the maximum absolute value occurs at more than one index, the index of the first occurrence is taken.
      Parameters:
      entries - Entries of the tensor.
      Returns:
      The index of the maximum absolute value in this tensor. If there are zero data in the array, -1 is returned.
    • argEq

      public static int argEq(double[] entries, double value)
      Computes the index of the first entry in a tensor which is equal to the specified value.
      Parameters:
      entries - Entries of this tensor.
      value - Value to find index of.
      Returns:
      The index of the first entry in data which is equal to value. If no such value exists, then -1 is returned.
    • argEq

      public static int argEq(int[] entries, int value)
      Computes the index of the first entry in a tensor which is equal to the specified value.
      Parameters:
      entries - Entries of this tensor.
      value - Value to find index of.
      Returns:
      The index of the first entry in data which is equal to value. If no such value exists, then -1 is returned.