The recursive-datastructures tag has no wiki summary.
0
votes
2answers
29 views
How send recursive data structure to OpenGL shader?
how can I send recursive data structure, like octree, to OpenGL GLSL shader?
I think, I can send it as array of nodes and use indexes instead of pointers, is it a good idea? Are there other options to ...
1
vote
3answers
39 views
powershell move files to remote location up a level if a file doesn't exist
I would like to recursively search a directory and move the contents of a folder if a file doesn't exist to a remote server and remove a folder level
e.g only copy the contents of folder 2 because ...
0
votes
3answers
67 views
Looping through recursive list in C
I've just started out with C and I think the whole pointers/malloc/free is driving me mad. I tried to define a simple linear recursive data structure and loop through it, printing each element that ...
0
votes
1answer
66 views
Defining variable for recursive data structure in C
I have a function sortbyName that returns a recursive data structure sortedList. sortList itself contains a pointer to another recursive data structure stud_type and they are all defined as below.
...
-2
votes
1answer
49 views
How do I implement a tree shaker operation? [closed]
I need an operation which I call shake_tree. I have implemented it using a recursive algorithm, using only basic ruby-Fortran (referencing the old quote "You can write Fortran code in any language."), ...
0
votes
0answers
73 views
Implementing Symbolic code with Numerical software such as Matlab?
This code is a multilinear implementation provided by my instructor Antti in a team project, programmed in Mathematica. My other team members have created a massive amount of code with novel list-list ...
2
votes
2answers
68 views
Jagged dictionary of dynamic depth?
I am trying to extract from a series of strings which represents depth like:
'foo/bar/x'
'foo/bar/baz/x'
'foo/bar/baz/x'
'foo/bar/lol/x'
Where x is a number I don't care about. I've got as far as ...
0
votes
2answers
90 views
Why does this method cause an Infinite Recursive call?
I'm struggling to understand why this class is not functioning. It was part of an assignment for a course on Data Structures(EDIT: The deadline for the assignment has passed, I just want to figure it ...
1
vote
2answers
42 views
php Iterator - how to save all second to last elements
I am at a loss. I've googled, searched on here, read the php manual for hours but I cant come up with a solution.
I got the following array structure:
[x] => Array
(
...
...
0
votes
1answer
45 views
Possible Bug in Migration for EF 6 Alpha 3 on recursive relationship?
I had to define a recursive relationship on a composite key. After much trials, I ended up with this:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
...
4
votes
2answers
185 views
How do I generate recursive data structures on variadic templates?
I am trying to grasp the technique of recursive data-structure generation using TMP with this question.
Question
Suppose I have a variadic template template<typename... Ts> struct my_sets { ...
0
votes
0answers
64 views
peg solitaire solitaire solver by iteration
I have understaken the following as an exercise in object oriented programming as I'm new to it:
Solve peg solitaire in java.
The idea is to use tree structure in which each node corresponds to a ...
1
vote
1answer
47 views
Does this code create multiple instances of the function?
I am learning how to build a parent/child category list. I found a great tutorial and have implemented the following code:
while($row = $tree_sth->fetch()){
$rows[$row['id']] = ...
7
votes
3answers
154 views
Is there an elegant way to have functions return functions of the same type (in a tuple)
I'm using haskell to implement a pattern involving functions that return a value, and themselves (or a function of the same type). Right now I've implemented this like so:
newtype R a = R (a , a ...
2
votes
4answers
147 views
Parse recursive data with parsec
import Data.Attoparsec.Text.Lazy
import Data.Text.Lazy.Internal (Text)
import Data.Text.Lazy (pack)
data List a = Nil | Cons a (List a)
list :: Text
list = pack $ unlines
[ "0"
, "1"
, "2"
, ...