# cppRouting 3.2 (CRAN)

Algorithms for Routing and Solving the Traffic Assignment Problem

[Record of 3.2](/cran/cppRouting/v/3.2.md) | Compare: [With 3.1](/cran/cppRouting/compare/3.1...3.2.md), [With another package](/compare/cppRouting.md#add), [Downloads](/downloads/compare/cppRouting.md#add) | [Licences](/cran/cppRouting/licences.md) | [SBOM](/cran/cppRouting/sbom.md)

Install from CRAN: `install.packages("cppRouting")`

Also from:

- r2u (Ubuntu binaries): `sudo apt install r-cran-cpprouting` _Listed from recorded download activity on this channel, not from a live index, so read it as last known. Bioconductor packages are named r-bioc-<name> there._
- autoCRAN (openSUSE): `sudo zypper install R-cppRouting` _Listed from recorded download activity on this channel, not from a live index, so read it as last known._
- conda-forge: `conda install -c conda-forge r-cpprouting` _Listed from recorded download activity on this channel, not from a live index, so read it as last known._

- CRAN checks: OK (notes on 2 of 13)
- CRAN 30-day downloads: 770 (up 7.5% on the 30 days before, the better direction)
- Dependent packages: 7 (1 more indirectly)
- Test coverage: No tests (nothing to run)
- Advisories: None known

## About

[Method](/about/licenses.md)

Calculation of distances, shortest paths and isochrones on weighted graphs using several variants of Dijkstra algorithm. Proposed algorithms are unidirectional Dijkstra (Dijkstra, E. W. (1959) <doi:10.1007/BF01386390>), bidirectional Dijkstra (Goldberg, Andrew & Fonseca F.

**Full description**

Calculation of distances, shortest paths and isochrones on weighted graphs using several variants of Dijkstra algorithm. Proposed algorithms are unidirectional Dijkstra (Dijkstra, E. W. (1959) <doi:10.1007/BF01386390>), bidirectional Dijkstra (Goldberg, Andrew & Fonseca F. Werneck, Renato (2005) <https://www.cs.princeton.edu/courses/archive/spr06/cos423/Handouts/EPP%20shortest%20path%20algorithms.pdf>), A* search (P. E. Hart, N. J. Nilsson et B. Raphael (1968) <doi:10.1109/TSSC.1968.300136>), new bidirectional A* (Pijls & Post (2009) <https://repub.eur.nl/pub/16100/ei2009-10.pdf>), Contraction hierarchies (R. Geisberger, P. Sanders, D. Schultes and D. Delling (2008) <doi:10.1007/978-3-540-68552-4_24>), PHAST (D. Delling, A.Goldberg, A. Nowatzyk, R. Werneck (2011) <doi:10.1016/j.jpdc.2012.02.007>). Algorithms for solving the traffic assignment problem are All-or-Nothing assignment, Method of Successive Averages, Frank-Wolfe algorithm (M. Fukushima (1984) <doi:10.1016/0191-2615(84)90029-8>), Conjugate and Bi-Conjugate Frank-Wolfe algorithms (M. Mitradjieva, P. O. Lindberg (2012) <doi:10.1287/trsc.1120.0409>), Algorithm-B (R. B. Dial (2006) <doi:10.1016/j.trb.2006.02.008>).

- Maintainer: Vincent Larmet
- Licence: [GPL (>= 2)](/cran/cppRouting/licences.md)
- Latest release: 28 Nov 2025
- First release: 21 Jun 2019

- [CRAN page](https://cran.r-project.org/package=cppRouting)
- [Source repository](https://github.com/vlarmet/cpprouting)
- [Source of every release](https://github.com/cran/cppRouting)

[Compare with another package](/compare/cppRouting.md#add)

**More details**

- Releases: 6
- Needs compilation: Yes
- Date: 2025-11-28
- RoxygenNote: 7.2.1
- SystemRequirements: GNU make

**Cite**

#### Package

Run in R for the authors' preferred citation:

`citation("cppRouting")`

APA: Larmet, V. (2025). cppRouting: Algorithms for Routing and Solving the Traffic Assignment
Problem (Version 3.2) [Computer software]. https://doi.org/10.32614/CRAN.package.cppRouting

BibTeX:

```
@Manual{cppRouting,
  title  = {cppRouting: Algorithms for Routing and Solving the Traffic Assignment
Problem},
  author = {Larmet, Vincent},
  year   = {2025},
  note   = {R package version 3.2},
  doi    = {10.32614/CRAN.package.cppRouting},
  url    = {https://CRAN.R-project.org/package=cppRouting}
}
```

This package has no citation file, so `citation()` returns this entry built from `DESCRIPTION`.

#### R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA: Balamuta, J. J. (2026). R Observatory: Metrics for cppRouting version 3.2 [Data set]. HJJB, LLC. Data release v2026-10-29. https://doi.org/10.5281/zenodo.21843040

BibTeX:

```
@misc{robservatorycppRouting,
  author    = {Balamuta, James Joseph},
  title     = {{R} {Observatory}: Metrics for {cppRouting} version 3.2},
  year      = {2026},
  publisher = {HJJB, LLC},
  doi       = {10.5281/zenodo.21843040},
  url       = {https://r-observatory.thecoatlessprofessor.com/packages/cppRouting},
  note      = {Data set. Data release v2026-10-29}
}
```

From data release v2026-10-29, which the citation names so these numbers can be found later.

## Health

[Method](/about/checks-health.md)

No warnings or errors. 2 of 13 check platforms have notes.

13 CRAN platforms: 2 Note, 11 OK.

**Check output (1)**

**dependencies in R code**, Note on 2 platforms

```
Namespace in Imports field not imported from:
  ‘RcppProgress’
All declared Imports should be used.
```

Platforms now:

- r-devel-linux-x86_64-debian-clang: OK
- r-devel-linux-x86_64-debian-gcc: OK
- r-devel-linux-x86_64-fedora-clang: Note
- r-devel-linux-x86_64-fedora-gcc: Note
- r-devel-windows-x86_64: OK
- r-oldrel-macos-arm64: OK
- r-oldrel-macos-x86_64: OK
- r-oldrel-windows-x86_64: OK
- r-patched-linux-x86_64: OK
- r-release-linux-x86_64: OK
- r-release-macos-arm64: OK
- r-release-macos-x86_64: OK
- r-release-windows-x86_64: OK

#### Over time

No change since 22 Apr 2026

**As a list (5)**

| Changed | Worst status | OK | Notes | Warnings | Errors |
| --- | --- | ---: | ---: | ---: | ---: |
| 22 Apr 2026 | Note | 9 | 5 | 0 | 0 |
| 18 Apr 2026 | Error | 8 | 5 | 0 | 1 |
| 10 Apr 2026 | Note | 9 | 5 | 0 | 0 |
| 9 Apr 2026 | Error | 8 | 5 | 0 | 1 |
| 10 Mar 2026 | Note | 9 | 5 | 0 | 0 |

Since March 2026

[Check results on CRAN](https://cran.r-project.org/web/checks/check_results_cppRouting.html)

## Downloads

[Method](/about/downloads.md)

- Downloads in the last 30 days: 975 (up 20.5% on the 30 days before, the better direction. It is the sum of 4 channels: CRAN, r2u, autoCRAN and conda-forge.)

CRAN alone: rank among CRAN packages, last 30 days: 4,256 of 26,553.

| Channel | Downloads in the last 30 days | In the total | Rank in that channel | Change |
| --- | ---: | --- | --- | --- |
| CRAN | 770 | yes | 4,256 of 26,553 | up 7.5% on the 30 days before, the better direction |
| r2u | 30 | yes | 3,957 of 30,526 | up 3.5% on the 30 days before, the better direction |
| autoCRAN | 18 | yes | 2,640 of 29,233 | down 14.3% on the 30 days before, the worse direction |
| conda-forge | 157 | yes | 2,832 of 3,828 | up 265% on the 30 days before, the better direction |

Other windows: [Last 90 days](/cran/cppRouting.md?win=90d#downloads), [Last 365 days](/cran/cppRouting.md?win=365d#downloads), [All time](/cran/cppRouting.md?win=all#downloads).

To leave channels out of the total, name them in the address, joined by dots: `?off=autocran.conda_forge`.

#### Over time

Downloads over time, the last 12 whole months:

| Month | CRAN | r2u | autoCRAN | conda-forge | Sum |
| --- | ---: | ---: | ---: | ---: | ---: |
| Oct 2025 | 2,454 | 43 | no figure | 281 | 2,778 |
| Nov 2025 | 1,378 | 52 | no figure | 177 | 1,607 |
| Dec 2025 | 2,336 | 46 | no figure | 354 | 2,736 |
| Jan 2026 | 1,028 | 38 | no figure | 156 | 1,222 |
| Feb 2026 | 908 | 50 | no figure | 87 | 1,045 |
| Mar 2026 | 765 | 39 | no figure | 83 | 887 |
| Apr 2026 | 733 | 64 | no figure | 53 | 850 |
| May 2026 | 688 | 46 | no figure | 110 | 844 |
| Jun 2026 | 743 | 26 | no figure | 70 | 839 |
| Jul 2026 | 705 | 54 | 28 | 94 | 881 |
| Aug 2026 | 667 | 30 | 34 | 44 | 775 |
| Sep 2026 | 722 | no figure | 17 | 157 | 896 |

First day on record: CRAN 21 Jun 2019, r2u 22 May 2022, autoCRAN 29 Jun 2026, conda-forge 3 Jan 2025.

Every channel here counts downloads, so the channels can be stacked and summed for one period. Each channel counts in its own way and covers a different span of years, so read a sum as a rough total, and read a rise where a channel begins as that channel starting, not as growth.

Weeks start on Monday. A first or last week or month that the channel does not cover in full is left out, so every point is a whole period.

Days with no record add nothing to their week or month. For a little-used package that is usually a day with no downloads, but it can also be a gap in collection.

[Compare downloads](/downloads/compare/cppRouting.md#add)

## Dependencies

[Method](/about/reverse-dependencies.md)

- Needs: 4
- Dependent packages: 7
- Suggested by: 0

**Needs (4)**

- [data.table](/cran/data.table.md)
- [Rcpp](/cran/Rcpp.md)
- [RcppParallel](/cran/RcppParallel.md)
- [RcppProgress](/cran/RcppProgress.md)

- Installing it adds: 4 packages, 8.2 MB of source
- Of those, need compilation: 3

**Optional extras (3)**

- [igraph](/cran/igraph.md)
- [knitr](/cran/knitr.md)
- [rmarkdown](/cran/rmarkdown.md)

**Dependent packages (7)**

| Package | Title | Downloads in 30 days |
| --- | --- | ---: |
| [spNetwork](/cran/spNetwork.md) | Spatial Analysis on Network | 582 |
| [himach](/cran/himach.md) | Find Routes for Supersonic Aircraft | 433 |
| [spanner](/cran/spanner.md) | Utilities to Support Lidar Applications at the Landscape, Forest, and Tree Scale | 426 |
| [GISSB](/cran/GISSB.md) | Network Analysis on the Norwegian Road Network | 319 |
| [uci](/cran/uci.md) | Urban Centrality Index | 266 |
| [rTARDIS](/cran/rTARDIS.md) | Terrains and Routes Directed in Spacetime | 198 |
| [havel](/cran/havel.md) | Visualize and Tabulate 'R' Package Dependencies | 181 |

## Code

[Method](/about/code-metrics.md)

Selected function: `get_distance_matrix`

- Kind: Public R function
- File: R/get_distance_mat.R, line 49
- Lines: 98
- Complexity: 18

Called by 0: nothing in this package

Calls 4: [`cppaddC`](/cran/cppRouting.md?fn=cppaddC&view=focus#code), [`cppdistmat`](/cran/cppRouting.md?fn=cppdistmat&view=focus#code), [`cppdistmatC`](/cran/cppRouting.md?fn=cppdistmatC&view=focus#code), [`cpppadd`](/cran/cppRouting.md?fn=cpppadd&view=focus#code)

Paths: 2 steps each way.

Called by 0:

- nothing in this package

Calls 4:

- [`cppaddC`](/cran/cppRouting.md?fn=cppaddC&view=focus#code)
- [`cppdistmat`](/cran/cppRouting.md?fn=cppdistmat&view=focus#code)
- [`cppdistmatC`](/cran/cppRouting.md?fn=cppdistmatC&view=focus#code)
- [`cpppadd`](/cran/cppRouting.md?fn=cpppadd&view=focus#code)

The open file in the files map is `R/get_distance_mat.R`.

- Functions: 1
- Lines: 98
- Calls that stay inside it: 0
- Calls to other files: 4, to 1
- Calls from other files: 0

It calls: `R/RcppExports.R` (4 calls)

| Function in get_distance_mat.R | Calls in other files |
| --- | --- |
| [`get_distance_matrix`](/cran/cppRouting.md?fn=get_distance_matrix&view=focus#code) selected | [`cppaddC`](/cran/cppRouting.md?fn=cppaddC&view=focus#code), [`cppdistmat`](/cran/cppRouting.md?fn=cppdistmat&view=focus#code), [`cppdistmatC`](/cran/cppRouting.md?fn=cppdistmatC&view=focus#code), [`cpppadd`](/cran/cppRouting.md?fn=cpppadd&view=focus#code) |


7 files with no calls to or from another: `R/graphs.R`, `R/to_df.R`, `R/zzz.R`, `src/aggc.cpp`, `src/aggc.h`, `src/cgraph.cpp`, `src/graph.cpp`.

The whole package has 157 function names in 33 files and 56 calls between them. Most calls between files: `src/aon.cpp` and `src/RcppExports.cpp` (5 calls), `src/path_pair.cpp` and `src/RcppExports.cpp` (5 calls), `R/get_distance_mat.R` and `R/RcppExports.R` (4 calls), `R/get_distance_pair.R` and `R/RcppExports.R` (4 calls), `src/aon.cpp` and `src/stall.cpp` (3 calls).

Graph: the whole call graph has 63 function names that take part in a call and 56 calls between them, set out in 2 layers with callers before what they call. 94 function names have no calls and are left out. Called by the most functions: `reverse` (14), `Stall_par` (6), `cpppath` (3), `quickDelete3` (2), `getaon` (2). Calling the most functions: `network` (6), `get_distance_matrix` (4), `get_distance_pair` (4), `Graph::simp` (3), `CGraph::contract_one_node` (2).

Most connected functions: [`get_distance_matrix`](/cran/cppRouting.md?fn=get_distance_matrix&view=focus#code) 4, [`get_distance_pair`](/cran/cppRouting.md?fn=get_distance_pair&view=focus#code) 4, [`cpppath`](/cran/cppRouting.md?fn=cpppath&view=focus#code) 3, [`assign_traffic`](/cran/cppRouting.md?fn=assign_traffic&view=focus#code) 2, [`cpppathmat`](/cran/cppRouting.md?fn=cpppathmat&view=focus#code) 2, [`get_aon`](/cran/cppRouting.md?fn=get_aon&view=focus#code) 2

To select another function, add ?fn=NAME to this address.

The call graph also has an address of its own: /cran/cppRouting/graph.md?fn=get_distance_matrix&view=focus

- Functions: 202
- Public exports: 12
- Lines of R code: 1,534
- Median complexity: 1

**Functions (202)**

| Function (sorted, low to high) | Kind | File | Lines | Complexity |
| --- | --- | --- | ---: | ---: |
| [`assign_traffic`](/cran/cppRouting.md?fn=assign_traffic#code) | Public | R/assign_traffic.R | 156 | 32 |
| [`cpp_contract`](/cran/cppRouting.md?fn=cpp_contract#code) | Public | R/contract.R | 18 | 2 |
| [`cpp_simplify`](/cran/cppRouting.md?fn=cpp_simplify#code) | Public | R/simplify.R | 48 | 4 |
| [`get_aon`](/cran/cppRouting.md?fn=get_aon#code) | Public | R/get_aon.R | 68 | 15 |
| [`get_detour`](/cran/cppRouting.md?fn=get_detour#code) | Public | R/get_detour.R | 44 | 10 |
| [`get_distance_matrix`](/cran/cppRouting.md?fn=get_distance_matrix#code) | Public | R/get_distance_mat.R | 98 | 18 |
| [`get_distance_pair`](/cran/cppRouting.md?fn=get_distance_pair#code) | Public | R/get_distance_pair.R | 125 | 24 |
| [`get_isochrone`](/cran/cppRouting.md?fn=get_isochrone#code) | Public | R/get_isochrone.R | 57 | 10 |
| [`get_multi_paths`](/cran/cppRouting.md?fn=get_multi_paths#code) | Public | R/get_multi_paths.R | 51 | 8 |
| [`get_path_pair`](/cran/cppRouting.md?fn=get_path_pair#code) | Public | R/get_path_pair.R | 91 | 16 |
| [`makegraph`](/cran/cppRouting.md?fn=makegraph#code) | Public | R/graphs.R | 88 | 26 |
| [`to_df`](/cran/cppRouting.md?fn=to_df#code) | Public | R/to_df.R | 9 | 2 |

This page lists 1 to 12 of 202 functions. [Next](/cran/cppRouting.md?sort=name&order=asc&fpage=2#functions)

**Size and composition**

#### Lines by kind (10,594)

| Kind | Lines | Share |
| --- | ---: | ---: |
| R code | 1,534 | 14% |
| Documentation | 906 | 9% |
| Guides | 105 | 1.0% |
| Compiled code | 8,049 | 76% |

#### Lines by language

| Language | Lines | Share |
| --- | ---: | ---: |
| C++ | 7,308 | 69% |
| R | 1,534 | 15% |
| Rd | 906 | 9% |
| C | 741 | 7% |
| Vignettes | 105 | 1% |

Languages are counted from file extensions.

- Files: 62
- R functions: 31
- Compiled functions: 171

**Complexity**

- Median: 1
- Mean: 6
- Highest: 32
- Median lines per function: 3

_About complexity: Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only._

**Call graph figures**

- R functions: 31
- Calls: 20
- Unconnected: 4
- Groups: 7

**Growth (6 releases)**

Total lines by release: from 2,935 (on 21 Jun 2019) to 10,594 (on 28 Nov 2025). The lowest is 2,935 and the highest is 10,594.

**Release changes**

[Both releases side by side](/cran/cppRouting/compare/3.1...3.2.md)

**3.1 to 3.2**, 1 Dec 2022 to 28 Nov 2025

- Files changed: 15
- Lines added: 612
- Lines deleted: 344
- Exports: No change

**Changed measures (1)**

| Measure | Subject | Before | After |
| --- | --- | ---: | ---: |
| System requirements | Requirements | 2 | 1 |

**Most changed files (12 of 15)**

| File | Lines added | Lines deleted |
| --- | ---: | ---: |
| `inst/doc/cppRouting.html` | 425 | 161 |
| `R/RcppExports.R` | 75 | 75 |
| `NEWS.md` | 64 | 59 |
| `MD5` | 14 | 14 |
| `src/wrapper.cpp` | 14 | 14 |
| `DESCRIPTION` | 9 | 8 |
| `inst/doc/cppRouting.R` | 6 | 6 |
| `src/distance_mat.cpp` | 1 | 1 |
| `src/distance_pair.cpp` | 1 | 1 |
| `src/graph.h` | 1 | 1 |
| `src/path_mat.cpp` | 1 | 1 |
| `src/path_pair.cpp` | 1 | 1 |

## Tests

[Method](/about/coverage.md)

The package was built and has no tests to run.

- Lines of tests: 0
- Exports named in tests: 0%

**Test suite**

- Has tests: No
- Test frameworks: No tests in this release
- Test lines per line of code: 0

## Documentation

[Method](/about/code-metrics.md)

- Exports documented: 100%
- Arguments documented: 100%
- Return value documented: 100%
- Help pages with examples: 100%
- Examples run in checks: 100%

**Guides (1)**

- [cppRouting](https://cran.r-project.org/web/packages/cppRouting/vignettes/cppRouting.html)

**Other documentation**

- README: No
- Release notes file: Yes
- Help pages: 12
- Lines of documentation: 906

## People

[Method](/about/author-identity.md)

- [Vincent Larmet](/people/Vincent+Larmet.md): Maintainer since 1.1 (2019), author

## Repository

[Method](/about/repo-signals.md#figures)

[vlarmet](/repos/vlarmet.md) / [cpprouting](https://github.com/vlarmet/cpprouting) on github.com

- Stars: 122 (no change on 30 days ago)
- Forks: 11
- Open issues: 11
- Last commit: 22 Jul 2026

**Activity**

- Commits: 170
- Open pull requests: 0
- Tagged releases: 4
- Latest tagged release: v2.0, 28 Nov 2022
- In development: Default branch at 4.0, ahead of CRAN 3.2 (checked 2026-10-25)
- Issues closed in: 3 days (median)
- Pull requests closed in: 2 days (median)
- Pull requests merged: 25%
- Created: 1 Jun 2019
- Licence file reads as: –

**Development practices (2)**

| Kind | Found |
| --- | --- |
| Continuous integration | GitHub Actions, R CMD check workflow The `R CMD check` workflow runs on Linux, macOS and Windows, and on R-devel |

[Across vlarmet](/repos/vlarmet.md#practices)

## History

[Method](/about/archive.md)

The line runs from the first release of cppRouting on 21 Jun 2019 to 29 Oct 2026 and marks all 6 of its releases.

| Version | Released | R |
| --- | --- | ---: |
| [3.2](/cran/cppRouting/v/3.2.md) current | 28 Nov 2025 | 4.5.2 |
| [3.1](/cran/cppRouting/v/3.1.md) | 1 Dec 2022 | 4.2.2 |
| [3.0](/cran/cppRouting/v/3.0.md) | 28 Nov 2022 | 4.2.2 |
| [2.0](/cran/cppRouting/v/2.0.md) | 7 Jan 2020 | 3.6.2 |
| [1.2](/cran/cppRouting/v/1.2.md) | 30 Sep 2019 | 3.6.1 |
| [1.1](/cran/cppRouting/v/1.1.md) | 21 Jun 2019 | 3.6.0 |

**Release notes (3.2)**

- update DESCRIPTION file : remove c++11 specification and add Authors@R field

---

R Observatory is independent of the R Project, CRAN and Bioconductor. The same page for people is at /cran/cppRouting, and every address is listed at /llms.txt.
