Learn R Programming

tspmeta (version 1.2)

rotate_instance: Rotate the cities of a TSP instance around a point.

Description

Rotate the cities of a TSP instance around a point.

Usage

rotate_instance(instance, angle, center)

Arguments

instance
[tsp_instance] TSP instance.
angle
[numeric(1)] Angle by which to rotate the coordinates. In radians.
center
[numeric] Point around which to rotate the cities. If missing, defaults to the center of mass of the cities.

Value

[tsp_instance] New TSP instance.