Package ai.libs.jaicore.ml.dyadranking
Class Dyad
- java.lang.Object
-
- ai.libs.jaicore.ml.dyadranking.Dyad
-
public class Dyad extends java.lang.ObjectRepresents 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 booleanequals(java.lang.Object o)ai.libs.jaicore.math.linearalgebra.VectorgetAlternative()Get the alternative.ai.libs.jaicore.math.linearalgebra.VectorgetInstance()Get the instance.inthashCode()java.lang.StringtoString()org.nd4j.linalg.api.ndarray.INDArraytoVector()Converts a dyad to aINDArrayrow vector consisting of a concatenation of the instance and alternative features.
-
-
-
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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toVector
public org.nd4j.linalg.api.ndarray.INDArray toVector()
Converts a dyad to aINDArrayrow vector consisting of a concatenation of the instance and alternative features.- Returns:
- The dyad in
INDArrayrow vector form.
-
-