Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please see the chatroom before you comment here.
This adds
max_degree()
, and is also meant to serve as an example for beginner contirbutors on how to expose a new function.Why do we want
max_degree()
instead of just usingmax(degree())
? This function produces0
instead of-Inf
for empty vertex sets, which is convenient when using it as a building block.There was a documentation item for
\dots
fordegree()
, which did not seem to make sense. I removed it.This is blocked on the decision-making issue #853: do we use
v
orvids
?Explanation for beginners on how this PR was produced:
igraph_maxdegree()
was (re-)enabled infunctions-R.yaml
PARAM_NAMES
can be used to rename parameters from the upstreamfunctions.yaml
to fit the standards used in the R interfacePARAM_ORDER
is used not to reorder parameters, but to add the...
parameter to the R interface (denoted by*
in the interface definition). In the R interface, parameters following the...
must be spelt out with full name....
was added, we need@inheritParams rlang::args_dots_empty
in the documentationmake -f Makefile-cigraph src/rinterface.c R/aaa-auto.R
. The two files mentioned in this command are automatically generated. The generated R function (maxdegree_impl
) can either be wrapped by the final public function (max_degree()
) or in simple cases (like here) just assigned to it.R -q -e 'cpp11::cpp_register()'
since a new C function was added.R -q -e 'devtools::document()'
to (re-)generate the documentation files inman
as well as theNAMESPACE
file.#' @examples
devtools::test()
before submitting the PR.