Questions tagged [tree-structure]

110 questions
2
votes
0 answers

What is the EmitMapper equivalent for this AutoMapper configuration?

I have the following class and interface definitions, and would like to use EmitMapper instead of AutoMapper to map from class to interface. The current code works, but I'd like to use EmitMapper, yet have not figured out how to use it. public…
ARA
  • 53
  • 10
2
votes
1 answer

Doctrine 2 - How to design an Entity having subtree type attribute from main tree type Entity

I have a main Entity Segment that has one-to-many categories and category has one-to-many items, so 3 level tree structure class Segment { /** * @ORM\Id */ protected $id; /** * @ORM\OneToMany(targetEntity="Category",…
Matej Polák
  • 301
  • 1
  • 9
1
vote
1 answer

Can any tree be converted to an R-tree?

Is it possible, in theory, to convert any tree into an R-tree? For example, let's say I have a tree of nodes each characterized by an id, value and N features. Does it make sense to convert this to an (N+2) dimensional R-tree? How would that impact…
user2398029
  • 6,699
  • 8
  • 48
  • 80
1
vote
0 answers

What is the best option to read a tree structure in Python?

I want to analyze data from the ArangoDB. These data are available as a tree structure. I want to analyze these data with Pandas now. I used Pandas before, but these datasets were all in a different structure, e.g. name, date, price, ... (all in one…
Test
  • 571
  • 13
  • 32
1
vote
2 answers

How to fetch categories, articles and subcategories and their articles?

I want to output the category names, the subcategory names in each category, and the articles in each category and in each subcategory. The output should be in
    and inner
      tags in HTML. Here is how the output should look like: I have these…
user3740970
  • 389
  • 1
  • 3
  • 16
1
vote
1 answer

String-path to Tree (JavaScript)

I have an array of paths in string format like that: [ { _id: 'women/clothes/tops', count: 10 }, { _id: 'women/clothes/suits', count: 5 }, { _id: 'women/accessories', count: 2 }, { _id: 'men/clothes', count: 1 }, ] I would like to group…
1
vote
0 answers

How to convert tree-stuctrued feature to vector feature

I have a data set with several features, one of those features are categorical but have tree structure on its value. For example, if this categorical features have value a, b, c, d, e, f, g, h, I, j, k. then following image reveal the tree…
Rui
  • 117
  • 2
  • 12
1
vote
1 answer

How to use or replace 'WITH RECURSIVE' in a SQLite trigger to update a tree-structured table

In SQLite, I have a tree-structured table called layer with columns (id, ..., parentId). And a normal table called dir with columns (id, ..., modifiedTime) .The situation is: Once some rows in dir are updated with new modifiedTime, all parents of…
Rick Dou
  • 154
  • 9
1
vote
0 answers

Retrieve parent-child hierarchy from a self-referencing table in mysql

I had a elements hierarchy above structure. In this hierarchy of the elements insert into the my db like below image. In this table elements are having separate elementid and label of the element. Connectors will connect the two elements and…
1
vote
1 answer

Store json-like hierarchical data as nested directory tree?

TLDR I am looking for an existing convention to encode / serialize tree-like data in a directory structure, split into small files instead of one big file. Background There are different scenarios where we want to store tree-like data in a file,…
donquixote
  • 4,877
  • 3
  • 31
  • 54
1
vote
1 answer

Bayesian Hyperparameter Optimization

I've done some experimennts with bayesian hyperparameter optimization for my lstm hyperparameters. I use a approach where you model the error with an gaussian process and with a TPE algorithm. They are working pretty good. I'm wondering where these…
mcAngular2
  • 299
  • 1
  • 14
1
vote
1 answer

How to insert elements to n array tree structure recursively if we know connection between parent and children?

It is given that A is root and its children are B, C, D and also we know that B has a child E. My question is how to insert elements recursively instead of adding element by element if we know connection between them? class Node { public: string…
1
vote
2 answers

How to execute jquery call on data returned with jquery $.post call

I have a page that uses jquery to turn an html table into a file structure using jquery treeTable plug in. The html table is in a div called "treeStructure" I have the ability to add a new folder to any folder in the tree and I use a post call to…
jworrin
  • 825
  • 1
  • 8
  • 20
1
vote
1 answer

How to store millions of children in 100 parents in mongoDB

I am developing a Node.js server that will add children to 100 different parents every 60 seconds. The parents are 100 different markets: and the children are timestamps containing some data in them: ...millions of more…
Mr. Blockchain
  • 313
  • 1
  • 14
1
vote
2 answers

Removing nodes without a particular subnode in a tree structure

I have a tree structure like this one: public class Project { private String id; private String description; private List subProjects; private List documents; } List projects = new…
Kronen
  • 369
  • 9
  • 23