24#ifndef VULPES_GEOMETRY_AGGLOMERATION_GNN_GRAPH_HPP_
25#define VULPES_GEOMETRY_AGGLOMERATION_GNN_GRAPH_HPP_
27#include <torch/torch.h>
73 template <
typename IndexType>
75 const torch::Tensor& feature_tensor,
Definition crs_map.hpp:72
Graph wrapper with Torch tensors for features and edges.
Definition gnn_graph.hpp:46
torch::Tensor m_edge_index
Edge list [2, nnz] (COO, int64).
Definition gnn_graph.hpp:118
torch::Tensor m_feature_tensor
Node features [N, F].
Definition gnn_graph.hpp:115
int64_t index_t
Definition gnn_graph.hpp:50
void buildEdgeTensor()
Build the Torch COO edge tensor from the CRS map.
Definition gnn_graph.cpp:39
GNNGraph(const torch::Tensor &feature_tensor, const datastructure::CrsMap< IndexType, IndexType > &dual_map)
Construct from feature tensor and (typed) dual graph.
Definition gnn_graph.hpp:74
float float_t
Definition gnn_graph.hpp:49
std::vector< IndVec > m_connected_components
Definition gnn_graph.hpp:120
const auto & getFeatureTensor() const
Definition gnn_graph.hpp:99
static constexpr auto tensor_float_t
Definition gnn_graph.hpp:52
index_t m_n_nodes
Number of nodes.
Definition gnn_graph.hpp:116
index_t m_n_features
Number of features per node.
Definition gnn_graph.hpp:117
IndMap m_dual_map
Dual-graph adjacency (CRS).
Definition gnn_graph.hpp:114
const auto & getDualMap() const
Definition gnn_graph.hpp:101
std::vector< index_t > IndVec
Definition gnn_graph.hpp:54
datastructure::CrsMap< index_t, index_t > IndMap
Definition gnn_graph.hpp:55
static constexpr auto tensor_index_t
Definition gnn_graph.hpp:51
const auto & getEdgeIndexTensor() const
Definition gnn_graph.hpp:100
GNNGraph getSubGraph(const IndVec &subset_idxs)
Induced subgraph on a set of node indices.
Definition gnn_graph.cpp:28
Helpers implementing VulPoly's Voronoi construction and cleanup.
Definition abs_agg_model.cpp:42
Definition abs_agg_model.cpp:40
Definition cell_manager.hpp:38