Questions tagged [tree-structure]

110 questions
0
votes
1 answer

Building hierarchy tree using JSON

I have a list of objects with a C_PARENT field.This parent field references another object in the list. I would like to create a tree hierarchy from this list based on this field. Here is my data. [{ "C_ID" : 1.0, "C_TITLE" : "Sparklers", …
ANISUNDAR
  • 787
  • 5
  • 12
  • 28
0
votes
1 answer

Showing the tree structure of a graph in which BFS traversal has been performed in java

I was studying about the Breadth First Search or BFS algorithm and I came across an idea . I display the tree structure of the graph in which I have implemented BFS. Now maybe I can just show the tree structure in a different way using linked lists,…
0
votes
2 answers

How can i save a tree structure in a hashmap?

Here's the question: a Two-dimensional array relation[n][2] represent the relation between the nodes, for exemple relation[0] equals {2,4}, so there is an adjancency relation between node 2 and node 4, and contains no cyclic relation. I wanna…
Kimi
  • 3
  • 1
  • 2
0
votes
1 answer

Python tree structure

I am trying to create a tree structure for a repository holding multiple folders using python. I know that it is traditionally done through Linux or Unix. My question is, are there any modules I can use to achieve this easily. Or a function already…
Victor Aguilar
  • 139
  • 1
  • 1
  • 6
0
votes
1 answer

Object identification in javascript

I am making a collision detector in JavaScript. I want to make a tree structure so that I can make a complex object. There is one big array and all the objects including children are part of the array. Some of them are child and others are parents.…
martian17
  • 418
  • 3
  • 14
0
votes
1 answer

How to traverse a tree structure in order to draw a graph?

I'm working with JGraphT library to draw a graph for my tree structure but the library draws a graph based on a given set of nodes and connected edges.I have read the Class "DirectedAcyclicGraph.VisitedArrayListImpl" in the library javadoc but I did…
Dee
  • 1
  • 1
0
votes
2 answers

Recursive query final result CTE

I have written a CTE query and this is the result I am getting Item Parent Level Group -------------------------------------- CRSM/002 NULL 0 CRSM/002 7160/002 CRSM/002 1 CRSM/002 7823/085 CRSM/002 1 …
Pawan Nogariya
  • 8,330
  • 12
  • 52
  • 105
0
votes
2 answers

How to create Antlr tree Parser Diagram through CMD Line

How to create Antlr tree Parser Diagram through CMD Line? Currently i have some grammar content which am trying to parse as Tree in Antlr. Currently am executing this grammar file thriugh CMD line C:\Users\mohan\ANTLR>java -jar…
Mohan Raj
  • 447
  • 1
  • 5
  • 18
0
votes
1 answer

|JAVA| Draw a Tree, JPanel repaint() does not work

I want to draw a tree but the repaint function does not call the paintComponent function. I save every node in an array. My main class: public class Main { public static void main(String[] args) { GUI g = new GUI(); …
user6544955
0
votes
1 answer

XML schema and multiple use of name for elements

I've perused this forum and various blogs and tutorial sites trying to get a better understanding of what is good vs. bad schema structures in XML. I recently inherited an kml file where the xml tree structure is like so: (directory) (folder) …
geo_coder
  • 713
  • 3
  • 7
  • 17
0
votes
1 answer

Facing issue while loading Parent Tree structure in JAVA J2ee

Facing issue while loading Parent Tree structure in JAVA J2ee . It becomes very slow while loading . Can we use any plugin for that because data is huge .
0
votes
2 answers

root in tree like structure with auto-referencing foreign keys

My application uses some kind of "virtual folders" so I need to store the tree structure in the database. The table holding the data is quite simple, it has 3 columns: id_folder (int, primary key) id_parent (int, references id_folder) folder_name…
manolowar
  • 6,772
  • 5
  • 23
  • 18
0
votes
1 answer

ModelMapper and tree structures

I've got a tree-like structure of entities that I'm trying to map to DTOs using ModelMapper. The trick is that I'm trying to break the graph after the first parent. Following is a example of what I'm trying to do. I've got a Category entity which…
willix
  • 686
  • 1
  • 6
  • 13
0
votes
1 answer

Scout Eclipse tree navigation without table page

I know that in Scout you can do tree hierarchy in Outline, but you get table page in right side with rows corresponding tree hierarchy. Like : My Contacts in large example But what I want is same tree structure on left (Outline) side, without…
Marko Zadravec
  • 8,298
  • 10
  • 55
  • 97
0
votes
0 answers

Good structures for removing vertices from black-white trees

I want to program a tree (in a mathematical view) in Python 2.7 where each vertex is white or black. Then I want to be able to remove leafs to create a new tree. Note that the root can be a leaf if it only has one connection and therefore it can be…