R/attribute_container.R

Defines functions print.NetSimAttributeContainer set_value create_scale_attribute_container create_attribute_container as.double.NetSimAttributeContainer as.numeric.NetSimAttributeContainer attribute_container_as_list

Documented in as.double.NetSimAttributeContainer as.numeric.NetSimAttributeContainer attribute_container_as_list create_attribute_container create_scale_attribute_container print.NetSimAttributeContainer set_value

# TODO: Add comment
# 
# Author: cws
###############################################################################

attribute_container_as_list <- function(attributeContainer){
	.Call( "attribute_container_as_list", attributeContainer, PACKAGE = "NetSim" )
}

as.numeric.NetSimAttributeContainer <- function(x, ...){
	return(attribute_container_as_list(x))
}

as.double.NetSimAttributeContainer <- function(x, ...){
	return(attribute_container_as_list(x))
}


create_attribute_container <- function(numericVector){
	.Call( "create_attribute_container", numericVector, PACKAGE = "NetSim" )
}

create_scale_attribute_container <- function(numericVector, min = 0, max = 1, by = 1){
	.Call("create_scale_attribute_container", 
			numericVector, min, max, by, PACKAGE = "NetSim")
}

set_value <- function(attributeContainer, i, value){
	.Call("set_value", attributeContainer, i, value, PACKAGE = "NetSim")
}

print.NetSimAttributeContainer <- function(x, ...){
	print("Pointer to NetSim attribute container object:", quote = FALSE)
	print(attribute_container_as_list(x))
}

Try the NetSim package in your browser

Any scripts or data that you put into this service are public.

NetSim documentation built on May 29, 2017, 6:41 p.m.