How I should make it to use memory efficient?

Hello All
I have the following problem:
Thse structure is like this:
Array1(cluster1)
Clusetr1: numeric1, Array2, Array3
Array2(cluster2)
cluster2:numeric2, array3(two vectors)
Array3(cluster3)
cluster3two vectors)
As you can see it is a meassy stuff, and also the memory utilisation and efficiency is very poor. It is enough that I add some of the elements in one of the vector in array3 and all the structure must be copied to another place in memory.
I was thinking of having something like:
Array1(references to Cluster1)
CLuster1: numeric1, Array2(references to cluster2), Array3(references to cluster3)
Than
addying a new elementwill cause only addying another reference in the given array.
I am not sure if I make it clear, but if not, where I can read about the tips of managing the complicated structures including the arrays of clusters of arrays, etc.
Thanks in advance
Pawel

> "... move to something
> where you use an array of integers to "point" to elements stored in
> another array. "
>
Sorry I didn't go into more detail, but I wasn't sure this would help.
The technique I mentioned has to do with building parallel arrays to
hold different elements of a struct, or building a parallel array that
gives you quicker searches of a complex datatype. For example, if you
have an array of personel info with names, ages, social security
numbers, etc. You sometimes want to find someone by name, sometimes by
social, and perhaps the array is originally given to you in age sorted
order.
This would mean that everytime you try to find someone by name, you
can't use a binary search or even stop when you pass the name and know
they aren't in the array. You have to look at every element. The
technique would be to build two parallel lookup arrays. The string
sorted array would simply be an array of the integers 0 through N-1,
ordered so that the first element contains the index of the first
element by string. The second element contains the index of the second,
and so on. So now you have essentially pointers from the index array to
the storage array. You build another to keep order by social, and as
many others as you like. These of course have to be updated when a new
record is added, so there is a cost, but for database types of access to
a largly static data set, this can help a lot on efficiency.
The other point where this helps is when there is lots of redundancy in
the info stored in the main array. As an example, lets say you are
storing cartesian points to describe 3D shapes. One way would simply be
to have arrays of faces, each face having an array of 3D vertices. This
works, but you aren't taking advantage of the fact that each vertex is
typically shared by three or more faces. In our structure it is
duplicated again and again, and actually makes it difficult to reshape a
3D shape.
A better structure, using the index technique is to build an array of
faces, each face has an array of vertex indices. The shape also has an
array of vertices, in no particular order, but the face vertices can now
"point" to any vertex and the faces now share it.
To test it, put a cube in the structures. The cube has six faces and
only eight points. In the first structure, there are six face arrays,
each with four 3D points for a total of 24 3D coords. The second has
six faces, each with four integer indices and the shape has a second
array of eight coordinates. It doesn't duplicate information making it
easier to update, it uses less storage, and it is quicker to access for
many operations.
> As I see it, that would not solve my problems with the memory
> alocation in case of change the array size. The system will still need
> to enlarge every and single element of the array I am changing for
> every element in the top level array, I guess.
>
When an array grows, that array may need to be moved in memory, since
arrays are stored in contiguous memory. If it is an array of one
million I8s, and you add one more byte, the 1M elements may need to move
so that the additional element can be stored with them. By contrast, an
array of 1,000 arrays of I8s, stores the same info. When adding a new
element, to one of the 1000 element arrays, the other 999,000 elements
do not need to move. Adding a new array to the 1000 already there means
that the array of 1000 array references may move, but none of the I8
elements will be moved.
If you want more help, please describe more about what is in the array,
to see if there is redundant storage that the first technique may help
with, and describe how you will access it. Will you do more inserts,
more deletes, or more accesses? These are the things that affect the
efficiency of various data structures.
Greg McKaskle

