PolyhedraDatabase | R Documentation |
Scrapes all polyhedra in data folder to save a representation which
is accessible by the final users upon call to getPolyhedron()
.
version
version of database file
polyhedra.rds.file
path of rds database file
sources.config
Sources configuration for scraping different sources
ledger
rr ledger of scraping process
logger
class logger
new()
Create a new PolyhedraDatabase object.
PolyhedraDatabase$new()
A new 'PolyhedraDatabase' object.
getVersion()
get the version of the current object.
PolyhedraDatabase$getVersion()
Database version
configPolyhedraRDSPath()
sets the path of the RDS object
PolyhedraDatabase$configPolyhedraRDSPath()
Database version
existsSource()
Determines if the source exists on the database
PolyhedraDatabase$existsSource(source)
source
source description
boolean value
addSourceConfig()
add source.config to the database
PolyhedraDatabase$addSourceConfig(source.config)
source.config
SourceConfig object able to scrape source polyhedra definitions
PolyhedraDatabase object
existsPolyhedron()
Determines if the database includes a polyhedron which name matches the parameter value
PolyhedraDatabase$existsPolyhedron(source = "netlib", polyhedron.name)
source
source description
polyhedron.name
polyhedron description
boolean value
getPolyhedraSourceDir()
gets polyhedra sources folder
PolyhedraDatabase$getPolyhedraSourceDir(source, create.dir = TRUE)
source
source description
create.dir
if dir does not exists, create it
string with polyhedra sources path
getPolyhedronFilename()
gets the filename of the polyhedron matching parameter.
PolyhedraDatabase$getPolyhedronFilename(source, polyhedron.name, extension)
source
source description
polyhedron.name
polyhedron description
extension
extension of the polyhedron filename
string with polyhedron filename
getPolyhedron()
gets polyhedron object which name matches the parameter value
PolyhedraDatabase$getPolyhedron( source = "netlib", polyhedron.name, strict = FALSE )
source
source description
polyhedron.name
polyhedron description
strict
halts execution if polyhedron not found
Polyhedron object
addPolyhedron()
add polyhedron object to the database
PolyhedraDatabase$addPolyhedron( source = "netlib", source.filename, polyhedron, overwrite = FALSE, save.on.change = FALSE )
source
source description
source.filename
filename of the polyhedron source definition
polyhedron
polyhedron object
overwrite
overwrite exiting definition
save.on.change
saves Database state after operation
Polyhedron object
configPolyhedraSource()
Process parameter filenames using source.config parameter
PolyhedraDatabase$configPolyhedraSource( source.config, source.filenames = NULL, max.quant = 0, save.on.change = FALSE )
source.config
source configuration for scraping files
source.filenames
filenames of the polyhedron source definition
max.quant
maximum filenames to process
save.on.change
saves Database state after operation
Modified 'PolyhedraDatabase' object.
saveRDS()
saveRDS
PolyhedraDatabase$saveRDS(save.on.change = TRUE)
save.on.change
saves Database state after operation
saveRDS return status
cover()
Cover objects and applies covering.code parameter
PolyhedraDatabase$cover( mode, sources = names(self$sources.config), covering.code, polyhedra.names = NULL, max.quant = 0, save.on.change = FALSE, seed = NULL )
mode
covering mode. Available values are "scrape.queued", "scrape.retry","skipped", "test"
sources
sources names
covering.code
code for applying in covering
polyhedra.names
polyhedra names to cover (optional)
max.quant
maximum numbers of polyhedra to cover
save.on.change
saves Database state after operation
seed
seed for deterministic random generator
A list with resulting objects covered
scrape()
Scrape polyhedra queued sources
PolyhedraDatabase$scrape( mode = "scrape.queued", sources = names(self$sources.config), max.quant = 0, time2scrape.source = 30, save.on.change = FALSE, skip.still.queued = FALSE )
mode
covering mode. Available values are "scrape.queued", "scrape.retry","skipped", "test"
sources
sources names
max.quant
maximum numbers of polyhedra to cover
time2scrape.source
maximum time to spend scraping each source
save.on.change
saves Database state after operation
skip.still.queued
Flag unscraped files with status 'skipped“
covering.code
code for applying in covering
polyhedra.names
polyhedra names to cover (optional)
A list with resulting objects covered
testRR()
testRR
PolyhedraDatabase$testRR(sources = names(self$sources.config), max.quant = 0)
sources
sources names
max.quant
maximum numbers of polyhedra to cover
A list with resulting objects tested
generateTestTasks()
generate Test tasks for selected polyhedra
PolyhedraDatabase$generateTestTasks( sources = names(self$sources.config), polyhedra.names = NULL, TestTaskClass, max.quant = 0 )
sources
sources names
polyhedra.names
polyhedra names to cover (optional)
TestTaskClass
an R6 TestTaskClass class
max.quant
maximum numbers of polyhedra to cover
A list with resulting TestTasks generated
schedulePolyhedraSources()
Schedules polyhedra sources for scraping
PolyhedraDatabase$schedulePolyhedraSources( sources.config = getPackageEnvir(".available.sources"), source.filenames = NULL, max.quant = 0, save.on.change = FALSE )
sources.config
sources configurations for scraping files
source.filenames
filenames of the polyhedron source definition
max.quant
maximum filenames to process
save.on.change
saves Database state after operation
Modified 'PolyhedraDatabase' object.
getAvailableSources()
Returns available sources in current database
PolyhedraDatabase$getAvailableSources()
A vector with names of available sources
getAvailablePolyhedra()
Retrieves all polyhedron within the source those names match with search.string
PolyhedraDatabase$getAvailablePolyhedra( sources = self$getAvailableSources(), search.string = NULL, ignore.case = TRUE )
sources
sources names
search.string
string for matching polyhedron names
ignore.case
ignore case in search string
A list with resulting objects covered
clone()
The objects of this class are cloneable with this method.
PolyhedraDatabase$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.