File: NAMESPACE

package info (click to toggle)
r-cran-tsp 1.1-6-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,128 kB
  • sloc: ansic: 277; sh: 13; makefile: 2
file content (83 lines) | stat: -rw-r--r-- 1,685 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
useDynLib(TSP, .registration = TRUE)

importFrom(stats, as.dist, dist)
importFrom(utils, read.table, write.table)
importFrom(methods, is)
importFrom(grDevices, gray.colors)
importFrom(graphics, image.default, plot, polygon)
importFrom(foreach, foreach, "%dopar%")

export(TSP, 
       ATSP,
       ETSP,
       TOUR, 
       reformulate_ATSP_as_TSP,
       n_of_cities, 
       insert_dummy,
       cut_tour,
       tour_length,
       solve_TSP,
       linkern_help, 
       concorde_help, 
       concorde_path,
       read_TSPLIB, 
       write_TSPLIB,
       ## as.matrix,
       as.TSP,
       as.ATSP,
       as.ETSP,
       as.TOUR
       )

## TSP/ATSP/ETSP
S3method(print, TSP)
S3method(n_of_cities, TSP)
S3method(labels, TSP)
S3method(image, TSP)

S3method(print, ATSP)
S3method(n_of_cities, ATSP)
S3method(labels, ATSP)
S3method(image, ATSP)

S3method(print, ETSP)
S3method(n_of_cities, ETSP)
S3method(labels, ETSP)
S3method(image, ETSP)
S3method(plot, ETSP)

S3method(tour_length, TOUR)
S3method(tour_length, TSP)
S3method(tour_length, ATSP)
S3method(tour_length, ETSP)

S3method(insert_dummy, TSP)
S3method(insert_dummy, ATSP)
S3method(insert_dummy, ETSP)

S3method(write_TSPLIB, TSP)
S3method(write_TSPLIB, ATSP)
S3method(write_TSPLIB, ETSP)

S3method(solve_TSP, TSP)
S3method(solve_TSP, ATSP)
S3method(solve_TSP, ETSP)

## coercions
S3method(as.TSP, dist)
S3method(as.TSP, matrix)
S3method(as.dist, TSP)

S3method(as.ATSP, dist)
S3method(as.ATSP, matrix)
S3method(as.matrix, ATSP)

S3method(as.ETSP, data.frame)
S3method(as.ETSP, matrix)
S3method(as.matrix, ETSP)
S3method(as.TSP, ETSP)

## TOUR
S3method(print, TOUR)
S3method(cut_tour, TOUR)
S3method(as.TOUR, integer)