R/gen-InformationCriteria.R

Defines functions DIC_acc BIC_acc AIC_acc so_InformationCriteria_set_DIC so_InformationCriteria_get_DIC so_InformationCriteria_set_BIC so_InformationCriteria_get_BIC so_InformationCriteria_set_AIC so_InformationCriteria_get_AIC so_InformationCriteria_unref so_InformationCriteria_ref so_InformationCriteria_free so_InformationCriteria_copy so_InformationCriteria_new

# libsoc - Library to handle standardised output files
# Copyright (C) 2015 Rikard Nordgren
# 
# This file was autogenerated and should not be edited
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# 
# his library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see <http://www.gnu.org/licenses/>.

so_InformationCriteria_new <- function() {
	obj = .Call("r_so_InformationCriteria_new")
}

so_InformationCriteria_copy <- function(self) {
	.Call("r_so_InformationCriteria_copy", self)
}

so_InformationCriteria_free <- function(self) {
	.Call("r_so_InformationCriteria_free", self)
}

so_InformationCriteria_ref <- function(self) {
	.Call("r_so_InformationCriteria_ref", self)
}

so_InformationCriteria_unref <- function(self) {
	.Call("r_so_InformationCriteria_unref", self)
}

so_InformationCriteria_get_AIC <- function(self) {
	.Call("r_so_InformationCriteria_get_AIC", self)
}

so_InformationCriteria_set_AIC <- function(self, value) {
	.Call("r_so_InformationCriteria_set_AIC", self, value)
}

so_InformationCriteria_get_BIC <- function(self) {
	.Call("r_so_InformationCriteria_get_BIC", self)
}

so_InformationCriteria_set_BIC <- function(self, value) {
	.Call("r_so_InformationCriteria_set_BIC", self, value)
}

so_InformationCriteria_get_DIC <- function(self) {
	.Call("r_so_InformationCriteria_get_DIC", self)
}

so_InformationCriteria_set_DIC <- function(self, value) {
	.Call("r_so_InformationCriteria_set_DIC", self, value)
}

AIC_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_InformationCriteria_get_AIC(.self$.cobj)
		} else {
			if (!is(value, "numeric")) {
				stop("object must be of type 'numeric'")
			}
			so_InformationCriteria_set_AIC(.self$.cobj, value)
		}
	}
}

BIC_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_InformationCriteria_get_BIC(.self$.cobj)
		} else {
			if (!is(value, "numeric")) {
				stop("object must be of type 'numeric'")
			}
			so_InformationCriteria_set_BIC(.self$.cobj, value)
		}
	}
}

DIC_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_InformationCriteria_get_DIC(.self$.cobj)
		} else {
			if (!is(value, "numeric")) {
				stop("object must be of type 'numeric'")
			}
			so_InformationCriteria_set_DIC(.self$.cobj, value)
		}
	}
}

so_InformationCriteria = setRefClass("so_InformationCriteria",
	fields=list(
		AIC = AIC_acc,
		BIC = BIC_acc,
		DIC = DIC_acc,
		.cobj = "externalptr"
	),
	methods=list(
		copy = function() {
			copy = so_InformationCriteria_copy(.self$.cobj)
			so_InformationCriteria$new(cobj=copy)
		},
		initialize = function(cobj) {
			if (missing(cobj)) {
				.cobj <<- so_InformationCriteria_new()
			} else {
				.cobj <<- cobj
			}
		},
		finalize = function() {
			so_InformationCriteria_unref(.self$.cobj)
		}
	)
)

Try the libsoc package in your browser

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

libsoc documentation built on Feb. 3, 2022, 5:07 p.m.