Questions tagged [hierarchical-trees]

44 questions
2
votes
2 answers

Tree structure category sum that cascades to root node

I'm going to come right out and say that I am not the worlds greatest Mathematician :D So this problem may well be simple to most of you. Unfortunately it's confusing me and have had several stabs at a workable solutions. As with any tree, one can…
Microdot
  • 60
  • 1
  • 9
1
vote
0 answers

AngulrJs Ui-tree Search problem with same title

I need to search on all nodes, but here I have two title with same name (SameTitle) in demolist.js. I want a search operation on whole node. Expected result: (SameTitle) should appear twice with parent name as given in demolist.js. But it appears…
1
vote
0 answers

hierarchical tree models

I am looking for a hierarchical tree model in MySQL that performs best with the following requirements: Multiple root nodes (and I mean a hell of a lot) Limited depth (4 levels max) Siblings sorted within structure Quick to use (SELECT) Doesn't…
Das123
  • 855
  • 3
  • 14
  • 26
1
vote
0 answers

Nodes Overflow D3js

In lightning We are Using D3js library to display an radial tree in a circular tree. Its looks good when we have around 15 nodes. When we try to display morethan 15 records, node are collide with each other. I need to display more than 40 nodes…
1
vote
1 answer

IHierarchicalDataSource, Hierarchy structure, ASP.NET

I am building a hierarchy structure from scratch and I am trying to determine the best route to take. I found the following link below from another StackOverflow question: Nested Set Model I like the idea of nested sets and have begun to build my…
Brian David Berman
  • 7,514
  • 26
  • 77
  • 144
1
vote
2 answers

Whats an optimal data structure for a tree of maps

I'm looking for a data structure, that is basically a tree of maps, where the map at each node contains some new elements, as well as the elements in its parent node's map. By map here I mean a programming map with keys and values, like map in the…
phreeza
  • 155
  • 8
1
vote
1 answer

How to prevent default sorting of children nodes in d3.layout.partition?

d3.layout.partition automatically sorts children nodes in descending order by default. I'm using an icicle plot to show a binary tree where I want to keep the original tree structure without any node reordering. How do I create an array of nodes…
MaYa
  • 180
  • 7
1
vote
3 answers

How do I query for all the nodes between two nodes in a tree?

I have a hierarchical database strucutre, e.g. columns ID and PARENT_ID defined for each row, with the top level rows having a NULL PARENT_ID. I have all the relationships from this table flattened into another table, e.g. if there were three…
1
vote
2 answers

How to get an hierarchical php structure from a db table, in php array, or JSON

Possible Duplicate: Turn database result into array Hi guys, can you please help me. How to get an hierarchical php structure from a db table, in php array, or JSON, but with the following format: [ { "attributes":{ "id":"111" …
daniel
  • 11
  • 1
  • 3
1
vote
1 answer

Build and render infinite hierarchical category tree from self-referential category table

I have a Categories table in which each category has a ParentId that can refer to any other category's CategoryId that I want to display as multi-level HTML list, like so:
  • Parent Category
    • 1st…
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287
1
vote
2 answers

Structuring leafs in a hierarchical tree

This code fills a tree with values based on their depths. But when traversing the tree, I cannot manage to determine the actual number of children without iterating over the parent node. This is necessary because the subleafs are stored in in the…
user206268
  • 908
  • 2
  • 8
  • 23
1
vote
0 answers

Hierarchical Query: Get the direct children count for each node

I am new to hierarchical queries and I have gone through most of the posts on it. I have a query that i would like to improve. My Scenario is something like this: Sample ------- ID, NAME, PARENT_ID Table Data as follows: ID NAME …
Monikka
  • 518
  • 6
  • 12
1
vote
3 answers

Creating hierarchy tree from dictionary of pages' contents

The following key:value pairs are 'page' and 'page contents'. { 'section-a.html':{'contents':'section-b.html section-c.html section-d.html'}, 'section-b.html':{'contents':'section-d.html section-e.html'}, …
gibson
  • 375
  • 2
  • 12
1
vote
2 answers

Create Multi-Dimensional Array With Algorithm Using Data in Single-Dimensional Array

I have an single-dimensional array of PHP objects. Each object has two attributes, one attribute is the object's unique ID and the other is the unique ID of another object in the array that is its parent. For example: array(3) { [0]=> …
joshwbrick
  • 5,882
  • 9
  • 48
  • 72
0
votes
2 answers

best way to make a hierarchical tree

I need to create a hierarchical tree according to a design provided by our designer. I want to use Vue.js to do this. Basically, a user is responsible for a team, and within that team, there are also managers of other teams. In short, it's a basic…
Rekwian
  • 152
  • 1
  • 9