Class: HostPermutation

HostPermutation

(abstract) new HostPermutation(reverse)

The constructor for this abstract class will typically be invoked by concrete sub-classes
Parameters:
Name Type Description
reverse Boolean If true, the ordering of hosts is reversed
Source:

Methods

addGraph(graph)

Adds a graph to the HostPermutation. HostPermutation determines an ordering of hosts based on the hosts of graphs added using this method
Parameters:
Name Type Description
graph ModelGraph The graph to add
Source:

getHostColor(host) → {String}

Gets the designated color of the specified host
Parameters:
Name Type Description
host String The host whose color you want to retrieve
Source:
Returns:
A valid color string.
Type
String

getHostColors() → {Object.<String, String>}

Returns all designated host colors
Source:
Returns:
A mapping of host name to host color
Type
Object.<String, String>

getHosts() → {Array.<String>}

Gets a list of hosts in the order determined by the HostPermutation. Note that you must call update to compute the ordering of hosts before retrieving it with this method
Source:
Returns:
Array of hosts
Type
Array.<String>

getHostsAndFilter(filter) → {Array.<String>}

Gets a list of hosts in the order determined by the HostPermutation. Only hosts contained in both this HostPermutation and the filter array will be returned. Note that you must call update to compute the ordering of hosts before retrieving it with this method.
Parameters:
Name Type Description
filter Array.<String> The filter array.
Source:
Returns:
Array of hosts
Type
Array.<String>

(abstract) update()

The update method alone is responsible for figuring out the ordering of hosts and for assigning host colors.

In its current form, because it is an abstract method, it only performs color assignment. Classes that extend HostPermutation must be sure to override this method and extend it with host permutation assignment functionality.

Source: