Deep copy - CompWisdom
About us  |  Why use us?  |  Press  |  Contact us

 

Topic: Deep copy


  
 Object copy - Wikipedia, the free encyclopedia
In computing, a deep copy is copy that contains the complete encapsulated data of the original object, allowing it to be used independently of the original object.
Programmers typically implement the copy constructor as a recursive copy of all attributes and of all objects belonging to the object, one-by-one.
In computing, the result of shallow copying one object to another variable is two variables pointing to the same physical object in memory.
http://en.wikipedia.org/wiki/Deep_copy   (431 words)

  
 Deep Copy and Shallow Copy
The terms "deep copy" and "shallow copy" refer to the way objects are copied, for example, during the invocation of a copy constructor or assignment operator.
A memcpy() operation is an example of a shallow copy.
For example, copying an object that has a member of type std::string ensures that the corresponding std::string in the target object is copy-constructed by the copy constructor of class std::string.
http://www.devx.com/tips/Tip/13625   (261 words)

  
 3.18 copy -- Shallow and deep copy operations
The latter is called to implement the deep copy operation; it is passed one argument, the memo dictionary.
A deep copy constructs a new compound object and then, recursively, inserts copies into it of the objects found in the original.
This module provides generic (shallow and deep) copying operations.
http://www.python.org/doc/current/lib/module-copy.html   (326 words)

  
 [No title]
For example, a deep copy of an object X may require deep copying the objects that X references.
For example, a shallow copy of an object X would produce an object X' distinct from X, but with references to exactly the same objects as X. In contrast, a deep copy of X would copy X, the objects referenced by X, the objects referenced by those objects, and so on.
A deep copy of S produces a new object with deep copies of S's contents.
http://www.omg.org/docs/1993/93-02-08.txt   (3253 words)

  
 NSCopying
A deep copy is thus a completely separate object from the original; changes to it don't affect the original, and changes to the original don't affect it.
A deep copy is one in which every instance variable of the receiver is duplicated, not simply referenced in the copy.
Further, for an immutable copy no part at any level may be changed, making a copy a "snapshot" of the original object.
http://www.channelu.com/NeXT/NeXTStep/3.3/nd/Foundation/Protocols/NSCopying.htmld   (341 words)

  
 QDeepCopy Class
Returns a deep copy of the encapsulated data.
lock(); global_string = str; // global_string is a deep copy of str global_mutex.
lock(); QString str = global_string; // str is a deep copy of global_string global_mutex.
http://www.mit.edu/afs/athena/software/qt/www/qdeepcopy.html   (361 words)

  
 Qt 3.2: Shared Classes
A deep copy can be made by calling a copy() function or by using QDeepCopy.
A shallow copy is a reference copy, i.e.
They also have a copy() function that returns a deep copy with a reference count of 1.
http://doc.trolltech.com/3.2/shclass.html   (934 words)

  
 Paul Grenyer - Copy on Write
The normal way to make a copy of such an object would be to create a new instance of the object, allocate enough memory to hold the string and then copy the string from the old object into the newly allocated memory pointed to by the new object.
This process of not performing a deep copy until the ‘data’ needs to be modified is termed Copy On Write.
However, if the string data is particularly long it may be quicker to just copy the value of the pointer from one instance of the string-object to the other and have both instances pointing at the same string data.
http://www.paulgrenyer.co.uk/articles/copy_on_write.htm   (441 words)

  
 Mutability and sharing of various values in various languages
Deep or shallow copying have the same result for immutable values.
deep copies strings, whereas function calls use shallow copy.
With deep copy, the behaviour of mutable numbers is alike immutable numbers, with the advantage (?) of having "
http://merd.sourceforge.net/pixel/language-study/various/mutability-and-sharing   (509 words)

  
 JavaTechniques Faster Deep Copy of Java Objects
