Feature for the rank-width graph decomposition¶
- class sage.features.rankwidth.RankWidth(*args, **kwds)[source]¶
Bases:
BuildModuleA
Featureindicating whether or not the rank-width graph decomposition is available.This is a proxy for the build-time availability of the rankwidth (librw) library from the “rw” package; the associated module
sage.graphs.graph_decompositions.rankwidthis built if and only if the library is detected, usable, and enabled.EXAMPLES:
sage: from sage.features.rankwidth import RankWidth sage: RankWidth().is_present() # needs rankwidth FeatureTestResult('rankwidth', True) sage: RankWidth().is_present() # needs !rankwidth FeatureTestResult('rankwidth', False)
>>> from sage.all import * >>> from sage.features.rankwidth import RankWidth >>> RankWidth().is_present() # needs rankwidth FeatureTestResult('rankwidth', True) >>> RankWidth().is_present() # needs !rankwidth FeatureTestResult('rankwidth', False)
from sage.features.rankwidth import RankWidth RankWidth().is_present() # needs rankwidth RankWidth().is_present() # needs !rankwidth
A runtime check. We only check the “present” case because, if feature checks are _not_ deferred, the
needs !rankwidthcan be satisfied (disabled at build time) at the same time we are able to import a module that was installed for a previous build of sage:sage: from sage.features.rankwidth import RankWidth sage: RankWidth().is_present_at_runtime() # needs rankwidth FeatureTestResult('rankwidth', True)
>>> from sage.all import * >>> from sage.features.rankwidth import RankWidth >>> RankWidth().is_present_at_runtime() # needs rankwidth FeatureTestResult('rankwidth', True)
from sage.features.rankwidth import RankWidth RankWidth().is_present_at_runtime() # needs rankwidth