I have a set of p=100
covariates with some covariance matrix given for example by:
using LinearAlgebra
L=Symmetric(rand(100,100))
I need to extract submatrices from L
and perform some operations. However, I have a very large number of submatrices to extract:
using Combinatorics
n=32
neig=combinations(1:100,n-1)
The variables neig
is stored in a Base.Generator
type. I cannot extract all the elements with collect(neig)
because I get ERROR: OverflowError: binomial(100, 31) overflows
, so I let it stored in neig
. I want to apply a simple function like:
map(x->det(L[x,x]),neig)
but I get ERROR: OverflowError: binomial(100, 31) overflows
. I get similar errors with other functions and operations I have to do with neig
. If the matrix L
is smaller, for example with size 5 x 5
, the code works perfectly and I don’t have any trouble. How can I work with objects stored in Base.Iterators
of Base.Generator
types with a very large number of elements, like the variable neig
? I’m not even able to create an empty null vector with zeros(length(neig_minus.iter))
for storing loop results with enumerate()
because I get the same error. What are my options? Thank you !