Questions tagged [hierarchy]

For issues relating to creating, maintaining, or displaying a hierarchy of data or resources, etc.

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.

2838 questions
19
votes
2 answers

Ruby Exception or Error?

I have noticed that in the Ruby exception hierarchy, there are "errors" such as ArgumentError and there are "exceptions" such as SignalException. Is there a certain practise of naming exceptions? thanks in advance, ell.
Ell
  • 4,238
  • 6
  • 34
  • 60
19
votes
1 answer

Elasticsearch - using the path hierarchy tokenizer to access different level of categories

I'm very new in Elasticsearch and have a question about the hierarchical tokenizer of a path. Here is my code example: My mapping code: PUT /my_index { "settings": { "analysis": { "analyzer": { "path-analyzer": { …
remram
  • 193
  • 1
  • 5
19
votes
1 answer

Consistent approach for renaming namespaces in C++

When using nested namespaces sometimes fully qualified names end up being quite long. I know I can use namespace abc = aaa::bbb::ccc for reducing the amount of typing (it may also improve readability in some cases). I am not sure, however, what is…
betabandido
  • 18,946
  • 11
  • 62
  • 76
18
votes
8 answers

How do you sort a tree stored using the nested set model?

When I refer to nested set model I mean what is described here. I need to build a new system for storing "categories" (I can't think of better word for it) in a user defined hierarchy. Since the nested set model is optimized for reads instead of…
Bernard
18
votes
4 answers

How to find where an abstract method is implemented in Eclipse?

I would like to find where an abstract method is implemented, in which class? Is there a link in Eclipse like call hierarchy/open declaration or something like that that shows where the method implemented is?
ZelelB
  • 1,836
  • 7
  • 45
  • 71
18
votes
3 answers

How to properly bind scope between directive and controller with angularJS

I'm trying to generate an n-level hierarchical unordered list with anugularJS, and have been able to successfully do so. But now, I'm having scope issues between the directive and controller. I need to change a scope property of the parent from…
user2165994
  • 275
  • 2
  • 3
  • 6
18
votes
2 answers

Use d3 log scale instead of linear scale

I'm trying to do a chart based on http://mbostock.github.com/d3/talk/20111116/bar-hierarchy.html, the only difference being that I'd like to use a log scale for the x-axis. Here's my fiddle: http://jsfiddle.net/JhDVC/5/ As you can see, the x-axis is…
luisfarzati
  • 8,649
  • 6
  • 29
  • 27
17
votes
1 answer

Convert delimited string into hierarchical JSON with JQuery

I have an array of strings that describe the parent/child relationship by being delimited with dashes. So, if Bob's boss was Jim and Jim's boss was Fred, Bob's entry in the array would be "Fred-Jim-Bob" and Jim's entry would be "Fred-Jim." I don't…
Munzilla
  • 3,805
  • 5
  • 31
  • 35
17
votes
5 answers

Best practice for naming subclasses

I am often in a situation where I have a concept represented by an interface or class, and then I have a series of subclasses/subinterfaces which extend it. For example: A generic "DoiGraphNode" A "DoiGraphNode" representing a resource A…
Uri
  • 88,451
  • 51
  • 221
  • 321
17
votes
5 answers

Category Hierarchy (PHP/MySQL)

I am trying to get my all categories and sub-categories from MySQL database in a hierarchy: My result should be like that (just example): Cat A Sub-Cat 1 Sub_Sub_Cat 1 Sub_Sub_Cat 2 Sub_Cat 2 Cat B Cat C ... MySQL code: CREATE TABLE…
kuzey beytar
  • 3,076
  • 6
  • 37
  • 46
17
votes
8 answers

MySQL Recursive get all child from parent

i have this case using recursive query on Mysql to find lv 2 and lv3 child on one table... database structure i'm using: id name parent 1 A 0 2 B 0 3 C 0 4 D 1 5 E 1 6 F 2 7 G 2 8 H 3 9 I 3 10 …
Bakti Wijaya
  • 447
  • 1
  • 6
  • 21
17
votes
2 answers

C++ : Multiple inheritance with polymorphism

(pardon the noob question in advance) I have 4 classes: class Person {}; class Student : public Person {}; class Employee : public Person {}; class StudentEmployee : public Student, public Employee {}; Essentially Person is the base class, which…
bguiz
  • 27,371
  • 47
  • 154
  • 243
17
votes
3 answers

MySQL - Recursing a tree structure

I have a database table which link locations together; a location can be in a location, which can be inside another location. location (, ....) location_parent (, ) Here's the MySQL/PHP to go down for a depth of…
Extrakun
  • 19,057
  • 21
  • 82
  • 129
17
votes
3 answers

Can I bind a WPF TreeView to a single root node?

Say I have a binary tree, where the root of the data structure is just a tree node. For each node, the children are accessible through the Children property. Here's what I tried. The TreeRoot is a property of the inherited data context, but it's a…
Sam Harwell
  • 97,721
  • 20
  • 209
  • 280
17
votes
1 answer

Tree drawing orientation

I've made a slightly modified tree using the tree layout. I needed to orient the tree right-to-left instead of the regular left-to-right orientation that's the default. What is the right and proper d3:ish way to do this? I ended up doing this by…
Jyrsa
  • 438
  • 1
  • 3
  • 7