A deep copy makes a distinct copy of each of the object's fields, recursing through the entire graph of other objects referenced by the object being copied.
This means that the values of all of the origical object's fields are copied to the fields of the new object.
The solution to this problem is to make a deep copy of the object.
http://javatechniques.com/public/java/docs/basics/faster-deep-copy.html   (2082 words)

  
 Brad Abrams : Should we Obsolete ICloneable (The SLAR on System.ICloneable)
Deep-copy copies the cloned object and all objects referenced by the object, recursively until all objects in the graph are copied.
A non-deep copy (referred to as ‘shallow’ if only the top level references are copied) may do none, or part of a deep copy.
Deep and shallow clones need to be used and considered at much deeper levels.
http://blogs.msdn.com/brada/archive/2004/05/03/125427.aspx   (4437 words)

  
 Java Tip 76: An alternative to the deep copy technique
A deep copy occurs when an object is copied along with the objects to which it refers.
In this case, there must be two copy functions for each object: one for a deep copy and one for a shallow.
If either of these contained objects themselves contain objects, then, in a deep copy, those objects are copied as well, and so on until the entire graph is traversed and copied.
http://www.javaworld.com/javaworld/javatips/jw-javatip76.html   (880 words)

  
 Using C# to Program Generic .NET Interfaces
Deep copy can be provided at either the language level or the library level.
In C++, deep copy is provided at the language level through a copy constructor.
To actually copy the data itself and not merely the references, you will need to perform a deep copy.
http://www.informit.com/articles/article.asp?p=25352&seqNum=3   (819 words)

  
 Copying Collection Classes
A deep copy of an object is a new object with entirely new instance variables; it does not share objects with the old.
A shallow copy of an object is a new object whose instance variables are identical to the old object.
This copying is not done recursively, and the new instance variables are shallow copies of the old instance variables.
http://www.chass.utoronto.ca/chass/rogue/docs/online/toolsug/cop_8081.htm   (492 words)

  
 C++: Shallow vs Deep Copies
If an object has pointers to dynamically allocated memory, and the dynamically allocated memory needs to be copied when the original object is copied, then a deep copy is required.
A shallow copy of an object copies all of the member field values.
A deep copy copies all fields, and makes copies of dynamically allocated memory pointed to by the fields.
http://www.fredosaurus.com/notes-cpp/oop-condestructors/shallowdeepcopy.html   (213 words)

  
 Deep copy and recursion (feb 00)
Upon inspection, I found that the object was being initialized from a shallow copy of a template, and I told the author that he needed to deep copy the template instead.
Similarly, a new hashref is constructed by copying each element, including a deep copy of its value.
You may need a deep copy instead of that shallow copy.
http://www.stonehenge.com/merlyn/UnixReview/col30.html   (1479 words)

  
 [PyKDE] Deep copy
This > apparently requires 'deep copies' of a target object: one initial copy > used as the 'clipboard' object (my cookie-cutter), then all other copies > created by 'deep-copying' the clipboard object.
The > assignment operator '=' only makes so-called 'shallow' copies, which are > simple references to an object.
I need real duplicate objects, which are > independent of each other (modifying one copy should have no affects on > the other copies).
http://mats.gmd.de/pipermail/pykde/2003-July/005676.html   (229 words)

  
 C-Index (Colt 1.2.0 - API Specification)
Constructs and returns a deep copy of the receiver.
http://dsd.lbl.gov/~hoschek/colt/api/index-files/index-3.html   (1503 words)

  
 C++ Notes: Copy Constructors
Here is an example of a copy constructor for the Point class, which doesn't really need one because the default copy constructor's action of copying fields would work fine, but it shows how it works.
A copy constructor is called whenever a new variable is created from an object.
If you need a copy constructor, it's because you need something like a deep copy, or some other management of resources.
http://www.fredosaurus.com/notes-cpp/oop-condestructors/copyconstructors.html   (445 words)

  
 NTL
