Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3239366
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:57:42+00:00 2026-05-17T17:57:42+00:00

I have a problem where the data is represented in form of a tree

  • 0

I have a problem where the data is represented in form of a tree (Ex: binary tree). The tree has nodes of different kind. So basically, there is a base class and then different nodes are derived from it.

This data also needs to be presented on the screen (to the user) and this involves custom drawing of each nodes. How the node is drawn depends on the type of the node. The tree also involves simplification process using which a new simplified form of the original tree is derived based on some rules.

In order to draw these nodes I need to maintain the position and size. I’d like to know how I can separate this code and data required to draw the tree on the screen from the other data in the node that will be used for simplification.

I hope the question made sense. Thanks for the help and time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:57:42+00:00Added an answer on May 17, 2026 at 5:57 pm

    It’s not so clear what you mean as “maintain the position and size”.

    If you mean that given a node N that belongs to a Tree (T), it has the same parent and same children, you will clarify us if the transformation you apply to the T to get the simplified one (T1) outcomes a different tree or an homomorphic tree.

    I don’t know very well Objective C, but the question you ask us it seems general for every OOP language.

    Given N the node you use in the tree T, you can declare an Inner Class “NData” inside the base class of N. So every node derived class will have the NData data to use in the simplification process.

    I hope I understood the question 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem. Imagine this data model: [Person] table has: PersonId, Name1 [Tag]
I have a problem with a data-bound DataGrid control, in that despite each column
I have a problem with binding data using BindingSource, typed dataset and DataGridView. My
I have problem when I try insert some data to Informix TEXT column via
I have the following problem in my Data Structures and Problem Solving using Java
i have little problem with boost::asio library. My app receive and process data asynchronously,
Problem I have timestamped data, which I need to search based on the timestamp
I have a data object with three fields, A, B and C. The problem
I often run into the problem that I have one stream full of data
The problem is quite basic. I have a JTable showing cached data from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.