Nothing
test.getAdja <- function() {
n <- 3
K <- 4
true_result <- matrix(c(0, 0.7947368, -1.1411606,
0, 0.0000000, 1.9358974,
0, 0.0000000, 0.000000), nrow=n, ncol=n, byrow=TRUE)
res <- list()
res$solution <- c(0.0000000, 0.7947368, 0.0000000,
0.0000000, 0.0000000, 1.9358974,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 1.1411606,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.7550000, 0.0000000, 0.0000000,
0.0000000, 0.4450526, 0.4450526,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000)
res$objective <- c(0, 1, 1, 1, 0, 1, 1, 1, 0, 0,
1, 1, 1, 0, 1, 1, 1, 0, 1, 1,
1, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10)
names(res$objective) <- c("w+_1_1", "w+_1_2", "w+_1_3",
"w+_2_1", "w+_2_2", "w+_2_3",
"w+_3_1", "w+_3_2", "w+_3_3",
"w-_1_1", "w-_1_2", "w-_1_3",
"w-_2_1", "w-_2_2", "w-_2_3",
"w-_3_1", "w-_3_2", "w-_3_3",
"w_1_^_0", "w_2_^_0", "w_3_^_0",
"s_1", "s_2", "s_3", "s_4",
"s_5", "s_6", "s_7", "s_8",
"s_9", "s_10", "s_11", "s_12")
adja = getAdja(res, n)
checkEquals(true_result, adja)
}
test.getAdjaTimeSeries<- function() {
n <- 3
true_result = matrix(c(0, 0.7947368, 0.0000000,
0, 0.0000000, 0.7947368,
0, 0.0000000, 0.0000000), nrow=n, ncol=n, byrow=TRUE)
res = list()
res$solution <- c(0.0000000, 0.7947368, 0.0000000,
0.0000000, 0.0000000, 0.7947368,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.7550000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000)
res$objective <- c(0, 1, 1, 1, 0, 1, 1, 1, 0, 0,
1, 1, 1, 0, 1, 1, 1, 0, 1, 1,
1, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10)
names(res$objective) <- c("w+_1_1", "w+_1_2", "w+_1_3",
"w+_2_1", "w+_2_2", "w+_2_3",
"w+_3_1", "w+_3_2", "w+_3_3",
"w-_1_1", "w-_1_2", "w-_1_3",
"w-_2_1", "w-_2_2", "w-_2_3",
"w-_3_1", "w-_3_2", "w-_3_3",
"w_1_^_0", "w_2_^_0", "w_3_^_0",
"s_1", "s_2", "s_3", "s_4",
"s_5", "s_6", "s_7", "s_8",
"s_9", "s_10", "s_11", "s_12",
"s_13", "s_14", "s_15", "s_16",
"s_17", "s_18", "s_19", "s_20",
"s_21", "s_22", "s_23", "s_24",
"s_25", "s_26", "s_27", "s_28",
"s_29", "s_30", "s_31", "s_32",
"s_33", "s_34", "s_35", "s_36")
adja = getAdja(res, n)
checkEquals(true_result, adja)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.