NWGraph: A Library of Generic Graph Algorithms and Data Structures in C++20

Abstract

The C++ Standard Library is a valuable collection of generic algorithms and data structures that improves the usability and reliability of C++ software. Graph algorithms and data structures are notably absent from the standard library, and previous attempts to fill this gap have not gained widespread adoption. In this paper we show that the richness of graph algorithms and data structures can in fact be captured by straightforward composition of existing C++ mechanisms. Generic programming is algorithm-oriented. Accordingly, we apply a systematic approach to analyzing a broad set of graph algorithms, "lift" unnecessary constraints from them, and organize the resulting set of minimal common type requirements, i.e., concepts, for defining their interfaces. By using the newly available ranges and concepts in C++20, the type requirements for generic graph algorithms can be succinctly expressed. The generic algorithms and data structures resulting from our analysis are realized in NWGraph, a modern, composable, and extensible C++ library.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Jun 06, 2022
Accession Number
AD1174115

Entities

People

  • Andrew Lumsdaine
  • Jesun Firoz
  • John P. Ratzloff
  • Kevin Deweese
  • Luke D'alessandro
  • Marcin Zalewski
  • Scott McMillan
  • Xu T. Liu

Organizations

  • Carnegie Mellon University

Tags

Communities of Interest

  • Energy and Power Technologies

DTIC Thesaurus Topics

  • Algorithms
  • Computational Complexity
  • Computations
  • Computer Programming
  • Computer Programs
  • Computer Science
  • Computers
  • Graph Theory
  • High Performance Computing
  • Language
  • Lists (Data Structures)
  • New York
  • Object Oriented Programming
  • Parallel Computing
  • Parallel Processing
  • Social Media
  • Social Networking Services
  • Software Development

Fields of Study

  • Computer science

Readers

  • Graph Algorithms and Convex Optimization.
  • Software Engineering.
  • Theoretical Analysis.