com.raphtory.algorithms.generic.NodeInformation

NodeInformation

NodeInformation(initialID: Long, hopsAway: Int = 1)

Finds information about node and neighbours of node X hops away (default = 1).

Usage

Used with JsonOutputRunner.scala (located in the lotrTopic example) and JsonFormat.scala to output node information in Json format.

Parameters

{s}`initialID: Long`
  : initial vertex ID that user inputs

{s}`hopAway: Int = 1`
  : information about neighbours nodes set to X number of hops away from original vertex. Default is set to 1 hop away.

States

vertexInvolved: Boolean

Boolean flag of whether vertex should be included in the final tabularised output.

Returns

{ “label”: “Goldilocks”, “metadata”: { “id”: “5415127257870295999” }, “edges”: [ { “source”: “5415127257870295999”, “target”: “2751396522352401052”, “metadata”: { “value”: 0 } }, { “source”: “5415127257870295999”, “target”: “-6281184428558944342”, “metadata”: { “value”: 0 } } ] }

Note

To be used with JsonFormat.scala and JsonOutputRunner.scala (in lotrTopic example) to return this Json format.