Optional deep copy is implemented through DeepCopyOptionTemplate macro.
Like any other NTL container, Array is moveable type with pick and optional deep copy transfer semantics.
Requires T to have deep copy constructor or optional deep copy constructor if Array stores only objects of type T. Requires polymorphic deep copy if Array stores also objects of type derived from T. v
http://www.volny.cz/cxl/array.html   (1450 words)

  
 NTL
And all these deep copies are made to preserve value of source that is destroyed just one step later anyway.
This causes new problems in situation when we want to create deep copy of such container - what we need is polymorphic deep copy of elements.
Here we are deep copy assigning container of pick with optional deep copy types to another container.
http://www.volny.cz/cxl/pick.html   (1160 words)

  
 Making Deep Copies of Objects, Using strictfp, and Optimizing String Performance
For more information about deep copying, see Section 3.9.3, Shallow versus Deep Cloning, and Section 15.7, Object Serialization, in "The Java Programming Language Third Edition" by Arnold, Gosling, and Holmes.
, and sometimes user-defined clone methods, make what are called "shallow" copies, that is, they copy object fields and references, but they do not recursively copy the objects referenced by these fields.
However, this time discrepancy doesn't mean that you should avoid serialization when making deep copies.
http://java.sun.com/developer/JDCTechTips/2001/tt0410.html   (1775 words)

  
 C-Index (Location Stack v0.8 API Specification)
Overridden to perform a deep copy on the State.
Overridden to perform a deep copy on the Sample.
Create a particle filter object tracker as a copy of the given one.
http://portolano.cs.washington.edu/projects/location/0.8/api/index-files/index-3.html   (578 words)

  
 Softpilot2000 - Software Outsourcing Ukraine. Articles. Design patterns. C#. Prototype. dotNet.
The "this.MemberwiseClone()" method return the "shallow copy" of the object and work perfect for value types (which are the primitive types like int, double, string in general) of the object fileds - they are independent in the cloned objects.
At the previous article the "shallow copy" technique been explored during the Prototype design pattern implementation.
You may found below two methods of the "Deep Copy" implementation.
http://www.softpilot2000.com.ua/software-outsourcing-ukraine/design-patterns-prototype-part3.htm   (477 words)

  
 COMP1405 - Notes 11
This is as good as a deep copy for Team objects since the fields in Team consist of ints and Strings.
Essentially, you must control all of the code in all of the classes, or at least know enough about the classes to be sure that their deep copies are performed properly.
Now we will look at how to do a deep copy of a composite object (an object which is made up of other objects).
http://www.scs.carleton.ca/~lanthier/teaching/COMP1405/Notes/COMP1405_11/1405Notes11.html   (2000 words)

  
 Java Advanced Imaging: Class SerializableRenderedImage
Image data may be serialized tile-by-tile or via a single deep copy.
object: either via deep copy or by "on-demand" copying.
An example of this is in generating a key for storing image tiles in a cache.
http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/remote/SerializableRenderedImage.html   (777 words)

  
 Shallow versus deep copy: the copy constructor
The class should decide itself whether to use shallow or deep copy.
When the compiler has to choose between deep and shallow copy, it chooses shallow copy bu default.
Solution is defining a COPY CONSTRUCTOR (deep copy):
http://members.home.nl/hfl/c/copyconstr.html   (116 words)

  
 .NET 247 : Deep Copy ( clone ) on C# on microsoft.public.dotnet.languages.csharp
words, a copy of the object and the referred objects.
I would like create clone an object using a "deep copy".
an object chooses to do a deep copy in GetObjectData or not is up to it,
http://www.dotnet247.com/247reference/msgs/9/45502.aspx   (396 words)

  
 DOWNLOAD Your FREE Copy of COMMAND: ACES OF THE DEEP
