tagged [tree]

How to write Visitor Pattern for a Abstract Syntax Tree in C#?

How to write Visitor Pattern for a Abstract Syntax Tree in C#? I have to write a visitor pattern to navigate the AST. Can anyone tell me more how would I start writing it? As far as I understand, each...

How to implement decision tree with c# (visual studio 2008) - Help

How to implement decision tree with c# (visual studio 2008) - Help I have a decision tree that i need to turn to a code in C# The simple way of doing it is using if-else statements but in this solutio...

16 Sep at 03:46

Google Chrome display JSON AJAX response as tree and not as a plain text

Google Chrome display JSON AJAX response as tree and not as a plain text I cannot find an answer to this one: My AJAX calls return JSON data. In Google Chrome Developer Tools > Resources > XHR when I ...

26 May at 15:17

Find kth smallest element in a binary search tree in Optimum way

Find kth smallest element in a binary search tree in Optimum way I need to find the kth smallest element in the binary search tree without using any static/global variable. How to achieve it efficient...

What does Lambda Expression Compile() method do?

What does Lambda Expression Compile() method do? I am trying to understand AST in C#. I wonder, what exactly `Compile()` method from this example does. ``` // Some code skipped Expression> data = Ex...

How to search JSON tree with jQuery

How to search JSON tree with jQuery I have a question about searching the JSON for the specific information. For example, I have this JSON file: ``` { "people": { "person": [ { "na...

13 Mar at 10:38

Cycles in family tree software

Cycles in family tree software I am the developer of some family tree software (written in C++ and Qt). I had no problems until one of my customers mailed me a bug report. The problem is that the cust...

13 Aug at 23:13

How to determine if binary tree is balanced?

How to determine if binary tree is balanced? It's been a while from those school years. Got a job as IT specialist at a hospital. Trying to move to do some actual programming now. I'm working on binar...

Recursion with yield return elements order in tree

Recursion with yield return elements order in tree I have a recursive function that returns all subtree nodes, given the starting root node. For the following tree structure: ``` A | +--B | +--C | | |...

Genealogy Tree Control

Genealogy Tree Control I've been tasked (by my wife) with creating a program to allow her to track the family trees on both sides of our family. Does anyone know of a cost-effective (free) control to ...

20 Jan at 13:59

What collection to store a tree structure?

What collection to store a tree structure? I want to store an organisation chart in a collection. I think a tree data structure will be best suited to my needs, as I need to add multiple nodes to one ...

8 Aug at 15:45

SVN how to resolve new tree conflicts when file is added on two branches

SVN how to resolve new tree conflicts when file is added on two branches When merging a couple of branches (using SVN 1.6.1) where a file has been added on both branches (and then worked on in those s...

20 Apr at 10:49

Finding height in Binary Search Tree

Finding height in Binary Search Tree I was wondering if anybody could help me rework this method to find the height of a binary search tree. So far, my code looks like this. However, the answer I'm ge...

Is there a C# utility for matching patterns in (syntactic parse) trees?

Is there a C# utility for matching patterns in (syntactic parse) trees? I'm working on a Natural Language Processing (NLP) project in which I use a syntactic parser to create a syntactic parse tree ou...

3 Feb at 17:28

How to convert Directed Acyclic Graph (DAG) to Tree

How to convert Directed Acyclic Graph (DAG) to Tree I have been looking for C# examples to transform a DAG into a Tree. Does anyone have an examples or pointers in the right direction? I have a graph ...

Library to generate a decision tree

Library to generate a decision tree Is there a C# Library to generate a decision tree from a datatable and then use it to predict missing data? I did some researches but did not find any C# library th...

28 Jun at 04:23

Developing Abstract Syntax Tree

Developing Abstract Syntax Tree I've scoured the internet looking for some newbie information on developing a C# Abstract Syntax Trees but I can only find information for people already 'in-the-know'....

21 May at 00:10

Build a simple, high performance Tree Data Structure in c#

Build a simple, high performance Tree Data Structure in c# I need to create a product catalog, in tree type. every tree node presents by a ID(string), the functions on the tree data only 2: 1. getChil...

25 Mar at 12:53

C# Binary Trees and Dictionaries

C# Binary Trees and Dictionaries I'm struggling with the concept of when to use binary search trees and when to use dictionaries. In my application I did a little experiment which used the C5 library ...

28 Jan at 01:52

Build tree type list by recursively checking parent-child relationship C#

Build tree type list by recursively checking parent-child relationship C# I have One class that has a list of itself so it can be represented in a tree structure. I am pulling a flat list of these cla...

7 Apr at 20:57

Malformed String ValueError ast.literal_eval() with String representation of Tuple

Malformed String ValueError ast.literal_eval() with String representation of Tuple I'm trying to read in a string representation of a Tuple from a file, and add the tuple to a list. Here's the relevan...

Using python's eval() vs. ast.literal_eval()

Using python's eval() vs. ast.literal_eval() I have a situation with some code where `eval()` came up as a possible solution. Now I have never had to use `eval()` before but, I have come across plenty...

30 Sep at 19:13

Visualizing decision tree in scikit-learn

Visualizing decision tree in scikit-learn I am trying to design a simple Decision Tree using scikit-learn in Python (I am using Anaconda's Ipython Notebook with Python 2.7.3 on Windows OS) and visuali...

How to match SURF interest points to a database of images

How to match SURF interest points to a database of images I am using the SURF algorithm in C# (OpenSurf) to get a list of interest points from an image. Each of these interest points contains a vector...

How can a B-tree node be represented?

How can a B-tree node be represented? We're learning B-trees in class and have been asked to implement them in code. The teacher has left choice of programming language to us and I want to try and do ...

26 Sep at 03:36