473,395 Members | 1,677 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.

Graph Search Algorithm (Visual Web Developer Express)

12
Hi,

I wonder if someone could help me. I'm trying to develop a search algorithm as I need an engine that can determine the shortest route between two locations based on the number of stops.

I have found an article called An Extensive Examination of Data Structures Using C# 2.0 (http://msdn2.microsoft.com/en-us/library/ms379574(VS.80).aspx) which is a very good article and it supplied four classes which I can in theory use:
Node;
NodeList;
GraphNode; and
Graph
Unfortunately the code doesn't work (in Visual Web Developer Express). I keep getting the following errors:
1 NodeList<T>' does not implement interface member 'System.Collections.Generic.ICollection<Node<T>>.A dd(Node<T>)'
2 'NodeList<T>' does not implement interface member 'System.Collections.Generic.ICollection<Node<T>>.C lear()'
3 'NodeList<T>' does not implement interface member 'System.Collections.Generic.ICollection<Node<T>>.C ontains(Node<T>)'
4 'NodeList<T>' does not implement interface member 'System.Collections.Generic.ICollection<Node<T>>.C opyTo(Node<T>[], int)'
5 'NodeList<T>' does not implement interface member 'System.Collections.Generic.ICollection<Node<T>>.R emove(Node<T>)'
6 'NodeList<T>' does not implement interface member 'System.Collections.Generic.ICollection<Node<T>>.C ount'
7 'NodeList<T>' does not implement interface member 'System.Collections.Generic.ICollection<Node<T>>.I sReadOnly'
8 'NodeList<T>' does not implement interface member 'System.Collections.Generic.IEnumerable<Node<T>>.G etEnumerator()'
9 'NodeList<T>' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'

Can anyone advise what these are and how I can fix these? I also get the same erros when I run it in Visual Studio Express.

Alternatively are there any prebuilt search algorithms that I can use in Visual Web Developer express.

Thank you for taking the time to read this. Regards, Ian
May 17 '07 #1
1 2067
gihope
12
I have incidentally figured out why the code isn't working. The data structures used in this article no longer exist in the class libraries quoted "System.Collections.Generic" such as Collection. I therefore altered the code to use ICollection which does exist in the "System.Collections.Generic" namespace.

The problem with this is that ICollection is an interface and not a class that I can directly inherit from using the articles code. This could be wrong, but from what I have deduced I would need to have also implemented the methods of this interface also in order to inherit fro it??

If anyone else comes accross this problem, I suggest using the "System.Collections.ObjectModel" namespace as it has a collection base class from which you can inherit the NodeList class.

It would have saved me considerable time if the article had reflected the current state of developments, but then I guess I wouldn't have understood it better!

Thank you to anyone who may have spent time trying to work out what the isue was. Kind Regards, Ian
May 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul Moore | last post by:
I'm trying to check a graph (represented in the usual Python adjacency list format) for loops. This is dead simple - you use a depth-first search, and look out for "back edges" (edges from a vertex...
25
by: Magnus Lie Hetland | last post by:
Is there any interest in a (hypothetical) standard graph API (with 'graph' meaning a network, consisting of nodes and edges)? Yes, we have the standard ways of implementing graphs through (e.g.)...
4
by: sasha.mal | last post by:
Hello everybody! Could anyone help with a practical graph isomorphism algorithm, coded in C++ (C would also do), to work with genus bounded graphs of a bounded degree. Currently, any...
3
by: clintonG | last post by:
Visual C# 2005 Express Edition is a simple, lightweight, integrated development environment designed for beginning programmers and non-professional developers interested in building Windows Forms,...
3
by: Amol | last post by:
I am working on an interesting graph optimization problem and I would like to have a few expert opinions for helping me with a solution. So here goes ... I have a black box with a complex...
4
by: Shuch | last post by:
Hi all, I am in shortage of time...and i want to know if someone has a code written in c++ or c for finding the shortest path using stack or queue??????my specifications r as follow: Input...
5
by: cj | last post by:
I'm getting started writing WEB program in VB2005. I'm been doing windows apps to date. A friend told me to get Visual Web Developer Express Edition. But I have Visual Studio Pro 2005 and it...
10
by: andrea | last post by:
I'm studying some graphs algorithm (minumum spanning tree, breath search first topological sort etc etc...) and to understand better the theory I'm implementing them with python... I made my own...
2
by: Cramer | last post by:
So, what is the relationship between Visual Studio and Visual Web Developer. I find a lot of documentation on MSDN that presents Visual Web Developer as it's own stand-alone product (which I'd...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.