Strings and TSPLIB code?

This is a discussion on Strings and TSPLIB code? within the lisp forums in Programming Languages category; 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,...

Go Back   Application Development Forum > Programming Languages > lisp

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-20-2008, 07:24 AM
Russell Wallace
Guest
 
Default Strings and TSPLIB code?

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,
Reply With Quote
  #2  
Old 08-20-2008, 10:25 AM
Zach Beane
Guest
 
Default Re: Strings and TSPLIB code?

Russell Wallace <russell.wallace.nospam@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
Reply With Quote
  #3  
Old 08-20-2008, 10:34 AM
Russell Wallace
Guest
 
Default Re: Strings and TSPLIB code?

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!
Reply With Quote
  #4  
Old 08-20-2008, 11:55 AM
Volkan YAZICI
Guest
 
Default Re: Strings and TSPLIB code?

On Aug 20, 2:24 pm, Russell Wallace
<russell.wallace.nos...@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
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 12:49 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.