Raised This Month: $35 Target: $400
 8% 

Developer Builds Available


Post New Thread Closed Thread   
 
Thread Tools Display Modes
-Px-
Junior Member
Join Date: Sep 2009
Old 07-06-2011 , 04:23   Re: Developer Builds Available
#61

http://hg.alliedmods.net/amxmodx-central/log
21: Fix time drift on repeating tasks (bug 3302, r=dvander).
22: Upgraded MSVC project files for VS 2010 and modified build tool to use them.
23: Added .hgignore file.
24: Hopefully fixed Windows build.
-Px- is offline
Old 07-23-2011, 08:14
res1122
This message has been deleted by xPaw. Reason: Spam.
Old 08-01-2011, 10:30
kscutejoke07
This message has been deleted by asherkin. Reason: Spam.
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 08-08-2011 , 08:13   Re: Developer Builds Available
#62

Hello, I want to suggest to add function array_fast_compare which will be to compare two array with instantaneous speed (50ms, 2 two arrays with 20000 elements) to find difference or union.
Which functions in C++ Builder:
PHP Code:
#include <set>
#include <algorithm>
#include <iterator>
#include <system.hpp>

int array_string_compare(String sArray1[], int iArrCount1String sArray2[], int iArrCount2String sArray3[], int iTypeCompare)
{
        
std::set<Stringtrie1(sArray1sArray1+iArrCount1), trie2(sArray2sArray2+iArrCount2), trie3;
        
std::set<String>::const_iterator itrend_itr1end_itr2;
        
std::insert_iterator<std::set<String> > trie3_ins(trie3trie3.begin());

        switch (
iTypeCompare)
        {
                case 
0:
                        
set_difference(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;
                case 
1:
                        
set_symmetric_difference(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;
                case 
2:
                        
set_union(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;
                case 
3:
                        
set_intersection(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;                        
        }

        
int iCount 0;
        for ( 
itr trie3.begin(); itr != trie3.end(); itr++)
        {
                
sArray3[iCount++] = *itr;
        }
        return 
iCount;
}

int array_int_compare(int sArray1[], int iArrCount1int sArray2[], int iArrCount2int sArray3[], int iTypeCompare)
{
        
std::set<inttrie1(sArray1sArray1+iArrCount1), trie2(sArray2sArray2+iArrCount2), trie3;
        
std::set<int>::const_iterator itrend_itr1end_itr2;
        
std::insert_iterator<std::set<int> > trie3_ins(trie3trie3.begin());

        switch (
iTypeCompare)
        {
                case 
0:
                        
set_difference(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;
                case 
1:
                        
set_symmetric_difference(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;
                case 
2:
                        
set_union(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;
                case 
3:
                        
set_intersection(trie1.begin(), trie1.end(), trie2.begin(), trie2.end(), trie3_ins);
                        break;                        
        }

        
int iCount 0;
        for ( 
itr trie3.begin(); itr != trie3.end(); itr++)
        {
                
sArray3[iCount++] = *itr;
        }
        return 
iCount;

Please tell me what programs do I need to compile the module from source? I want to try to do something with module.

Last edited by -=hunter=-; 08-08-2011 at 09:12.
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
BAILOPAN
Join Date: Jan 2004
Old 08-08-2011 , 13:22   Re: Developer Builds Available
#63

Sets are not tries so this code is a little confusing. Anyway, you can implement these algorithms in Pawn - ask in the appropriate forum though, either Scripting or Module Coding.
__________________
egg
BAILOPAN is offline
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 08-08-2011 , 13:56   Re: Developer Builds Available
#64

Quote:
Originally Posted by BAILOPAN View Post
Anyway, you can implement these algorithms in Pawn - ask in the appropriate forum though, either Scripting or Module Coding.
If I do this in Pawn then code will be slow than with structure in this function and hard to code.

Do not need this feature? I think for many users would be useful

Last edited by -=hunter=-; 08-08-2011 at 14:12.
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
BAILOPAN
Join Date: Jan 2004
Old 08-08-2011 , 17:35   Re: Developer Builds Available
#65

Quote:
Originally Posted by -=hunter=- View Post
If I do this in Pawn then code will be slow than with structure in this function and hard to code.
The latter *might* be true but I don't see any reason either is true. You can always measure though.
__________________
egg
BAILOPAN is offline
Old 08-26-2011, 02:25
zensor
This message has been deleted by xPaw. Reason: Spam.
palenke
Junior Member
Join Date: Aug 2011
Old 09-08-2011 , 04:00   Re: Developer Builds Available
#66

That wave I have a base builder want to know if the zombies bb powers can be added to each as a zombie plage
palenke is offline
Old 09-14-2011, 06:08
Melissa
This message has been deleted by xPaw. Reason: Spam.
Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:19.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode