C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2720
Number of posts: 5746

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
A * Algorithm Posted by Jster on 31 Mar 2006 at 12:15 PM
I'm looking to see a simple demonstration of the A Star Algorithm in C#. Can any one direct me to some good information. I did download a project from this site that did the a *, but it was missing a file so I wasn't able to see how it was implemented.

Thanks,
J
Report
Re: A * Algorithm Posted by IDK on 31 Mar 2006 at 2:19 PM
: I'm looking to see a simple demonstration of the A Star Algorithm in C#. Can any one direct me to some good information. I did download a project from this site that did the a *, but it was missing a file so I wasn't able to see how it was implemented.
:
: Thanks,
: J
:
This is the algorithm for it:
1. See what's before, is it equall then procced.
2. Scan for what's after, if found, it's a match.
Report
Re: A * Algorithm Posted by weicco on 2 Apr 2006 at 11:55 PM
: I'm looking to see a simple demonstration of the A Star Algorithm in C#. Can any one direct me to some good information. I did download a project from this site that did the a *, but it was missing a file so I wasn't able to see how it was implemented.
:
: Thanks,
: J
:

I've used regular expression for that. Like this:

string pattern = "foo*.jpg";
string haystack = "foo_bar.jpg";
string regexPattern = pattern.Replace("*", "(.*?)");
Regex regex = new Regex(regexPattern);

if (regex.Matches(haystack))
{
    MessageBox.Show("Match found: " + haystack);
}




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.