bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

let's beef up the tsort info page


From: Dan Jacobson
Subject: let's beef up the tsort info page
Date: 04 Feb 2002 12:06:22 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

|`tsort': Topological sort
|=========================
|
|   `tsort' performs a topological sort on the given FILE, or standard
|input if no input file is given or for a FILE of `-'.  Synopsis:

Topological sort?  sounds kinky.  Wait, I see a sort of
example/explanation below...

|
|     tsort [OPTION] [FILE]
|
|   `tsort' reads its input as pairs of strings, separated by blanks,
|indicating a partial ordering.  The output is a total ordering that
|corresponds to the given partial ordering.

Ok, whatever you say, you're the computer science expert.  Wait,
there's an example below...

|
|   For example
|
|     tsort <<EOF
|     a b c
|     d
|     e f
|     b c d e
|     EOF
|
|will produce the output
|
|     a
|     b
|     c
|     d
|     e
|     f
|

well gee... my mom could have done that with
tr ' ' '\n'|sort -u
so I don't see what all the fancy words are about.

|   `tsort' will detect cycles in the input and writes the first cycle
|encountered to standard error.

got me again.  what is he talking about.  wish i was in the "in crowd"/

|   Note that for a given partial ordering, generally there is no unique
|total ordering.

why, of course.  BTW, what are they talking about?

Conclusion: if you guys were to add a little introduction to what this stuff
is all about, then maybe many more folks could get a handle on it.

OK, we could search google for "Topological sort" but it just doesn't
feel as homey that way.  Besides "I was off line at the time I wanted
to know."

--------
By the way, "`sort': Sort text files"
Well, this should be modified, as I bet sort can be used on "non-text
files" as long as they have newlines [^J] in them.
-- 
http://www.geocities.com/jidanni/ Taiwan(04)25854780



reply via email to

[Prev in Thread] Current Thread [Next in Thread]