Skip to main content

Out Degrees All

UDTF: cugraph_out_degrees_all

Official cuGraph reference: C API

Count outgoing edges for every vertex in the graph.

Quickstart​

The call below supplies edges from registered relation target_edges with canonical src and dst columns and may include weight. Substitute your own registered relations.

SELECT *
FROM cugraph_out_degrees_all(
edges => (SELECT src, dst FROM target_edges)
);

Inputs​

Every relation is a named parenthesized SELECT subquery. The required edges role uses canonical src and dst columns; every role, its canonical columns, and their accepted Arrow types are listed under Relation arguments. Metadata validation resolves registered tables named in its JSON request.

Endpoint columns accept numeric Int32, Int64 vertex IDs or logical string Utf8, LargeUtf8, Utf8View vertex IDs; string vertex-identity outputs are canonicalized to Utf8 (native mapping Int64) while scores, distances, counts, coordinates, and opaque labels stay numeric. The shared vertex-ID contract is summarized in Vertex ID support; the concrete call-specific schema comes from gpu_validate_call.

Logical string side-input limitations:

  • edge ID columns and edge-ID predicate side inputs are not supported for logical string graphs

Arguments and options​

Relation arguments​

ArgumentRequiredColumnsDescription
edgesyes
  • src, dst: Int32, Int64, Utf8, LargeUtf8, Utf8View
  • weight (optional): Float32, Float64
  • edge_id (optional): Int32, Int64
edge relation with canonical src and dst columns, plus optional weight and edge_id columns

Every edge_id column must have the integer type of src and dst; string-keyed graphs accept no edge IDs.

Named value arguments​

This UDTF has no algorithm-specific value arguments. Its inputs are the relation arguments above and the graph construction options below.

Graph construction options​

Graph construction follows the shared defaults (directed=true, renumbering, python_cugraph policy) documented in Graph Construction Options.

Output​

ColumnTypeNullableDescription
vertexInt64|Utf8noVertex whose out-degree count is reported.
out_degreeInt64noNumber of outgoing edges for the vertex.

These are generic descriptor schemas; run gpu_validate_call to get the concrete, table-specific output schema.

Examples​

This example runs on the citation network demo dataset.

Which recent NLP papers offer the broadest bibliographies?​

When preparing a literature review, a paper with a long reference list can provide many starting points. Restrict the search to papers from 2015 through the snapshot's 2020 cutoff in the language-related fields below, then count their outgoing citations. The result ranks bibliography breadth within this corpus; it does not measure review quality.

SELECT p.year, p.title, d.out_degree AS bibliography_size
FROM cugraph_out_degrees_all(edges => (SELECT src, dst FROM citation_edges)) d
JOIN papers p ON p.paper_id = d.vertex
WHERE p.year BETWEEN 2015 AND 2020
AND p.primary_fos IN (
'Natural language processing', 'Language model',
'Machine translation', 'Question answering')
ORDER BY d.out_degree DESC, p.paper_id
LIMIT 6;
yeartitlebibliography_size
2018Neural Approaches to Conversational AI.385
2018Web Forum Retrieval and Text Analytics: A Survey372
2017Computer Vision and Natural Language Processing: Recent Approaches in Multimedia and Robotics257
2018Video Description: A Survey of Methods, Datasets and Evaluation Metrics162
2016A survey of word reordering in statistical machine translation: Computational models and language phenomena150
2018A Survey on Expert Recommendation in Community Question Answering141

Neural Approaches to Conversational AI. has the largest bibliography in this filtered set, with 385 outgoing references.

The field filter defines the candidate papers. References outside those fields still count because the edge relation includes the full citation network.

Limits​

No algorithm-specific limitations.

To dry-run validate relation metadata, column types, and options without execution, see gpu_validate_call.