Tending towards FourthEdiotion::NR
kutta
05-07-2009, 10:31 AM
Hello Comrades And Authors of NR,
Before saying Cherio to the Third Edition Of NR,why not have a glimpse at this Encapsulation.doc enclosed herewith
for its use in totality.
Thanking You
As
Kutta(C.R.Muthukumar)
:)
[edited by webmaster to remove copyrighted material]
kutta
07-06-2009, 08:49 PM
Hello Comrades And Authors of NR,
Before saying Cherio to the Third Edition Of NR,why not have a glimpse at this Encapsulation.doc enclosed herewith
for its use in totality.
Thanking You
As
Kutta(C.R.Muthukumar)
:)
[edited by webmaster to remove copyrighted material]
Hello Comrades,Authors of NR
I shall be delighted if the above suggestion that I made long ago regarding the the modularisation
and object-orientation emphassing for creation of
object-pool ,a new trend that helps manyof the recent bussiness persons while they use the esteemed NR-Recipes .This i substanciated with a model program in C++.Now it is for the concerned to find ways and means to inculcate the same in the forth coming future editions of NR .
I am sure this would boost their value as well as
bring cheers to the owners(Authors!)enabling them
to be proud owners of NR ,awaiting megha sales.
Any inconvenience caused may please be regretted.
Thanking You
As
Kutta(C.R.Muthukumar) :)
kutta
07-26-2009, 03:20 AM
Hello Comrades,Authors of NR
I shall be delighted if the above suggestion that I made long ago regarding the the modularisation
and object-orientation emphassing for creation of
object-pool ,a new trend that helps manyof the recent bussiness persons while they use the esteemed NR-Recipes .This i substanciated with a model program in C++.Now it is for the concerned to find ways and means to inculcate the same in the forth coming future editions of NR .
I am sure this would boost their value as well as
bring cheers to the owners(Authors!)enabling them
to be proud owners of NR ,awaiting megha sales.
Any inconvenience caused may please be regretted.
Thanking You
As
Kutta(C.R.Muthukumar) :)
Hello NR:Numerates/Authors
The example shown below in continution of the same topic may please be explored further as
the eagerness to include improvement for future releases of NR is Obvious and hence the same
Thanking You
As
Kutta(C.R.Muthukumar)
/**
This program is a sample
that is coded to find out
how to pullout the objects
from a running program
for a better modification
of its variables to fetch
the rquired benefits
in a businessenvironment
(for example)/may further
be developed basing on
the new tool/trend for
Objects_Pooling and its
setting*/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
class UserRequest
{
int a;
int b;
int c;
public:
void getdata(int a,int b,int c);
void putdata(void)
{
cout << " a:" << a << "\n";
cout << " b:" << b << "\n";
cout <<" c: " << c << "\n";
}
};
void UserRequest:: getdata(int x,int y,int z)
{
a=x;
b=y;
c=z;
}
class ProcessUserRequest
{
int ObjectPool;
int reqPool;
public:
void getdata(int ObjectPool, int reqPool);
void putdata(void)
{
cout << "ObjectPool :" << ObjectPool <<"\n";
cout << "reqPool: " << reqPool << "\n";
}
};
void ProcessUserRequest:: getdata(int Pool,int req){
ObjectPool =Pool;
reqPool = req;
}
int main(){
UserRequest s;
cout << "\nUserRequest s:" << "\n";
s.getdata(198,89,98);
s.putdata();
cout <<endl;
ProcessUserRequest ss;
cout << "\nProcessUserRequest ss:" << "\n";
ss.getdata(8,9);
ss.putdata();
return 0;
}
/**
Output:
UserRequest s:
a:198
b:89
c: 98
ProcessUserRequest ss:
ObjectPool :8
reqPool: 9
*/
kutta, you aren't making any sense, and your "suggested example" is perfectly uninformative. Perhaps part of the problem is that what you are saying depends on whatever it is that got removed by the webmaster for copyright violation; can't you explain what it is you want without posting big blobs of NR-derived code?
kutta
07-27-2009, 09:42 PM
kutta, you aren't making any sense, and your "suggested example" is perfectly uninformative. Perhaps part of the problem is that what you are saying depends on whatever it is that got removed by the webmaster for copyright violation; can't you explain what it is you want without posting big blobs of NR-derived code?
Hello NR-Authors/Numerates,
Atleast I am delighted with this response though
the clarity concept /Comprehensive Method of teaching such stuff,I am not good-at,neverthless,
can now say these words in a Nut- Shell with the profound hopes that the concerned captivate the same
for betterment of future release by a making a real try for Megha Making Of NR routines in a UniversalWay to fetch glory that may be first of its kind.
Thanking You
As
Kutta(C.R.Muthukumar)
The Essentails are as under
:
Provide an object pool that can be used with any class that provides a
default constructor.
The object pool constructor creates a pool of objects, which it hands out
to clients when requested via the acquireObject() method. When a client is
finished with the object it calls releaseObject() to put the object back
into the object pool.
The constructor and destructor on each object in the pool will be called only
once each for the lifetime of the program, not once per acquisition and release.
The primary use of an object pool is to avoid creating and deleting objects
repeatedly. The object pool is most suited to applications that use large
numbers of objects for short periods of time.
For efficiency, the object pool doesn't perform sanity checks.
Expects the user to release every acquired object exactly once.
Expects the user to avoid using any objects that he or she has released.
Expects the user not to delete the object pool until every object
that was acquired has been released. Deleting the object pool invalidates
any objects that the user had acquired, even if they had not yet been released.
(You might consider mentioning that all that text comes from the book "Professional C++" by Nicholas Solter and Scott Kleper.)
Almost everything in NR works, in typical use, with stack-allocated objects rather than with pointers to heap-allocated objects; or, in the case of things like NRVec, with things that behave that way although the underlying memory is heap-allocated. This gets you almost all the advantages of using object pools without actually needing pool-management code. (What it doesn't get you is saving setup and teardown costs, in cases where those are expensive and can be skipped when an object is reused; but I don't think there's anything in NR that you'd want multiple instances of and that has non-negligible setup or teardown cost.) There's hardly any explicit allocation in the NR code. So the NR code doesn't seem like a typical case where object pools are called for, and it seems unlikely to me that discussion of object pools would be worth the space it would take up in any future edition of NR, and even more unlikely that including support for object pools would make any difference to the commercial success of NR ("mega sales", indeed!).
Do you have particular examples in mind where an application of the NR code would be substantially improved by the use of an object pool?
I'm not sure that "a new trend" is a good description of object pools, anyway. For instance, I know I have a book from 1992 that mentions them (admittedly in the context of a language quite unlike C++), and I'm pretty sure they were far from new then.
kutta
08-04-2009, 01:32 AM
(You might consider mentioning that all that text comes from the book "Professional C++" by Nicholas Solter and Scott Kleper.)
Almost everything in NR works, in typical use, with stack-allocated objects rather than with pointers to heap-allocated objects; or, in the case of things like NRVec, with things that behave that way although the underlying memory is heap-allocated. This gets you almost all the advantages of using object pools without actually needing pool-management code. (What it doesn't get you is saving setup and teardown costs, in cases where those are expensive and can be skipped when an object is reused; but I don't think there's anything in NR that you'd want multiple instances of and that has non-negligible setup or teardown cost.) There's hardly any explicit allocation in the NR code. So the NR code doesn't seem like a typical case where object pools are called for, and it seems unlikely to me that discussion of object pools would be worth the space it would take up in any future edition of NR, and even more unlikely that including support for object pools would make any difference to the commercial success of NR ("mega sales", indeed!).
Do you have particular examples in mind where an application of the NR code would be substantially improved by the use of an object pool?
I'm not sure that "a new trend" is a good description of object pools, anyway. For instance, I know I have a book from 1992 that mentions them (admittedly in the context of a language quite unlike C++), and I'm pretty sure they were far from new then.
While thanking for your elaborate analysis which simultaneosly creating new session of debate
between Numeracy and Innumeracy a subject that is totally unrequired especially in this NRForum which is ,as you said in ur analytic matter that Object_pooling may needlees suitable for NR.
While aggreeing to this ,I still point out that the trend of Objects Storing and their detailed fine tuning them or reusing them context to it is important with adequate Scopes, as for example if one has a new Algorithm inhand but yet to make it workable as the objects need some modificaton.So please treat this as Suggestion in the broadest sense and be used for futuristic Editions, though not as aTheorem,but as corrallary or a rider to the main Algorithm that might a modern student Of NR deveolop.
And last but not the least why can't my previous
ly suggested BidddingAlgorithm (ref old/predated topic in this section) be used to make it workable
using this so called ObjectPooling .
Thanking You
As
Kutta(C.R.Muthukumar)
:)
I have no idea what you mean by "debate between Numeracy and Innumeracy", and I am certainly not engaging in any such debate unless you care to play the role of Innumeracy.
Your short document about "bidding algorithms" (I have no idea why you posted it as a Word document rather than just putting the text into the form here) consisted of a short passage plagiarized from a 1967 article on "operational research in business" (and garbled in the process), followed by some proposal I can make very little sense of -- in the space of a few sentences it veers from suggesting that Java and C++ be made more "strategy oriented" rather than "object oriented" using ideas from bidding (eh?), to the vague suggestion that it might be possible to write software that implements a bidding strategy (sure, it must be possible, but why on earth should it be in NR?) and, once again, the bizarre claim that doing so will have a huge effect on sales of NR. (With, stuffed into the middle, what looks to me like another plagiarized-and-garbled passage, but I can't find what it's copied from.) In any case, if it has any connection to object pools, I can't see it.
Look, I'm sorry if this sounds rude, but you keep on posting nonsense, incorrect code, and copyright violations here, and it's annoying. I wish you'd either improve or stop.
(For the avoidance of doubt: I am just another user of the NR forums, not an official NR person.)