473,395 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

A problem with a graph

Dax
Hi,
I'm using boost library, I want to create a graph of a library in c++,
and, for example, every leave is a book, inside it there are some
variables, like title, if is available, description, number of archive etc
etc.
I can do it?

Thanks

Daniele

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 22 '05 #1
7 1666
Dax wrote:
I'm using boost library, I want to create a graph of a library in c++,
and, for example, every leave is a book, inside it there are some
variables, like title, if is available, description, number of archive
etc etc.
I can do it?


Why are you asking us? I think it's a question for you yourself to
answer. Can you do it?

As a side note: in case you meant to ask whether it was possible to
do at all, then the answer is "yes, it's possible".

V
Jul 22 '05 #2
Dax
Why are you asking us? I think it's a question for you yourself to
answer. Can you do it?
As a side note: in case you meant to ask whether it was possible to
do at all, then the answer is "yes, it's possible".


This is the answer
Daniele
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 22 '05 #3
On Tue, 06 Jul 2004 18:09:07 +0200, Dax <da*******@iquestoemail.noit>
wrote:
Hi,
I'm using boost library, I want to create a graph of a library in c++,
and, for example, every leave is a book, inside it there are some
variables, like title, if is available, description, number of archive etc
etc.
I can do it?


You've described some nodes, but no paths between them. What you've
described doesn't sound like a graph at all, but I suspect you've left
out the key detail.

What you've described so far sounds like a vector<Book>, and not a
graph.

Tom
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Jul 22 '05 #4
Dax
All nodes are linked.
I need a graph, but that what I need to know is if it's possible to have
informations about these nodes.
Jul 22 '05 #5
On Tue, 06 Jul 2004 18:58:17 +0200, Dax
<da*@magariquestoproprionoemail.it> wrote:
All nodes are linked.
What, every book is linked to every other book directly!? That gets
very memory hungry, very quickly as the number of books increases.
I need a graph, but that what I need to know is if it's possible to have
informations about these nodes.


You can attach arbitrary properties to vertices and edges.

Tom
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Jul 22 '05 #6
Dax wrote:
All nodes are linked.
I need a graph, but that what I need to know is if it's possible to
have informations about these nodes.


I don't understand why you need a graph.
A book is an object with attributes, such as:
title
author
publisher
ISBN
maximum number of pages
Dewey Decimal Number

A library, card catalog, etc. is a container of books.

A view is a list of books, ordered by a given attribute.

I still don't see where the graph comes in. Please enlighten
me. I'm working on a program which has a database of
references, such as books, magazines, newspapers, etc.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #7
Dax wrote:

All nodes are linked.
What does a link represent?
I need a graph,
A graph is quite unusual given the assignement information you
have given up to now. At the moment nobody can see why a graph
would be needed and why a simple std::vector or std::map would
not be sufficient. But this may be because of lack of knowledge
on our side.
but that what I need to know is if it's possible to have
informations about these nodes.


Sure. Why not? If you want to include the name of the dog
of the grandma of the author, so be it. You are the programmer.

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 22 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Herman | last post by:
Hi everyone, I'm implementing Dijkstra's algorithm for a class project, and I'm having trouble compiling the class that runs the algorithm. All of the other files compile fine except for this one....
1
by: SallyBenjamin | last post by:
Hello.. Can anyone help me with this coding. Basically, it needs to have add node, remove node, add edges , remove edges and display the graph But.I have only succedded to add node, add and...
6
by: Marco Chiarandini | last post by:
Dear all, I am experiencing a problem in the deallocation of STL data structures. In paritcular I create a vector of sets and insert integers in each set. I do not define any deallocator since...
0
by: Mike P. | last post by:
Hi all, I'm working on a simulation (can be considered a game) in Python where I want to be able to dump the simulation state to a file and be able to load it up later. I have used the standard...
1
by: entropy123 | last post by:
Hey all, In an effort to solve a sticky - for me - problem I've picked up Sedgewick's 'Algorithm's in C'. I've tried working through the first few problems but am a little stumped when he refers...
4
by: John Henry | last post by:
I am looking for a ready made simple graph package. I found an extensive one in the piana package but when I try to use just the graph portion, it fails to load because of the line: class...
2
by: sriniwas | last post by:
Hi Frnd's, m using prefuse visulation,it's have one display class and this class have one saveImage(outPutStream, String jpg,double size);. now graph is converting ia jpg image properly.now my...
4
by: Man4ish | last post by:
namespace ve/////////////////ve.h { struct VertexProperties { std::size_t index; boost::default_color_type color; }; }...
1
by: Man4ish | last post by:
I am creating a graph using boost library, I am making the network using create_Network function() i am adding the vertices to this graph by creating the object g of class Graph. I am trying to...
0
by: eureka2050 | last post by:
Hi all, I am creating a radar chart containing 2 plots using jpgraph. My code is as follows:- include ("./jpgraph/src/jpgraph.php"); include ("./jpgraph/src/jpgraph_radar.php"); //...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.