Class MatrixHeapMerger

java.lang.Object
org.tribuo.math.util.MatrixHeapMerger
All Implemented Interfaces:
Serializable, Merger, ProtoSerializable<org.tribuo.math.protos.MergerProto>

public class MatrixHeapMerger extends Object implements Merger
See Also:
  • Field Details

    • CURRENT_VERSION

      public static final int CURRENT_VERSION
      Protobuf serialization version.
      See Also:
  • Constructor Details

    • MatrixHeapMerger

      public MatrixHeapMerger()
      Constructs a HeapMerger.
  • Method Details

    • deserializeFromProto

      public static MatrixHeapMerger deserializeFromProto(int version, String className, com.google.protobuf.Any message)
      Deserialization factory.
      Parameters:
      version - The serialized object version.
      className - The class name.
      message - The serialized data.
      Returns:
      The deserialized object.
    • serialize

      public org.tribuo.math.protos.MergerProto serialize()
      Description copied from interface: ProtoSerializable
      Serializes this object to a protobuf.
      Specified by:
      serialize in interface ProtoSerializable<org.tribuo.math.protos.MergerProto>
      Returns:
      The protobuf.
    • merge

      public DenseSparseMatrix merge(DenseSparseMatrix[] inputs)
      Description copied from interface: Merger
      Merges an array of DenseSparseMatrix into a single DenseSparseMatrix.
      Specified by:
      merge in interface Merger
      Parameters:
      inputs - The matrices to merge.
      Returns:
      The merged matrix.
    • merge

      public SparseVector merge(SparseVector[] inputs)
      Description copied from interface: Merger
      Merges an array of SparseVector into a single SparseVector.
      Specified by:
      merge in interface Merger
      Parameters:
      inputs - The vectors to merge.
      Returns:
      The merged vector.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object