Class Dyad


  • public class Dyad
    extends java.lang.Object
    Represents a dyad consisting of an instance and an alternative, represented by feature vectors.
    • Constructor Summary

      Constructors 
      Constructor Description
      Dyad​(ai.libs.jaicore.math.linearalgebra.Vector instance, ai.libs.jaicore.math.linearalgebra.Vector alternative)
      Construct a new dyad consisting of the given instance and alternative.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      ai.libs.jaicore.math.linearalgebra.Vector getAlternative()
      Get the alternative.
      ai.libs.jaicore.math.linearalgebra.Vector getInstance()
      Get the instance.
      int hashCode()  
      java.lang.String toString()  
      org.nd4j.linalg.api.ndarray.INDArray toVector()
      Converts a dyad to a INDArray row vector consisting of a concatenation of the instance and alternative features.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Dyad

        public Dyad​(ai.libs.jaicore.math.linearalgebra.Vector instance,
                    ai.libs.jaicore.math.linearalgebra.Vector alternative)
        Construct a new dyad consisting of the given instance and alternative.
        Parameters:
        instance - The instance
        alternative - The alternative
    • Method Detail

      • getInstance

        public ai.libs.jaicore.math.linearalgebra.Vector getInstance()
        Get the instance.
        Returns:
        the instance
      • getAlternative

        public ai.libs.jaicore.math.linearalgebra.Vector getAlternative()
        Get the alternative.
        Returns:
        the alternative
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toVector

        public org.nd4j.linalg.api.ndarray.INDArray toVector()
        Converts a dyad to a INDArray row vector consisting of a concatenation of the instance and alternative features.
        Returns:
        The dyad in INDArray row vector form.