Learn R Programming

SteinerNet (version 2.0)

steiner_comparison_plots: steiner_comparison_plots

Description

This function plots the comparison results of Steiner tree algorithms excutions on simulated data.

Usage

steiner_comparison_plots (test_name, test_folder = NULL, outputname = NULL,
listofterminaltest = NULL ,repetition = NULL)

Arguments

test_name

test_name selects the plot type to creat. 14 type of comparison are available to perform.

test_folder

testfolder specifies a folder name to read the result of steiner tree simulations.

outputname

outputname is name of a pdf file to store the result.

listofterminaltest

listofterminaltest is an input list. Elements of the list are number of terminals that are selected for a simulation.

repetition

repetition is a list of probabilities. Its length declares the number of elements if random data set that is created for each terminal number.

Value

The function stores a resulted plot in a PDF file.

Details

This function creates 12 different comparison types and depicts them by plots. test_name specifies the type of comparison.

test_name can be on of the following character values.

exact refers to time and edge number comparison of Steiner tree algorithms including the exact algorithm.

appr refers to time and edge number comparison of Steiner tree algorithms without the exact algorithm.

Enum refers to time and edge number comparison of Steiner tree enumeration algorithms.

Enum-median-venn-node-edge refers edge and node number comparison of subgraphs made by Steiner tree enumeration algorithms via Venn diagram.

org refers to edge number comparison of random subgraphs that are made by simulations.

org-dens-e refers to edge density comparison of random graphs that are made by random graph generator.

appr-vfreq refers to vertex frequency comparison of Steiner tree algorithms without the exact algorithm.

exact-vfreq refers to vertex frequency comparison of Steiner tree algorithms including the exact algorithm.

Enum-vfreq refers to vertex frequency comparison of Steiner tree enumeration algorithms.

appr-density-e refers to edge density comparison of steiner tree algorithms excluding the exact algorithm.

exact-density-e refers to edge density comparison of steiner tree algorithms including the exact algorithm.

Enum-density-e refers to edge density comparison of steiner tree enumeration algorithms.

If testfolder is NULL, it will use default value "steinerdatae" for folder when test is exact and "steinerdataenum" when test is enum.

When outputname is NULL, a default value would be used for output pdf file name with consideration of selected type.

listofterminaltest in our study was made of 5, 8, 20, 50, 70 for comparing approximate algorithms and it was 5, 8 for experiments that included exact Steiner tree algorithm. [1]

In our study, we repeated the tests 50 times, and we made the random walk to select a node to be terminal with 0.5 probability while it traverses the base graph. Therefore repetition in our comparison was a list of fifty 0.5 values. If repetition is NULL, the function regards the repetition and listofterminaltest values that were used in our study.

References

1. Please refer to the paper that is published with this package.

Examples

Run this code
# NOT RUN {
       library(igraph)
       library(SteinerNet)
       g <- igraph::graph.ring(10)
       
# }
# NOT RUN {
       
# }
# NOT RUN {
       generate_st_samples("exact", g, "testfolder", c(2,3), c(.8,.8))
       steiner_simulation("exact", "testfolder", c(2,3), c(.8,.8))
       steiner_comparison_plots ("exact", "testfolder", c(2,3), c(.8,.8))
       
# }

Run the code above in your browser using DataLab