count-fiber: Count the elements of a fiber Ax = b

count-fiberR Documentation

Count the elements of a fiber Ax = b

Description

Count the elements of a fiber Ax = b

Usage

count_fiber(A, b, dir = tempdir(), quiet = TRUE, cache = TRUE, ...)

countFiber(...)

Arguments

A

the A matrix of Ax = b

b

the b vector of Ax = b

dir

directory to place the files in, without an ending /

quiet

show latte output

cache

use count (default) or fcount

...

additional arguments to latte_count()

Details

count_fiber uses LattE's count function (via latte's latte_count()) to count the fiber In many cases, the number of such tables is enormous. In these cases, instead of giving back an integer count_fiber provides a character string with the integer in it; see examples.

Value

an integer

See Also

latte_count()

Examples


## Not run:  requires LattE

data(politics); politics

(A <- hmat(c(2,2), list(1, 2)))
count_tables(politics, A)
b <- A %*% tab2vec(politics)
count_fiber(A, b)


# this counts the number of ways 10 non-negative integers can sum to 100
A <- ones(1, 10)
count_fiber(A, 100, cache = FALSE)
system.time(count_fiber(A, 100, cache = FALSE))
system.time(count_fiber(A, 100))
system.time(count_fiber(A, 100))



## End(Not run)



dkahle/algstat documentation built on May 23, 2023, 12:29 a.m.