Graph Operations
Batched graph-level operations for message-passing and graph
reconstruction, exposed via pyc::graph.
pyc::graph Functions
Function |
Description |
|---|---|
|
Aggregate node features along edges weighted by |
|
Aggregate edge scores back to nodes |
|
Aggregate features by integer cluster label (reduces to number of clusters) |
|
Personalised PageRank convergence; returns cluster assignment and scores |
|
PageRank + batched 4-momentum sum per cluster |
pyc::graph::polar overloads accept (pt, eta, phi, e) or a stacked
pmu tensor instead of cartesian pmc for aggregation functions.
-
namespace graph
Graph-level aggregation and PageRank reconstruction.
Functions
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor node_feature)
Aggregate node features along edges weighted by
prediction.
-
torch::Dict<std::string, torch::Tensor> node_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor node_feature)
Aggregate edge features to nodes weighted by
prediction.
-
torch::Dict<std::string, torch::Tensor> unique_aggregation(torch::Tensor cluster_map, torch::Tensor features)
Aggregate features within unique cluster assignments.
-
torch::Dict<std::string, torch::Tensor> PageRank(torch::Tensor edge_index, torch::Tensor edge_scores, double alpha = 0.85, double threshold = 0.5, double norm_low = 1e-6, long timeout = 1e6, long num_cls = 2)
Batched personalised PageRank clustering.
-
torch::Dict<std::string, torch::Tensor> PageRankReconstruction(torch::Tensor edge_index, torch::Tensor edge_scores, torch::Tensor pmc, double alpha = 0.85, double threshold = 0.5, double norm_low = 1e-6, long timeout = 1e6, long num_cls = 2)
PageRank clustering followed by four-momentum reconstruction.
-
namespace cartesian
Functions
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pmc)
-
torch::Dict<std::string, torch::Tensor> node_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pmc)
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor px, torch::Tensor py, torch::Tensor pz, torch::Tensor e)
-
torch::Dict<std::string, torch::Tensor> node_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor px, torch::Tensor py, torch::Tensor pz, torch::Tensor e)
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pmc)
-
namespace polar
Functions
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pmu)
-
torch::Dict<std::string, torch::Tensor> node_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pmu)
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pt, torch::Tensor eta, torch::Tensor phi, torch::Tensor e)
-
torch::Dict<std::string, torch::Tensor> node_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pt, torch::Tensor eta, torch::Tensor phi, torch::Tensor e)
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor pmu)
-
torch::Dict<std::string, torch::Tensor> edge_aggregation(torch::Tensor edge_index, torch::Tensor prediction, torch::Tensor node_feature)
Internal Kernel Namespace
-
namespace graph_
Internal namespace for CUDA-accelerated graph aggregation.
Functions
-
std::map<std::string, torch::Tensor> unique_aggregation(torch::Tensor *cluster_map, torch::Tensor *features)
Sum
featureswithin each unique cluster incluster_map.- Parameters:
cluster_map – [N] integer cluster assignments.
features – [N, D] node features.
- Returns:
Map with keys
"clusters"and"cluster_map".
-
std::map<std::string, torch::Tensor> edge_aggregation(torch::Tensor *edge_index, torch::Tensor *prediction, torch::Tensor *node_feature)
Aggregate
node_featurealong source edges, weighted byprediction.- Parameters:
edge_index – [2, E] COO edge index.
prediction – [E] or [E, C] edge weights/predictions.
node_feature – [N, D] node features.
- Returns:
Map containing
"nodes"and"node_map".
-
std::map<std::string, torch::Tensor> node_aggregation(torch::Tensor *edge_index, torch::Tensor *prediction, torch::Tensor *node_feature)
Aggregate
node_featurealong destination edges, weighted byprediction.- Parameters:
edge_index – [2, E] COO edge index.
prediction – [E] or [E, C] edge weights/predictions.
node_feature – [N, D] node features.
- Returns:
Map containing
"nodes"and"node_map".
-
std::map<std::string, torch::Tensor> unique_aggregation(torch::Tensor *cluster_map, torch::Tensor *features)