MCPcopy Create free account
hub / github.com/Pometry/Raphtory / repr

Method repr

raphtory/src/python/graph/views/graph_view.rs:470–495  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

468
469impl Repr for PyGraphView {
470 fn repr(&self) -> String {
471 if self.properties().is_empty() {
472 StructReprBuilder::new("Graph")
473 .add_field("number_of_nodes", self.graph.count_nodes())
474 .add_field("number_of_edges", self.graph.count_edges())
475 .add_field(
476 "number_of_temporal_edges",
477 self.graph.count_temporal_edges(),
478 )
479 .add_field("earliest_time", self.earliest_time().repr())
480 .add_field("latest_time", self.latest_time().repr())
481 .finish()
482 } else {
483 StructReprBuilder::new("Graph")
484 .add_field("number_of_nodes", self.graph.count_nodes())
485 .add_field("number_of_edges", self.graph.count_edges())
486 .add_field(
487 "number_of_temporal_edges",
488 self.graph.count_temporal_edges(),
489 )
490 .add_field("earliest_time", self.earliest_time().repr())
491 .add_field("latest_time", self.latest_time().repr())
492 .add_field("properties", self.properties())
493 .finish()
494 }
495 }
496}

Callers 1

__repr__Method · 0.45

Calls 9

add_fieldMethod · 0.80
is_emptyMethod · 0.45
propertiesMethod · 0.45
finishMethod · 0.45
count_nodesMethod · 0.45
count_edgesMethod · 0.45
count_temporal_edgesMethod · 0.45
earliest_timeMethod · 0.45
latest_timeMethod · 0.45

Tested by

no test coverage detected