Function: copyParameters()
copyParameters(
params:Parameters):Parameters
Creates a deep copy of the input Parameters object.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | Parameters | The Parameters object to copy |
Returns
A deep copy of the input Parameters object.
Remarks
Creates a deep copy of the input Parameters object. Afterwards, the copy can be modified without affecting the original Parameters object.
import * as cp from "@scheduleopt/optalcp";
const params: cp.Parameters = { timeLimit: 60, nbWorkers: 4 };
const copy = cp.copyParameters(params);
copy.timeLimit = 120; // Does not affect original params