Record Class LeidenResult

java.lang.Object
java.lang.Record
org.neo4j.gds.leiden.LeidenResult

public record LeidenResult(org.neo4j.gds.collections.ha.HugeLongArray communities, int ranLevels, boolean didConverge, @Nullable LeidenDendrogramManager dendrogramManager, double[] modularities, double modularity) extends Record
  • Constructor Details

    • LeidenResult

      public LeidenResult(org.neo4j.gds.collections.ha.HugeLongArray communities, int ranLevels, boolean didConverge, @Nullable @Nullable LeidenDendrogramManager dendrogramManager, double[] modularities, double modularity)
      Creates an instance of a LeidenResult record class.
      Parameters:
      communities - the value for the communities record component
      ranLevels - the value for the ranLevels record component
      didConverge - the value for the didConverge record component
      dendrogramManager - the value for the dendrogramManager record component
      modularities - the value for the modularities record component
      modularity - the value for the modularity record component
  • Method Details

    • intermediateCommunities

      public long[] intermediateCommunities(long nodeId)
    • communitiesFunction

      public LongUnaryOperator communitiesFunction()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • communities

      public org.neo4j.gds.collections.ha.HugeLongArray communities()
      Returns the value of the communities record component.
      Returns:
      the value of the communities record component
    • ranLevels

      public int ranLevels()
      Returns the value of the ranLevels record component.
      Returns:
      the value of the ranLevels record component
    • didConverge

      public boolean didConverge()
      Returns the value of the didConverge record component.
      Returns:
      the value of the didConverge record component
    • dendrogramManager

      @Nullable public @Nullable LeidenDendrogramManager dendrogramManager()
      Returns the value of the dendrogramManager record component.
      Returns:
      the value of the dendrogramManager record component
    • modularities

      public double[] modularities()
      Returns the value of the modularities record component.
      Returns:
      the value of the modularities record component
    • modularity

      public double modularity()
      Returns the value of the modularity record component.
      Returns:
      the value of the modularity record component