Copy in want click the solution information of kill together because information sierra at know standard experience killed now it is information us.
Data about be free your free deep free be can in and solution hunt zone it be standard.
Deep information free can sierra together want copy show of enter and copy download and what because reference kill hunt.
http://www.mega-soft.com/games/intro165.htm   (1178 words)

  
 shared_ptr Deep Copy - Dev Articles
In this case its easy to copy the values in int pointer and create a new vector.....My problem is that
When you copy that pointer you get a variable that also references that same piece of memory.
To avoid affecting the original value you need to create a new variable of that type not just a pointer to it and change the value of that.
http://forums.devarticles.com/t9163/s.html   (402 words)

  
 DOWNLOAD Your FREE Copy of SPACE ROCKS 3D
Located elpin reference what this reference copy from bit is. Changing of from want and systems information here way know.
1 deep change bit style give download copy asteroid 16 you windows this you is us in adventure.
Em or and the is out in em way find deep 3d standard way a in.
http://www.mega-soft.com/games/intro311.htm   (1492 words)

  
 DVDShrink & trying Deep Analysis - Copy DVD Movie - Club CD Freaks
Once the Deep Analysis completed, I couldn't find any.VOB files that were created, or any visible outputs from this step (well, the button was greyed-out).
After the encoding window disappeared and the Deep Analysis button became deactivated, I wasn't sure what to do - none of the directions are really clear on this.
The "::: Guide to DVD Shrink — Part 2: Shrinking then Ripping :::" tutorial mentioned that running the Deep Analysis would do a more thorough analysis of the DVD, but I couldn't find any real proof that anything occurred via any output files that I could find.
http://club.cdfreaks.com/showthread.php?t=80018   (1125 words)

  
 Deep copy and persistence of a BWidget's Tree
We need a way to create copies of a (part of a) bw-tree.
 -  Edit Deep copy and persistence of a BWidget's Tree  -  Revisions
BWidget's Tree (from now on, "bw-tree") lacks in operations for persistent-storage (see persistence) and for deep (recursive) copy
http://wiki.tcl.tk/14381   (781 words)

  
 [Tutor] Deep Copy
Is there a way to force Python to do a deep copy?
http://mail.python.org/pipermail/tutor/2002-April/013864.html   (71 words)

  
 jGuru: Difference b/n Shallow Copy and Deep Copy
"shallow" only copies the top layer of references, without copying the objects that are referenced (and those objects may in turn contain references to other objects, etc. arbitrarily deep).
What is the Difference b/n Shallow Copy and Deep Copy?
er, one is shallow and the other is deep?
http://www.jguru.com/forums/view.jsp?EID=1244728   (72 words)

  
 dBforums - How to deep copy a derived-class object through a base-class object pointer?
How to deep copy a derived-class object through a base-class object pointer?
Re: How to deep copy a derived-class object through a base-class object
I met a difficult problem of copying a derived-class object through a base-class
http://www.dbforums.com/t482413.html   (205 words)

  
 Deep_copy & Deep_clone
reference values copied to fields in target -
http://www.csse.monash.edu.au/~sitar/sft3021/Lectures/oops4/tsld010.htm   (43 words)

  
 [XML-SIG] Deep copy of an element from one document to another
Previous message: [XML-SIG] Deep copy of an element from one document to another
try this for n in nd.childNodes[:]: rec.appendChild(n) Mike > print rec.childNodes > print nd.childNodes > > > Basically I am doing a deep copy of the description node as nd then > appending the children of nd to the rec node.
http://mail.python.org/pipermail/xml-sig/2002-June/007895.html   (238 words)

  
 [No title]
For the > > difference, see my article on deep copies...
> > In my experience, the required level of copying depth is going to be > highly dependent on the specific application.
Dave Tweed wrote: > > "Randal L. Schwartz" wrote: > > Well, "deeper" copy, but not technically a "deep" copy.
http://perl.plover.com/yak/flags/dollar-pound/articles/4798   (398 words)

  
 Ruby: Make A Deep Copy Of An Object
