Skip to content

eles.absoluteComplement()

eles.absoluteComplement — Collection > Building and filtering. Cytoscape.js signatures, parameters and return contract.

eles.absoluteComplement — Collection › Building and filtering

Preview · Collection › Building and filtering

Read in the complete API reference · All API members

// All elements of the graph not in this collection
eles.absoluteComplement(): Collection<NodeData, EdgeData>

All elements of the graph not in this collection.

Returns Collection<NodeData, EdgeData>

the complement against the whole graph, not against any enclosing collection — which is what the absolute in the name is distinguishing

Example

console.log(eles.absoluteComplement().map(ele => ele.id())); // []

Example graph and handle setup

Also spelled eles.complement, eles.abscomp.