Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sparse matrices - vfp8
Message
De
04/10/2011 05:53:14
 
 
À
04/10/2011 03:07:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01525329
Message ID:
01525524
Vues:
48
>Yes, there are a number of possibilties
>You have to find the balance between ease of use and performance
>Personally, I would prefer functions a la SetItem(value, x, y, z, ..) and getItem(@value, x, y, z, ...) to avoid the access and assign methods
>For a couple of dimensions ( say up to 8 or so), SetItem() and GetItem() may be the fastest
>If we start dreaming and go beyond 24 dimensions - we'll need an array - SetItem(value, @dimensions) with the overhead of setting the elements of dimensions before each call

Multiple dimensions were not asked specifically, and if handling needs more than 2 dimensions,
I'd prefer either a xxxValue([setvalue],@Dimensions[,cnAliasIfNotCurrent]) or a totally class based acces
methods with each class having its workingalias and current "Dimensionpointer[s]" as properties.

OTOH when working with sparse matrices it may be best NOT to work in an "loop dimensions step 1"-pattern,
if most of the values are nonexistant and you can jump over the "empty" values using scan or similar
table movement logic, filtering via Rushmore. Pure function coding might lead to such nonoptimized coding.
Class based coding of access routines might generalize any such "optimized"
access pattern, especially if multiple tables are involved.

Too many holes in the specs for my taste to speculate further ;-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform