set.func.gen: Create objects of class "set.func", "game", or "capacity".

Description Usage Arguments Value See Also Examples

Description

These functions create objects of class set.func, game, or capacity from objects of class numeric.

Usage

1
2
3
set.func(object)
game(object)
capacity(object)

Arguments

object

An object of class numeric containing the coefficients of the set function in "natural" order. Its length has to be a power of 2.

Value

Return objects of class set.func, game, or capacity.

See Also

capacity-class,
game-class,
set.func-class.

Examples

1
2
3
set.func(-12:3)
game(c(0,rep(-1,15)))
capacity(0:15)

Example output

Loading required package: lpSolve
Loading required package: quadprog
Loading required package: kernlab
		set.func
{}		-12.000000
{1}		-11.000000
{2}		-10.000000
{3}		-9.000000
{4}		-8.000000
{1,2}		-7.000000
{1,3}		-6.000000
{1,4}		-5.000000
{2,3}		-4.000000
{2,4}		-3.000000
{3,4}		-2.000000
{1,2,3}		-1.000000
{1,2,4}		0.000000
{1,3,4}		1.000000
{2,3,4}		2.000000
{1,2,3,4}		3.000000
		game
{}		0.000000
{1}		-1.000000
{2}		-1.000000
{3}		-1.000000
{4}		-1.000000
{1,2}		-1.000000
{1,3}		-1.000000
{1,4}		-1.000000
{2,3}		-1.000000
{2,4}		-1.000000
{3,4}		-1.000000
{1,2,3}		-1.000000
{1,2,4}		-1.000000
{1,3,4}		-1.000000
{2,3,4}		-1.000000
{1,2,3,4}		-1.000000
		capacity
{}		0.000000
{1}		1.000000
{2}		2.000000
{3}		3.000000
{4}		4.000000
{1,2}		5.000000
{1,3}		6.000000
{1,4}		7.000000
{2,3}		8.000000
{2,4}		9.000000
{3,4}		10.000000
{1,2,3}		11.000000
{1,2,4}		12.000000
{1,3,4}		13.000000
{2,3,4}		14.000000
{1,2,3,4}		15.000000

kappalab documentation built on May 2, 2019, 5:49 a.m.