找回密码
 注册
查看: 363|回复: 0

R语言 externalVector包 externalAllocator-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 17:25:05 | 显示全部楼层 |阅读模式
externalAllocator-class(externalVector)
externalAllocator-class()所属R语言包:externalVector

                                        Class "externalAllocator", base class for memory allocators for
                                         类“externalAllocator”的内存分配器基类

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Class "externalAllocator" is a virtual class with no slots. It represents memory allocators that allocate raw memory to be held in an object of class "externalptr". Instead of returning the "externalptr" object directly, the allocators deal with subclasses of "externalResource" that hold an object of
"externalAllocator"类是虚拟类与无槽。它代表了内存分配器分配原始内存在一个对象类"externalptr"举行。而不是返回,"externalptr"对象直接分配器"externalResource",子类的处理持有的对象


类的对象----------Objects from the Class----------

A virtual Class: No objects may be created from it.
可以从它创建一个虚拟类:无对象。


虚拟方法----------Virtual Methods----------

Attempt to execute these methods would result in an error unless they have been redefined for a subclass of "externalAllocator".
试图执行这些方法将导致错误,除非他们已经被重新定义为子类的"externalAllocator"。

Signature components for implementation of the methods:
实施方法的签名的组件:

The class "externalResource"
类“externalResource”

A subclass of "externalAllocator"
“externalAllocator”的子类

The class "ANY"
类的“ANY”

The class "ANY"
类的“ANY”

The class "logical"
类的“逻辑”

The class "ANY"
类的“ANY”

Description of the virtual methods:
虚拟方法的描述:




allocate(resource, alloc, size, type, ...):  Allocate the external pointer in resource using the allocator alloc. If type is a basic vector object, then allocate an object of same mode with length size. Otherwise allocate size bytes of raw memory. This method should end with a call to initializeResource to initialize the resource
(分配资源,分配,大小,类型,...):分配在resource使用分配器alloc的外部指针。 type如果是一个基本的矢量对象,然后分配长度size对象相同的模式。否则分配原始内存size字节。此方法应该结束呼叫initializeResource初始化resource




deallocate(resource, alloc):  The allocator alloc should try to dealloacte the raw memory in resource. It should not modify the resource object in any way other than modifying the object of class "externalptr" in
DEALLOCATE(资源,分配):分配器alloc应尽量dealloacteresource原始内存。它不应该比在其他任何方式修改,修改类的对象resource"externalptr"对象




external.size  Return the size of the allocated memory in
external.size返回分配的内存的大小




external.size<-(resource, copy, alloc, value):  If value is same as external.size(resource), then no action is taken. Otherwise, reallocate the memory in resource using the allocator alloc with new size value. If copy is TRUE (the default), then the new memory is initialized to the content of the old memory for the minimum of old and new sizes. Content of
external.size < - (资源,复制,分配,价值):如果value作为external.size(resource)是相同的,那么不采取任何行动。否则,重新分配在resource用新的大小alloc分配器value的记忆。 copy如果是TRUE(默认),那么新的内存初始化旧为新老大小的最低内存的内容。内容




reinitializePointer(resource, alloc):  If the object resource was saved as an R image (by serialization code, by saving the R workspace, or by an explicit call to save) then the raw memory pointer in any "externalptr" object in it would be set to 0. This method tries to reinitialize the raw memory pointer. The exact
reinitializePointer(资源,分配):如果对象resource被保存为一个R图像(序列化代码,保存的R工作区,或由一个显式的调用save),则原始内存指针任何"externalptr"在它的对象将被设置为0。这种方法试图重新初始化原始内存指针。确切


作者(S)----------Author(s)----------


Saikat DebRoy <a href="mailto:<saikat@stat.wisc.edu>">&lt;saikat@stat.wisc.edu&gt;</a>



参见----------See Also----------

externalResource-class for more on how to use an allocator with objects from subclasses of "externalResource".
externalResource-class更多关于如何使用"externalResource"子类的对象的分配器。

gcAllocator-class for an example of a subclass of "externalAllocator".
gcAllocator-class一个"externalAllocator"的子类的一个例子。

setVirtualMethod for more on virtual methods.
setVirtualMethod虚方法。

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-2-9 11:10 , Processed in 0.026900 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表