类 TriangleCount 继承自 Arguments 并实现 Serializable 和 WithIntermediateStorageLevel
计算通过每个顶点的三角形数量。
该算法忽略边的方向;即所有边都被视为无向边。在多图中,重复的边将仅被计数一次。
**警告** 此实现基于邻接集合的交集运算,需要为每条边同时收集源节点和目标节点的邻接关系!当图中包含极高度数节点(幂律网络)时,这将导致内存爆炸!针对这种情况请考虑采用采样策略!
返回的DataFrame包含所有原始顶点信息和一个额外的列:
- count (
LongType): the count of triangles
- 按字母顺序
- 按继承关系
- TriangleCount
- WithIntermediateStorageLevel
- 日志记录
- 可序列化
- 参数
- AnyRef
- 任意
- 由 any2stringadd
- 由 StringFormat 提供
- 通过确保
- 由 ArrowAssoc 提供
- 隐藏全部
- 显示全部
- 公开
- 受保护
值成员
- final def !=(arg0: 任意): 布尔值
- 定义类
- AnyRef → Any
- final def ##: 整数
- 定义类
- AnyRef → Any
- def +(other: String): String
- 隐式
- 该成员通过从 TriangleCount 到 any2stringadd[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 any2stringadd 方法执行。
- 定义类
- 任意转字符串加法
- def ->[B](y: B): (TriangleCount, B)
- 隐式
- 该成员通过从 TriangleCount 到 ArrowAssoc[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 ArrowAssoc 方法执行。
- 定义类
- ArrowAssoc
- 注解
- @inline()
- final def ==(arg0: 任意): 布尔值
- 定义类
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- 定义类
- 任意
- def clone(): AnyRef
- 属性
- protected[lang]
- 定义类
- AnyRef
- 注解
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def ensuring(cond: (TriangleCount) => 布尔值, msg: => 任意): TriangleCount
- 隐式
- 该成员通过从 TriangleCount 到 Ensuring[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 Ensuring 方法执行。
- 定义类
- 确保
- def ensuring(cond: (TriangleCount) => 布尔值): TriangleCount
- 隐式
- 该成员通过从 TriangleCount 到 Ensuring[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 Ensuring 方法执行。
- 定义类
- 确保
- def ensuring(cond: 布尔值, msg: => 任意): TriangleCount
- 隐式
- 该成员通过从 TriangleCount 到 Ensuring[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 Ensuring 方法执行。
- 定义类
- 确保
- def ensuring(cond: 布尔值): TriangleCount
- 隐式
- 该成员通过从 TriangleCount 到 Ensuring[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 Ensuring 方法执行。
- 定义类
- 确保
- final def eq(arg0: AnyRef): 布尔值
- 定义类
- AnyRef
- def equals(arg0: AnyRef): 布尔值
- 定义类
- AnyRef → Any
- final def getClass(): 类[_ <: AnyRef]
- 定义类
- AnyRef → Any
- 注解
- @IntrinsicCandidate() @native()
- def getIntermediateStorageLevel: StorageLevel
获取需要多次传递的中间数据集的存储级别。
获取需要多次传递的中间数据集的存储级别。
- 定义类
- WithIntermediateStorageLevel
- def hashCode(): 整数
- 定义类
- AnyRef → Any
- 注解
- @IntrinsicCandidate() @native()
- val intermediateStorageLevel: StorageLevel
- 属性
- 受保护的
- 定义类
- WithIntermediateStorageLevel
- final def isInstanceOf[T0]: 布尔值
- 定义类
- 任意
- def logDebug(s: => String): 单元
- 属性
- 受保护的
- 定义类
- 日志记录
- def logInfo(s: => String): 单元
- 属性
- 受保护的
- 定义类
- 日志记录
- def logTrace(s: => String): 单元
- 属性
- 受保护的
- 定义类
- 日志记录
- def logWarn(s: => String): 单元
- 属性
- 受保护的
- 定义类
- 日志记录
- final def ne(arg0: AnyRef): 布尔值
- 定义类
- AnyRef
- final def notify(): 单元
- 定义类
- AnyRef
- 注解
- @IntrinsicCandidate() @native()
- final def notifyAll(): 单元
- 定义类
- AnyRef
- 注解
- @IntrinsicCandidate() @native()
- def resultIsPersistent(): 单元
- 属性
- 受保护的
- 定义类
- 日志记录
- def run(): DataFrame
- def setIntermediateStorageLevel(value: StorageLevel): TriangleCount.this.type
Sets storage level for intermediate datasets that require multiple passes (default:
).MEMORY_AND_DISKSets storage level for intermediate datasets that require multiple passes (default:
).MEMORY_AND_DISK- 定义类
- WithIntermediateStorageLevel
- final def synchronized[T0](arg0: => T0): T0
- 定义类
- AnyRef
- def toString(): 字符串
- 定义类
- AnyRef → Any
- final def wait(arg0: 长整型, arg1: 整数): 单元
- 定义类
- AnyRef
- 注解
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: 长整型): 单元
- 定义类
- AnyRef
- 注解
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): 单元
- 定义类
- AnyRef
- 注解
- @throws(classOf[java.lang.InterruptedException])
已弃用的值成员
- def finalize(): 单元
- 属性
- protected[lang]
- 定义类
- AnyRef
- 注解
- @throws(classOf[java.lang.Throwable]) @Deprecated
- 已弃用
(自版本 9 起)
- def formatted(fmtstr: String): String
- 隐式
- 该成员通过从 TriangleCount 到 StringFormat[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 StringFormat 方法执行。
- 定义类
- StringFormat
- 注解
- @deprecated @inline()
- 已弃用
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.
- def →[B](y: B): (TriangleCount, B)
- 隐式
- 该成员通过从 TriangleCount 到 ArrowAssoc[TriangleCount] 的隐式转换添加,该转换由 scala.Predef 中的 ArrowAssoc 方法执行。
- 定义类
- ArrowAssoc
- 注解
- @deprecated
- 已弃用
(Since version 2.13.0) Use
->instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.