ffa.heuristical_swap: Heuristical Swap (step2)

Description Usage Arguments Details Value

View source: R/solver_ffa.R

Description

Swaps an uncolored vertex with the vertex that has highest saturation degree if tie, choose randomly

Usage

1
ffa.heuristical_swap(p, w, v, satur)

Arguments

p

vector of colors

w

vector of weights

v

the uncolored vertex which will be swapped

satur

vector of saturation degrees

Details

Steps: 1. get the first uncolored vertex 2. sort the predecessors according to the saturation degree descending 3. swap the uncolored vertex with the vertex that has highest saturation degree, if tie, choose randomly (from the tie set)

Value

a permutation of w


caranha/EvoGCP documentation built on May 3, 2021, 3:40 p.m.