|
|||
|
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 |
|
|
||||
|
||||
|
|
|
|||
|
"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 - |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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 |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |