Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.pascal.misc > Newsgroup comp.lang.pascal.delphi.misc

Reply
 
Thread Tools Display Modes
  #16 (permalink)  
Old 08-31-2003, 05:08 PM
J French
Guest
 
Posts: n/a
Default Re: Cool little project for <name>

On Sun, 31 Aug 2003 14:31:47 GMT, "name" <e@m.a> wrote:

<snip>
>
>Thank you so much!! Method B is perfect -- no one else knew what i was
>talking about =\ So i had to use a Double and then typecasting it to a
>string enables me to truncate it ^_^.
>
>One question -- what does the :10 do?
>


The 10 sets the length of the String

Watch out - Str() is not Locale Aware
- this is a major advantage
- but one needs to be conscious of it


Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #17 (permalink)  
Old 09-01-2003, 08:09 AM
David Reeve
Guest
 
Posts: n/a
Default Re: Cool little project for <name>


"Martin Harvey" <martin@pergolesi_nospam_.demon.co.uk> wrote in message
news:e804lv89ts1hcdhksa8csuvkn0v9vnsvu2@4ax.com...
> On Sun, 31 Aug 2003 08:44:01 GMT, "David Reeve"
> <dree4456@bigpond.net.au> wrote:
>
>
> The actuall connection topology is:
>
> A <-> B <-> C <-> D
>
> Four nodes connected in a line. Now we model this as bunch of masses
> and springs, and we insert springs as follows:
>
> Spring of length 1 between A and B (direct connection).
> Spring of length 1 between B and C (direct connection).
> Spring of length 1 between C and D (direct connection).
>
> Spring of length 2 between A and C (shortest path).
> Spring of length 3 between A and D (shortest path).
>
> Spring of length 2 between B and D (shortest path).
>
> By adding the extra "shortest path" springs, if you simulate this,
> you'll find it stretches out into a straight line. - The direct links
> don't enforce it, but the "hidden" links do.
>
> See what I mean now?
>


OK.... getting there ....I think

- A, B, C, D mapped on an XY plane (could be XYZ space?)
- we know the actual connection topology
- we know the shortest path between any two nodes, P'
- we arrange the nodes randomly on the XY plane which gives a path length,
P, which could be longer or shorter than P', eg A-B-C-D arranged in a
zigzag. This arrangement will be associated with a metric, S, representing
the sum of all the |P-P'| deviations contained by the map.
- we optimise to a minimum value of S which for the above example will be a
A-B-C-D in a straight line

Dave
-


Reply With Quote
  #18 (permalink)  
Old 09-01-2003, 03:44 PM
Andy
Guest
 
Posts: n/a
Default Re: Cool little project for <name>

On Sun, 31 Aug 2003 17:08:09 +0000 (UTC), erewhon@nowhere.com (J French) wrote:

>On Sun, 31 Aug 2003 14:31:47 GMT, "name" <e@m.a> wrote:
>
>>One question -- what does the :10 do?

>
>The 10 sets the length of the String
>
>Watch out - Str() is not Locale Aware
>- this is a major advantage
>- but one needs to be conscious of it


Am I missing something or couldn't you do something like ....

var
n: extended;
begin
n := StrToFloat(5/10)
Label1.Caption := FloatToStrF(n,ffFixed,10,2)+'%'; // ( 2 decimal places of precision)
end;

>


Andy
The Perpetual Novice Programmer
Reply With Quote
  #19 (permalink)  
Old 09-01-2003, 05:39 PM
J French
Guest
 
Posts: n/a
Default Re: Cool little project for <name>

On Mon, 01 Sep 2003 15:44:32 GMT, Andy
<ptrails@NoFlyersThankYou.rogers.com> wrote:

>On Sun, 31 Aug 2003 17:08:09 +0000 (UTC), erewhon@nowhere.com (J French) wrote:
>
>>On Sun, 31 Aug 2003 14:31:47 GMT, "name" <e@m.a> wrote:
>>
>>>One question -- what does the :10 do?

>>
>>The 10 sets the length of the String
>>
>>Watch out - Str() is not Locale Aware
>>- this is a major advantage
>>- but one needs to be conscious of it

>
>Am I missing something or couldn't you do something like ....
>
>var
>n: extended;
>begin
> n := StrToFloat(5/10)

\____ Eh ?
> Label1.Caption := FloatToStrF(n,ffFixed,10,2)+'%'; // ( 2 decimal places of precision)


Float to Str is fine - it is Locale Aware (IIRC)

>end;
>
>>

>
>Andy
>The Perpetual Novice Programmer


Reply With Quote
  #20 (permalink)  
Old 09-01-2003, 06:38 PM
Martin Harvey
Guest
 
Posts: n/a
Default Re: Cool little project for <name>

On Mon, 01 Sep 2003 08:09:08 GMT, "David Reeve"
<dree4456@bigpond.net.au> wrote:

>OK.... getting there ....I think
>
>- A, B, C, D mapped on an XY plane (could be XYZ space?)
>- we know the actual connection topology
>- we know the shortest path between any two nodes, P'
>- we arrange the nodes randomly on the XY plane which gives a path length,
>P, which could be longer or shorter than P', eg A-B-C-D arranged in a
>zigzag. This arrangement will be associated with a metric, S, representing
>the sum of all the |P-P'| deviations contained by the map.
>- we optimise to a minimum value of S which for the above example will be a
>A-B-C-D in a straight line
>
>Dave
>-
>


Yeah, that's basically it.

MH.

Reply With Quote
  #21 (permalink)  
Old 09-02-2003, 04:27 PM
Steven
Guest
 
Posts: n/a
Default Re: Cool little project for <name>

Maarten Wiltink wrote:
> Martin Harvey wrote in message ...
> [...]
>> By adding the extra "shortest path" springs, if you simulate this,
>> you'll find it stretches out into a straight line. - The direct links
>> don't enforce it, but the "hidden" links do.

>
>
> Some day I must recalibrate my perception of springs. I should
> *know* that they can push as well as pull, but I never think
> about that without being reminded.
>


Memory metal suffering from Alzheimer?
:-)

> Groetjes,
> Maarten Wiltink


Ook zoveel,
Steven


Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web/AF Application Project Khan Newsgroup comp.soft-sys.sas 0 02-13-2006 08:02 AM
EG Project Name Tom Hide Newsgroup comp.soft-sys.sas 0 12-15-2005 09:22 AM
Re: Practical Project David L Cassell Newsgroup comp.soft-sys.sas 0 09-26-2005 04:53 AM
Re: Hardware for SAS in big project Mark Dixon Newsgroup comp.soft-sys.sas 1 12-09-2004 11:42 AM
Re: Hardware for SAS in big project Sigurd Hermansen Newsgroup comp.soft-sys.sas 0 12-08-2004 06:24 PM



All times are GMT. The time now is 09:55 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.