From: Russell Wallace
Subject: Strings and TSPLIB code?
Date: 
Message-ID: <q9Tqk.26777$j7.472636@news.indigo.ie>
Is there any off-the-shelf code available for reading the TSPLIB file 
formats?

Also, any available collection of functions for miscellaneous operations 
like appending and chopping up strings? As far as I can gather from the 
hyperspec, these aren't included out of the box, and while I could of 
course roll my own, I figure it's worth checking before I reinvent the 
wheel.

Thanks,

From: Volkan YAZICI
Subject: Re: Strings and TSPLIB code?
Date: 
Message-ID: <c743b049-d31a-46b8-81a9-3b57c0ea7410@i76g2000hsf.googlegroups.com>
On Aug 20, 2:24 pm, Russell Wallace
<······················@gmail.invalid> wrote:
> Is there any off-the-shelf code available for reading the TSPLIB file
> formats?

IIRC, TSPLIB files are quite easy to parse, just plain text files. I
once had implemented a parser using meta-sexp[1] in a few lines of
code to test some ACO algorithms. But I think you could roll your own
straight forward method to parse file line by line by storing same
state information.


Regards.

[1] http://cliki.net/meta-sexp
From: Zach Beane
Subject: Re: Strings and TSPLIB code?
Date: 
Message-ID: <m3abf73gr4.fsf@unnamed.xach.com>
Russell Wallace <······················@gmail.invalid> writes:

> Also, any available collection of functions for miscellaneous
> operations like appending and chopping up strings? As far as I can
> gather from the hyperspec, these aren't included out of the box, and
> while I could of course roll my own, I figure it's worth checking
> before I reinvent the wheel.

Strings are sequences. Look for sequence appending and chopping
functions, and they'll work fine on strings as well. SUBSEQ,
CONCATENATE, REPLACE, FILL, etc are all quite handy.

Zach
From: Russell Wallace
Subject: Re: Strings and TSPLIB code?
Date: 
Message-ID: <IXVqk.26781$j7.472757@news.indigo.ie>
Zach Beane wrote:
> Strings are sequences. Look for sequence appending and chopping
> functions, and they'll work fine on strings as well. SUBSEQ,
> CONCATENATE, REPLACE, FILL, etc are all quite handy.

Ah, yes, that works. Thanks!