Questions tagged [hierarchical]

For issues relating to arranging data and/or resources in a hierarchy.

A hierarchy is an arrangement of items (objects, names, values, categories, resources, etc.) in which the items are represented as being "above," "below," or "at the same level as" one another. Abstractly, a hierarchy is simply an ordered set or an acyclic directed graph.

A hierarchy can link entities either directly or indirectly, and either vertically or horizontally. The only direct links in a hierarchy, insofar as they are hierarchical, are to one's immediate superior or to one of one's subordinates, although a system that is largely hierarchical can also incorporate alternative hierarchies. Indirect hierarchical links can extend "vertically" upwards or downwards via multiple links in the same direction, following a path. All parts of the hierarchy which are not linked vertically to one another nevertheless can be "horizontally" linked through a path by traveling up the hierarchy to find a common direct or indirect superior, and then down again.

568 questions
3
votes
1 answer

Using nested set model to store Hierarchical data in sqlite how can I move a category into another category

I'm trying to store hierarchical data using SQLite. After searching a lot, I chose to use the nested set model instead of an adjacency list, because almost 90% of the operations will be reads and only 10% will be updates/deletes/creates. I followed…
user4985526
3
votes
1 answer

Implementation of Yii2 Menu widget with nested set behavior

Can anyone help me in the implementation of nested set behavior https://github.com/creocoder/yii2-nested-sets with Yii2 Menu Widget? Basically I want the hierarchical sidebar navigation menu like this…
flash_flip
  • 41
  • 5
3
votes
1 answer

How to represent hierarchical structure in IndexedDB?

I have a complex and variable hierarchical data structure that I will be storing locally from JavaScript. Based on my research thus far it looks like IndexedDB is my best choice for a solution. My structure is composed of similar elements, each of…
3
votes
2 answers

Oracle 11g... CONNECT BY NOCYCLE seems to return cycles

Consider the following directed graph: I'd like to be able to pick two nodes in this graph, and then find all of the possible paths between those two nodes. (Well, not all of the paths, just those paths not containing cycles.) First, I model the…
Paul Hanbury
  • 941
  • 1
  • 10
  • 24
3
votes
1 answer

XStream deserialize xml having list of hierarchical object

I have below xml which i want to deserialize in XStream. 1 Name 1 2 name 2 Desc 2 3 name 3
Hariharan M
  • 43
  • 1
  • 4
3
votes
1 answer

Format of Hierarchical Parent in New Activities for Android studio

I'm adding a second activity to my ANDROID Studio app and it has a field labeled "Hierarchical Parent". I presume that means the activity that's hierarchically the parent of the new activity that I'm adding, such that when the user at the parent…
Roger Garrett
  • 349
  • 1
  • 7
  • 13
3
votes
1 answer

Clustering binary data

I want perform cluster analysis for the following data (sample): ID CODE1 CODE2 CODE3 CODE4 CODE5 CODE6 ------------------------------------------------------------------ 00001 0 1 1 0 …
user2578185
  • 417
  • 1
  • 6
  • 10
3
votes
2 answers

multiple working directories in R

I wrote a list of different functions and script and I put them in some subfolders of the working directory so I can divide all my functions in arguments (descriptive statistic, geostatistic, regression....) When I type…
matteo
  • 4,683
  • 9
  • 41
  • 77
3
votes
3 answers

What is the best way to group and aggregate and sum tree data?

Given a self referencing table Item ------------- Id (pk) ParentId (fk) With a related table of associated values ItemValue ------------- ItemId (fk) Amount And some sample data Item ItemValues Id ParentId …
Bob
  • 97,670
  • 29
  • 122
  • 130
3
votes
3 answers

Mysql sorting Hierarchical data

I have a question and working last week with this and couldnt solve yet.. I can query submenus with join but i cant order it. I have a table like this | id | name | parent | order | …
3
votes
1 answer

pandas dataframe: how to match on multiple index levels when doing arithmetic operations involving two dataframes

I have a DataFrame with three levels on the main index: from pandas import * df_multi = DataFrame(np.random.rand(6,2), index = [['CF', 'CF', 'CF', 'DA', 'DA','DA'], ['x', 'y', 'y', 'x', 'y', 'y'], ['a', 'b', 'a', 'a', 'a', 'b']], columns = ['PC1',…
user2136502
  • 69
  • 1
  • 3
3
votes
1 answer

Reading from file a hierarchical ascii table using Pandas

My very-first post here, I hope it's not too long or detailed. I have an issue when I try to read and interpret the following ascii table (simple extract from a much bigger one). Let's say the file is called "test.txt": A B C …
Nic
  • 3,365
  • 3
  • 20
  • 31
3
votes
1 answer

Oracle SQL: How to get xml from hierarchical table

id parent_id Name Text 0 ........... body_text 1 ..........0 text....... . something 2 ..........0 blank 3 ..........2 text ........ something 4 ........... info 5 ..........4 text ........ something Who knows…
user1743671
  • 33
  • 1
  • 4
3
votes
1 answer

How To Get All children and itself from Hierarchical data with CTE In SQL Server 2005 using stored procedure

I have many similar structure tables like this: CREATE TABLE [dbo].[tbl_Hierarchy]( [ID] [int] NOT NULL, [ParentID] [int] NOT NULL, [Text] [nvarchar](100) NOT NULL, --other field irrelevant to my question ) INSERT INTO dbo.tbl_Hierarchy…
3
votes
1 answer

hierarchical query and counting siblings?

I've looked at several different answers on this site and others, but I'm not having much luck figuring out how to count siblings in a hierarchical query. I'm using Oracle 10g. SELECT LEVEL, last_name||', '||first_name AS Manager,…
Jake_TheCoder
  • 57
  • 1
  • 9