Jump to content

Top-Level Code

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
gammaman

gammaman

    Learning Programmer

  • Members
  • PipPipPip
  • 71 posts
Anyone know of a source to get top-level code for some of the "standard" well known algorithms such as Kruskal,Prim,Dijkstra,Warshall etc..

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
The Boost library has C++ implementations for some of them, and the algorithms are well known. Are you looking for these in a particular language?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
gammaman

gammaman

    Learning Programmer

  • Members
  • PipPipPip
  • 71 posts
No, to my understanding, well at least according to my prof, top-level code is very similar to pseudo-code. It is just statements saying what needs to be done. So no I do not need a language but rather the procedure to the crux of the algorithm.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Many of these algorithms are described on Wikipedia in pseudocode. Have you looked there?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
gammaman

gammaman

    Learning Programmer

  • Members
  • PipPipPip
  • 71 posts
Yes I did but I am looking for something more short and concise. Just something that for example might say

for i = 1 to n
for j = 1 to n

do

while (true)

End

Stuff like this.

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Perhaps I'm confused. If "Top-Level code" is some sort of formal language, I've never heard of it.

Most algorithms are described in pseudo-code, which can then be translated into the desired language. In addition, many of these theorems are going to depend a LOT on how you are actually storing. The encoding of the graph will determine the implementation of the algorithm.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#7
PythonPower

PythonPower

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 230 posts
I'm also confused, having never heard of the term. However pseudocode can be to varying degrees of detail. Essentially you seem to be looking for is very general pseudocode.

If you really need such "top-level" code you could try and generalize some pseudocode yourself?

Ironically I should add that the only relevant definition of "Top-Level Code" Google could find was this forum post!