Similar Messages

  • How do you make PP CS5 use more allocated physical memory???

    As you know, you can go to Preferences > Memory and change the amount of RAM reserved for other applications.
    Now, I have 8 GB of RAM installed (Windows 7), and I have set my “RAM reserved for other applications” option to 1.5 GB. That leaves 6.5 GB of memory for Adobe AE, Pr, Encore and Media Encoder.
    Here’s the problem: every time when I’m rendering or exporting in Premiere, I can see through Task Manager that Premiere uses only 1.5 or 2.0 GB of the physical memory, not the 6.5 GB that I’ve allocated. I know the rest is reserved for other applications, but none of them are running at the moment. So, how can I make PP CS5 use more of all the physical memory that’s left?

    Memory management in CS5 is clever enough to use an amount of memory that minimizes the use of the page file and maximizes buffers, However that depends on the material in the project, the effects and transitions used, the export format and the hardware in use.
    There is no sense in using large amounts of memory, when other components cause waiting before the contents of memory can be offloaded. Just as it makes no sense to use a Ferrari in traffic jams.

  • How do I make a purchase using my Itunes account?

    How do I make a purchase using my Itunes account?
    Help any body.

    What happens when you click on the price button, what prompts/messages appear ? If you have a balance on your account then that will automatically be used for the purchase, you can't specify how items are charged.
    If when clicking on the price button you are being prompted to review and log into the account then unless the instructions on this page are followed when creating an account : Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method  - Apple Suppor…
    then credit card details will need to be entered before the account can be used to download any item from the store.
    If that is what is happening then you could see if this post by mountaingoatgirl lets you review your account without needing to enter credit card details : https://discussions.apple.com/message/24303054#24303054
    If not then try entering your card's details, it shouldn't be charged (apart from a temporary store holding charge which your card issuer should remove within a few days or so), and you should be able to remove the card after entering it.

  • My free apps purchased using my cousin's apple id won't open anymore on my iphone but apps donwloaded using my own apple id still works. Why is it like that and how can I make apps purchased using my cousin's apple id work on my iphone? Help!

    My free apps purchased using my cousin's apple id won't open anymore on my iphone but apps donwloaded using my own apple id still works. Why is it like that and how can I make apps purchased using my cousin's apple id work on my iphone? Help!

    Welcome to the Apple Community.
    Delete the apps purchased by your cousin and purchase your own.

  • How can I make Time Machine use the ethernet cable to Time Capsule instead of the wireless connection? Wireless is too slow; has been taking 40 hours to create an initial 142 GB backup.

    How can I make Time Machine use the ethernet cable to Time Capsule instead of the wireless connection? Wireless is too slow; has been taking 40 hours to create an initial 142 GB backup.

    Plug in ethernet .. in the computer.. turn off wireless.

  • How do I make a video using my pictures and iTunes ?

    How do I make a music video with my pictures and iTunes ? Do I need a special App or Program ?

    What happens when you click on the price button, what prompts/messages appear ? If you have a balance on your account then that will automatically be used for the purchase, you can't specify how items are charged.
    If when clicking on the price button you are being prompted to review and log into the account then unless the instructions on this page are followed when creating an account : Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method  - Apple Suppor…
    then credit card details will need to be entered before the account can be used to download any item from the store.
    If that is what is happening then you could see if this post by mountaingoatgirl lets you review your account without needing to enter credit card details : https://discussions.apple.com/message/24303054#24303054
    If not then try entering your card's details, it shouldn't be charged (apart from a temporary store holding charge which your card issuer should remove within a few days or so), and you should be able to remove the card after entering it.

  • How to check actual allocated and used memory for java process in solaris?

    Hi,
    I'm testing performance for java application on solaris 10. And I would like to know how to measure actual memory allocated and used for java process.
    I'm setting -Xms512m -Xmx512m for my java process and I use prstat command to monitor it's memory. But I found that when I run prstat to check, in SIZE column is more than I setting (found 644).
    So I'm don't know the actual memory that java process used. (In this case,is it mean the process use memory (644) more than setting (512)?)
    Thank you.

    With Xms/Xmx you specify the Java heap size. On top of that comes the permanent generation (default max size 64m) and the C part of the process (the JVM itself with all its libraries and data).
    With "ps -e -o pid,vsz,rss,args" you get the virtual and set resident size of your processes.
    Nick.

  • HOW DO I MAKE IMAGES DYNAMIC USING DREAMWEAVER & MySql

    Hi there,
       I wanted to make images dynamic in that the images would be stored in my database and then use dreamweaver to pull the images from the database using a recordset. But how do I get to store the images in MySql now that dreamweaver doesn't support BLOB and also how do I make dreamweaver pull the images from that database? PLZ somebody help

    To pull the image from Database on to your page
    1. Open your php page
    2. put your cursor where you want the image to show on the page
    3. insert>image>Select File Name From: Data Sources>select record from recordset> click ok
    4. View in browser
    In Mysyl the image was stored as a "longblob" type with "binary" attributes
    but my system is Dreamweaver CS3.
    Hope this helps. Let me know.

  • How do I make a call using Skype ver 6.22.60.107?

    I've used Skype for years, but this update that I just got a few minutes ago has me stumped. How do I make phone calls with this thing? The option to make calls is greyed out. I can call my contacts, but I don't see a way to dial numbers.
    Note: I'm using the latest version of Skype for Windows on my Windows 7 Pro desktop computer.
    Edit: I figured it out. I couldn't see the cursor, because the text box is the same color as the banner around it.

    I've used Skype for years, but this update that I just got a few minutes ago has me stumped. How do I make phone calls with this thing? The option to make calls is greyed out. I can call my contacts, but I don't see a way to dial numbers.
    Note: I'm using the latest version of Skype for Windows on my Windows 7 Pro desktop computer.
    Edit: I figured it out. I couldn't see the cursor, because the text box is the same color as the banner around it.

  • How can I make a graph using Xcode?

    Hi,
    I'd like to make a graph using Xcode 3.2.5 on an iMac 2009 with Mac OS X 10.6.7. I'm reading temperatures through the serial port (using an USB-serial cable) and I want to show how the temperature increases or decreases along the time. Can anyone help me?
    Thanks.

    history of this question is found here!
    Message Edited by GerdW on 11-26-2007 04:09 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can i make two ipods use the same apple id

    How can I make two ipod touchs have the same apple id

    If you haven't already set up your two iPods either make and apple I'd on one and on the setup on the other type on your apple ID by setup I mean when you first get it it asked you questions so when your done answering the questions your iPod is ready to be used

  • How do I make embedded OC4J use IBM Db2 schema mapping

    I am using JDeveloper 903 with a datasource which happens to be of type IBM DB2. Whenever, I try to deploy and test an entity bean from withinn JDeveloper, the embedded OC4J seems to be using a different database schema mapping scheme than what is required by IBM DB2. As a result of this OC4J tries to autocreate tables with wrong syntax and obviously fails. Can somebody tell me how do I get things setup correctly.
    TIA
    Vimal

    Magnus,
    The optimizations related to efficiently supporting overflow-style caching are not included in Coherence 3.5. I created COH-2338 and COH-2339 to track the progress of the related issues.
    There are four different implementations of the PartitionAwareBackingMap for Coherence 3.5:
    * PartitionSplittingBackingMap is the simplest implementation that simply partitions data across a number of backing maps; it is not observable.
    * ObservableSplittingBackingMap is the observable implementation; it extends WrapperObservableMap and delegates to (wraps) a PartitionSplittingBackingMap.
    * ObservableSplittingBackingCache is an extension to the ObservableSplittingBackingMap that knows how to manage ConfigurableCacheMap instances as the underlying per-partition backing maps; in other words, it can spread out and coalesce a configured amount of memory (etc.) across all the actual backing maps.
    * ReadWriteSplittingBackingMap is an extension of the ReadWriteBackingMap that is partition-aware.
    The DefaultConfigurableCacheFactory currently only uses the ObservableSplittingBackingCache and the ReadWriteSplittingBackingMap; COH-2338 relates to the request for improvement to add support for the other two implementations as well. Additionally, optimizations to load balancing (where overflow caching tends to get bogged down by many small I/O operations) will be important; those are tracked by COH-2339.
    Peace,
    Cameron Purdy
    Oracle Coherence

  • On one site... FireFox always asks what application to use to open a pDF even with "Do this automatically..." select. How do I make it always use Adobe Reader for PDF files?

    When I click on a PDF file it always presents the "You have chosen to open ..." dialog box. Even though it knows it is a PDF file and should use the Adobe Reader. I've checked the Tools / Options ... Application section which is set correctly as well. I've tried setting it to other aps too. yet it always asks. How do I get around this?

    Hi meunchdl,
    You might want to take a look at the Knowledge Base article [[Preferences are not saved]]. There is some good information in there that might help you with your issue.

  • How do i make selections without using the mouse?

    for example, when I go to quit Photoshop, there is a box that comes up that asks whether I want to save changes to a file before I quit. Below are three buttons; "Don't Save", "Cancel", and "Save". The "Save" button is a dark blue, and if I simply hit the return key, I've made my selection as "Save". I know that if I hit the "Command" key and the period at the same time, I've made my selection as "Cancel".
    What I can't figure out is how to make the selection for "Don't Save" only using the keyboard?
    Thanks!

    command d clicks the "Don't save" button from the keyboard without having to select it first in almost any application.

  • How do I make a payment using the same credit card

    I had ran out of money on my prepaid credit card. I reloaded the credit card with the $10 needed to pay for a month. Now I am having trouble figuring out how to use the same credit card to make a payment for November. Can you please tell me how I can do this.

    I purchased a template from template monster
    We are not found of template monster's products in these parts!  They are generally poorly coded.
    When you say "template" do you mean a generic *.html file, or do you mean a *.dwt DREAMWEAVER-specific template? The answer to your question will depend on the answer to this question.

Maybe you are looking for