Questions tagged [lazy-computations]
The lazy-computations tag has no summary.
26 questions
0
votes
2
answers
145
views
Iterating through the sublists to find all desired ones
Sometimes, the number of sublists can be too large, which may lead to memory crashes. I saw the following nice blog.
...
2
votes
2
answers
223
views
List of all sequences with certain properties
I am trying to relearn Mathematica after a gap of around 30 years. I want a list of all sequences of non-negative integers with certain properties. Each sequence has the same length len and the sum of ...
3
votes
1
answer
164
views
Writing 'yield' style generator function
Just out of personal curiosity because I can't think of any solution. Probably, it's not possible, but I want a decisive answer. Is there some clever way of implementing the following function?
...
9
votes
2
answers
697
views
How can I correctly use LazySubsets from Wolfram's Lazy package?
I know that Subsets[list] gives the power set of list and Subsets[list,{k}] gives all subsets containing exactly $k$ elements.
...
2
votes
1
answer
85
views
Extract only a few coefficients of the multiple of extremely many polynomials
I want to extract some informations, say the coefficients of $x^{500}$ and $x^{1000}$ terms (numerical values are acceptable), of the multiple of
...
0
votes
0
answers
48
views
Parameter sensitivity when integrating in Mathematica [duplicate]
When I try to integrate this MMA freezes:
...
1
vote
1
answer
151
views
Variable substitution when integrating with Mathematica
When I try to integrate this MMA freezes:
II = (2 fx R Cos[ϕ] Sin[θ])/(R^2 + ρz^2 - 2 R ρz Cos[θ])^(3/2)
...
11
votes
4
answers
759
views
Scan through (partial) tuples
I have a list of list of positive integers $s = \{s_1, s_2, ..., s_k\}$, each list $s_i$ is possibly of different lengths, and I want to find out if there exists a $k$-tuple of the $s_i$ that sums ...
10
votes
2
answers
604
views
Breaking "Functional Loops" and Doing Lazy Evaluation In Mathematica
Alright, so this is a question about the functional way to break a for/while loop. Since we're on the Mathematica SE, I'm interested in the ways a Mathematica vet would handle this, however the ...
6
votes
0
answers
190
views
Status of Streaming package
I see the Streaming package mentioned in this question
How to use Streaming package in v11.1?
with advice on getting it working in V11.1.
I've failed to get either the built-in version or the patch ...
13
votes
0
answers
342
views
Linear programming with lazy constraints
Does Mathematica offer any means for solving linear programming problems with "lazy constraints", as described e.g. here?
While I am not very familiar with linear programming, my understanding of the ...
2
votes
1
answer
384
views
Cutting digits of a number without approximation:
I am evaluating an exponential and I end up with the following result:
$1.4497788553129478854329$
Is there a command on Mathematica that allows me to cut my result without approximating it? I would ...
20
votes
1
answer
466
views
How to use Streaming package in v11.1?
I am trying to use the streaming package for lazy list operations demonstrated in this post. But I found that the package was significantly changed in version 11. After some observations, I found that ...
3
votes
0
answers
94
views
Lazy tuples made from arbitrary lists [duplicate]
I am dealing with Tuples of n lists each having potentially different length:
longList = Tuples[list1, list2, ..., listn]:
Since I have to iterate over the ...
2
votes
0
answers
338
views
Does Mathematica has any operators to program like writing lisp macros? [closed]
Lisps use read/eval, quote/syntax-quote, unquote/unquote-splicing and so on to make writing ...