Skip to contents

This function tests whether a gGraph has heterogeneous costs associated to its edges.

Usage

hasCosts(x)

Arguments

x

a valid gGraph object.

Value

TRUE if the graph has heterogeneous edge costs, FALSE if costs are absent or uniform.

Details

This low-level function is designed to be called by other procedures of geoGraph. However, it can sometimes be useful by itself. Note that a gGraph with all costs set uniform will also result in FALSE. Unlike other functions in geoGraph, this function does not test for the validity of the provided arguments (for speed purposes).

See also

Examples


hasCosts(rawgraph.10k) # TRUE
#> [1] TRUE
hasCosts(worldgraph.10k) # FALSE as not all edges have costs
#> [1] FALSE