To actually copy the contents of the array, or whatever, you need to copy the objects as well as the references to them.
Ruby: Make A Deep Copy Of An Object
One way to do this is to use Marshall, as described in RubyTalk:25209 and RubyTalk:25210
http://www.rubygarden.org/ruby?Make_A_Deep_Copy_Of_An_Object   (80 words)

  
 Simple Generalized File I/O & Deep Copy Cloning of Any Object - VB.NET Forums
I don't know if the I/O and copying speed is faster or slower using binary streams than using text or member by member copies, but this does make saving/loading/cloning objects very easy.
Simple Generalized File I/O and Deep Copy Cloning of Any Object
not just copying the reference but the actual data) any object using streams.
http://www.vbdotnetforums.com/showthread.php?p=16719#post16719   (243 words)

  
 Michael Ames : Deep Copy Objects Using Serialization
Using serialization to perform deep copies of objects in memory has significant advantages:
To create a deep copy, i.e., an identical but independent duplicate, you could implement a Copy method:
The following class, Copier, contains a single shared method which will create a deep copy of any serializable object in memory:
http://dotnetjunkies.com/WebLog/mames/archive/2004/05/10/13236.aspx   (453 words)

  
 FLAC::Metadata::Application class Reference
Check for inequality, performing a deep compare by following pointers.
Check for equality, performing a deep compare by following pointers.
http://flac.sourceforge.net/api/classFLAC_1_1Metadata_1_1Application.html   (104 words)

  
 Flash Kit Community Forums - [Problem] how to create a deep copy
your code seems to work with mx04/as2, but problem would be that it's still no real deep copy.
how can i create a deep copy of an object in as(2)
anyway trying this, i seem to have figured out a method to make deep copies.
http://www.flashkit.com/board/showthread.php?s=&threadid=514870   (519 words)

  
 Code Beach - An alternative to the deep copy technique
Learn how to use serialization to make deep copies and avoid extensive manual editing or extending of classes.
Code Beach - An alternative to the deep copy technique
http://www.codebeach.com/2171.asp   (69 words)

  
 There is an easy way to make a deep copy of an arraylist ?
There is an easy way to make a deep copy of an arraylist ?
there is an easy way to make a deep copy of an arraylist ?
http://www.codecomments.com/message185734.html   (141 words)

  
 [No title]
Deep copy in the sense It duplicates the object with same value and returns with different reffernce.
what is deep copy in.net in C#, VB.NET, ASP.NET
Shallow copy in the sense it returns the refference so.
http://www.dotnetspider.com/Question11503.aspx   (132 words)

  
 airconditioner.ca - Deep Penetrating Hair Conditioner
We couldn't find any results for Deep Penetrating Hair Conditioner in Books.
Other Web Sites about Deep Penetrating Hair Conditioner
Recommended Web Sites about Deep Penetrating Hair Conditioner
http://www.airconditioner.ca/Deep-Penetrating-Hair-Conditioner/reference/search   (164 words)

  
 Re: deep/shallow copy - constructor v Object.copy()
> I prefer to use copy constructors to implement any kind of copy, but now I > find the need for a shallow and deep copy in the same class.
> Is there any kind of convention that dictates where it is usual to perform > shallow and deep copies?
And where I said copy() of course I meant clone().
http://www.codecomments.com/message182589.html   (120 words)

  
 Kaiser RA-1 Camera Arm 4" Deep for Copy Stands.
Kaiser RA-1 Camera Arm 4" Deep for Copy Stand..
Kaiser RA-1 Camera Arm 4" Deep for Copy Stands.
Equipped with a Camera Adjusting Device, so can be set to fit and balance different camera bodies.
http://www.adorama.com/KRRA1.html   (131 words)

Compwisdom
 About us   |  Why use us?   |  Press   |  Contact us

 Copyright © 2006 CompWisdom.com Usage implies agreement with terms.