Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sparse matrices - vfp8
Message
De
01/10/2011 05:56:27
 
 
À
01/10/2011 03:59:46
Sorin Lungu
Animal Breeding Department
Roumanie
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:
01525334
Vues:
78
>Hello - Unfortunately vfp software doesn't let me create a square sparse matrix (as is doing - for example Matlab software); because I need to overcome the limit of 65,000 memory variables (even double ...) , I'm looking for a solution - anyone has a idea - it is welcome. Thanks in advance for your help, bye, Sorin


(1) Use Collections - the key would be the string of the index
For mulitdimension you'll need to add other collecttions

This becomes a bit messy

(2) If all elements are the same type, use SafeArray
SafeArrays are allocated by windows

http://msdn.microsoft.com/en-us/library/ms221145(v=VS.85).aspx

- SaveArrayCreate() or SafeArrayCreateEx() for structures
You can specify the number of dimensions and the lower/upperbounds for each dimension

- SafeArrayCreateVector() for one dimensional arrays

- SafeArrayDestroy() when you no longer need it


- SafeArrayPutElement () to assign a value to an element
- SafeArrayGetElement() to get the contents fo an element



(3) a Cursor may be the simplest way
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform