search for: mergesort

Displaying 15 results from an estimated 15 matches for "mergesort".

2016 Apr 19
2
Merge sort
Hello everyone, I am learning R since recently, and as a small exercise I wanted to write a recursive mergesort. I was extremely surprised to discover that my sorting, although operational, is deeply inefficient in time. Here is my code : > merge <- function(x,y){ > if (is.na(x[1])) return(y) > else if (is.na(y[1])) return(x) > else if (x[1]<y[1]) return(c(x[1],merge(x[-1],y))) &gt...
2016 Apr 19
0
Merge sort
On 19/04/2016 3:39 PM, Gaston wrote: > Hello everyone, > > I am learning R since recently, and as a small exercise I wanted to > write a recursive mergesort. I was extremely surprised to discover that > my sorting, although operational, is deeply inefficient in time. Here is > my code : > >> merge <- function(x,y){ >> if (is.na(x[1])) return(y) >> else if (is.na(y[1])) return(x) >> else if (x[1]<y[1]) ret...
2016 Apr 20
1
Merge sort
...reassigning and copying?) is also expensive. Thank you for your help! On 04/19/2016 11:51 PM, Duncan Murdoch wrote: > On 19/04/2016 3:39 PM, Gaston wrote: >> Hello everyone, >> >> I am learning R since recently, and as a small exercise I wanted to >> write a recursive mergesort. I was extremely surprised to discover that >> my sorting, although operational, is deeply inefficient in time. Here is >> my code : >> >>> merge <- function(x,y){ >>> if (is.na(x[1])) return(y) >>> else if (is.na(y[1])) return(x) >>>...
2004 Aug 25
4
bugfix: indeterministic file choice from multiple sources
...not guarantee the former order, if items to sort have the same value. Our test case triggers a situation where this unstabilibity shows up. Why does it not happen in gnu linux versions? Reading man pages showed us that glibc has an "optimization" in qsort: if memory is not low it uses mergesort instead, which is a stable sort algorithm. fix: Since in our scenario using rsync we rely on deterministic behaviour, we patched rsync to use mergesort always for composing the file list. For systems without a mergesort system call (most os's except freebsd/darwin) we use the freebsd impl...
2020 Aug 19
2
[Bug 1450] New: Using certain simple set combinations with TCP flags causes error in mergesort.c from nft list ruleset
https://bugzilla.netfilter.org/show_bug.cgi?id=1450 Bug ID: 1450 Summary: Using certain simple set combinations with TCP flags causes error in mergesort.c from nft list ruleset Product: nftables Version: unspecified Hardware: arm OS: Ubuntu Status: NEW Severity: normal Priority: P5 Component: nft Assignee: pablo at netfilter.org Reporter: ph...
2006 Jun 02
3
[PATCH] --omit-dir-changes, qsort<>mergesort issues
...st I would sleep a lot better if there's a sure method not set directory permission/ownership. I'd love to hear any feedback about the patch or if doesn't work correctly in some scenario. Cheers, -Antti [1] Reliable sync from multiple src roots requires a custom build of rsync with mergesort() built-in. I'm having the same problem as discussed in thread at http://lists.samba.org/archive/rsync/2004-August/010398.html and http://lists.samba.org/archive/rsync/2003-November/007756.html. There's another qsort<>mergesort testing tool available at http://www.hut.fi/~aet/test-r...
2005 Jun 09
1
handling duplicate names deterministically and adding alternative checksum algorithms
Thanks, rsync developers, for creating such a great tool. I'm a member of a team of system administrators and integrators that use rsync with SystemImager and Cfengine to rapidly deploy and prescriptively maintain systems. Our current practices would benefit if rsync were enhanced to handle duplicate names deterministically as described in the todo list. If we were able to use rsync to
2020 Oct 27
0
[ANNOUNCE] nftables 0.9.7 release
...on netlink_delinearize: transform binary operation to prefix only with values evaluate: disregard ct address matching without family segtree: memleaks in interval_map_decompose() src: cache gets out of sync in interactive mode src: add comment support for map too mergesort: unbreak listing with binops src: add expression handler hashtable src: add chain hashtable cache mergesort: find base value expression type via recursion mnl: larger receive socket buffer for netlink errors tests: py: flush log file output before running each command...
2024 Sep 23
0
bit, bit64, ff and greeNsort
...eloping more sustainable sorting algorithms that provide better trade-offs between memory investments, compute costs and adaptivity to easier input patterns. My R&D project was successfully completed 2024 with theory and design of new symmetric sorting algorithms that can replace Quicksort, Mergesort and Timsort. Lots of info at greeNsort.org. I have an R package `greeNsort` on github with a research testbed that can measure RAM, CPU and RAPL energy for ?150 equally tuned sorting algorithms on multiple test patterns. Since 24.2.2022 my priorities are on strengthening resilience of European...
2024 Sep 23
0
bit, bit64, ff and greeNsort
...eloping more sustainable sorting algorithms that provide better trade-offs between memory investments, compute costs and adaptivity to easier input patterns. My R&D project was successfully completed 2024 with theory and design of new symmetric sorting algorithms that can replace Quicksort, Mergesort and Timsort. Lots of info at greeNsort.org. I have an R package `greeNsort` on github with a research testbed that can measure RAM, CPU and RAPL energy for ?150 equally tuned sorting algorithms on multiple test patterns. Since 24.2.2022 my priorities are on strengthening resilience of European...
2008 Feb 01
0
rsync Digest, Vol 62, Issue 1
...ibrary implementation and the order of directory entries in the source (which in turn is sensitive to the filesystem implementation). You probably have both a different C library and a different filesystem than I do. In any case, since rsync 3.0.0pre1, the default file-list sorting algorithm is a mergesort, which is stable, so files from earlier source arguments take priority. If you upgrade to an rsync 3.0.0pre* version, your scenario should work consistently. If it doesn't, that's a bug we should try to fix. Matt ------------------------------ Message: 4 Date: Fri, 1 Feb 2008 09:46:4...
2008 Oct 08
4
question from Braun/Murdoch book
Hi R People: I am looking at the Braun/Murdoch book, " A First Course in Statistical Programming in R", and I have a question about a function there. It's on page 52, Example 4.5; the sieve of Erastosthenes. There is a line: primes <- c() Is there a difference between using that and primes <- NULL please? When you put in primes <- c(), primes comes back as NULL. Is
2003 Apr 02
1
bug report: bus error on Mac OS/X 10.2.3
...2.4 (Build 6I32) Host: Albus.local. Command: rsync PID: 2349 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000008 Thread 0 Crashed: #0 0x90004fb0 in strcmp #1 0x9001b2d0 in insertionsort #2 0x9001afc0 in setup #3 0x9001aa98 in mergesort #4 0x9000b968 in __opendir2 #5 0x00010620 in 0x10620 #6 0x000105dc in 0x105dc #7 0x00010804 in 0x10804 #8 0x000105dc in 0x105dc #9 0x00010804 in 0x10804 #10 0x000105dc in 0x105dc #11 0x00010804 in 0x10804 #12 0x000105dc in 0x105dc #13 0x00010c28 in 0x10c28 #14 0x00009d64...
2010 May 21
0
Wine release 1.2-rc1
...qtz32: Add support for MCI_STATUS_TIME_FORMAT. mciqtz32: Add support for MCI_PAUSE. Marcus Meissner (7): ole32: Fixed 2 uninitialized variable use (Coverity). wined3d: fixed a NULL deref in create_arb_blt_fragment_program (Coverity). ntdll: Reimplement qsort() using generic mergesort. ntdll: Rename mergesort to NTDLL_mergesort. ntdll: Implement bsearch, lfind to use correct comparator functions. msvcrt: Add some missing CDECL. msvcrt: Check locale for NULL before freeing. Matej ?pindler (11): winecfg: Update Slovenian translation. shell32: U...
2024 Jul 16
0
[ANNOUNCE] nftables 1.1.0 release
...objects tests: shell: Add missing json-nft dumps tests: shell: Fix one json-nft dump for reordered output doc: libnftables-json: Drop invalid ops from match expression doc: nft.8: Two minor synopsis fixups json: Accept more than two operands in binary expressions mergesort: Avoid accidental set element reordering tests: py: Fix some JSON equivalents tests: py: Warn if recorded JSON output matches the input tests: py: Drop needless recorded JSON outputs tests: shell: Avoid escape chars when printing to non-terminals Add support for table&...