search for: lexicographic

Displaying 20 results from an estimated 79 matches for "lexicographic".

2003 Jul 18
3
lexicographic sort of ordered lists
Does anyone know how to execute the following sort problem in R? Matrix X has positive integer entries, and each column has been sorted in ascending order. The problem is now to order the columns lexicographically. For instance if the matrix X is 1 2 1 1 2 2 2 3 3 2 3 5 5 4 2 then the result should be 1 1 1 2 2 2 3 3 2 2 3 4 5 2 5 Let ONE be a vector of 1's of length ncol(X). The result in this example can be accomplished by X=X[,order(ONE,X[1,],X[,2],X[,3])] but I need a...
2003 Dec 14
5
reverse lexicographic order
Hi all, I have some email addresses that I would like to sort in reverse lexicographic order so that addresses from the same domain will be grouped together. How might that be done? Murray -- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at waikato.ac.nz...
2008 May 12
1
lexicographic comparison of two vectors
Is there any built-in way to lexicographically compare two vectors of the same length in R? The textbook algorithm could be coded as follows: lex.cmp <- function (vec1,vec2) { for (j in 1:length(vec1)) { if (vec1[j] < vec2[j]) { return(-1) } if (vec1[j] > vec2[j]) { return(1) } } return(0) } Thanks, Gabriel
2008 Sep 30
1
ordering problem
Hi there! I need some assistance here with vector orderings. I have a set of q vectors of length p, grouped by rows in a matrix A, q?p, that I need to order lexicographically (http://en.wikipedia.org/wiki/Lexicographical_order). I also have another matrix B, p?r, and a vector c, that should be ordered according to the order of A. So far, I was doing ordering <- apply(A, 2, order)[,1] A <- A[ordering,] B <- B[ordering,] c <- c[...
2010 Nov 07
1
How do I order xyplot line points?
...000000.png The data are organized in a matrix file as follows: Type Elements Chromosome Time bedGz 12000000 chr1 14.240 bedGz 12000000 chr2 7.949 bedGz 12000000 chr3 5.103 bedGz 12000000 chr4 5.290 bedGz 12000000 chr5 5.161 ... The x-axis labels in the Chromosome column are ordered lexicographically in my figure ( chr1 > chr10 > chr11 > ... ) ? this is correct. However, the code I use to draw lines between points in the xyplot connects points in numerical order ( chr1 > chr2 > ... ) ? this is incorrect. The problem this causes is most evident in the line that is drawn for...
2003 Oct 16
5
Desirable Properties of a Real Metadata Format
...esser extent, "10. The Cherubimic [sic] Hymn". At least if the original names were in the file...well, that'd be nice. I guess. Does anyone have any idea how to deal with track num, er, indices like "9a, 9b", &c.? The best I can suggest is sorting numerically (i.e., not lexicographically) and then allowing the inclusion of some sort of comparison function... Ew. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word ...
2008 Dec 05
1
Lexical Permutation Algorithm in R
...untime? One small potential optimization I tried was to shorten the "sort by reverse ordering" near the end of the inner loop : I tried replacing it with rev() and sort(decreasing=TRUE) over a partial subset of the x vector: however rev() was much slower, and I dont think sort() supports lexicographic ordering, so that didnt work. Thanks rory Rory Winston RBS Global Banking & Markets 280 Bishopsgate, London, EC2M 4RB Office: +44 20 7085 4476 *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312...
2019 Jan 03
4
[RFC] Adding a -memeq-lib-function flag to allow the user to specify a memeq function.
...ecify a `memeq` library function (e.g. `-memeq-lib-function=user_memeq`) which will be called instead of `memcmp()` when the result of the memcmp call is only used for equality comparison. `memeq` can be made much more efficient than `memcmp` because equality comparison is trivially parallel while lexicographic ordering has a chain dependency. We measured an very large improvement of this approach on our internal codebase. A significant portion of this improvement comes from the stl, typically `std::string::operator==()`. Note that this is a *backend-only change*. Because the c family of languages do no...
2015 Apr 06
2
Failover Subnet
> If your question is "can I assign the same subnet to multiple tinc > nodes on the same network", the answer is yes (for both 1.0 and 1.1). Yes exactly. > currently it tries to estimate which one is closest by measuring the > time it took to establish metaconnections along the edges to the node, Shure? I remember alphabetic order (host name) in tinc 1.0. Is it the same
2017 Jun 22
1
hpc r configure not recognizing zlib
...this error even after successful install of zlib checking for inflateInit2_ in -lz... no checking whether zlib support suffices... configure: error: zlib library and headers are required I?ve checked R documentation and configure file for the issue of R requiring version newer than 1.2.6 but not lexicographically recognizing 1.2.11 as >1.2.6, and that particular bug was patched in 3.4. Any suggestion and/or input would be much appreciated. Regards, Bashir [[alternative HTML version deleted]]
2011 Apr 23
1
Arguments to order()
Hi, The rows of a data frame can be sorted lexicographically as shown in this example, my.df <- data.frame(x=c(1,1,1,2,2), y=c(1,2,3,2,1)) my.df[order(my.df$x,my.df$y, decreasing=TRUE), ] however, I'm wondering if it's possible to pass a variable in as the first argument to order() so that the actual set of columns used in the sort can be ea...
2011 Jun 22
1
binary in R
Does really nobody has a coment to this question? Dear R-help members I would like to use the R package goalprog, weighted and lexicographical goal programming and optimization to optimize a location problem. In my model I need a "yes" or "no" decision - in this case, whether to select a site or not - are represented by 1 and 0. Does somebody has experience with this problem and know how this could be done? Thanks...
2004 Oct 04
2
AW: constructing specially ordered factor
...uot;unique.default". Indeed, "unique.default" should preserve the same order for output both working with strings and with numbers. In other words, correspondence must be kept by "unique.default". If "unique.default" implementation uses (or will use) lexicographic strings sorting for acceleration then this approach fails. -- Valery
2013 May 17
0
[LLVMdev] AArch64 build error
...n commands were run before the main sources got compiled, but at 32 threads perhaps that doesn't matter so much. Has this just started since AArch64 was added, or have you only recently started building at -j32? As far as I can see AArch64 is unexceptional in its dependencies, except for being lexicographically the first target. I'd be interested in your results if AArch64 was disabled. There's clearly some issue though. I've only got 4 cores (+ 4 faked) here so I'm not optimistic about reproducing any races you're seeing, though I'll keep trying periodic builds. How many core...
2019 Jun 11
3
[RFC][SCEV] Behavior of AddRec in CompareSCEVComplexity
...coded in the surrounding code. So I want to hear from you folks whether we should calculate the complexity of SCEVAddRec located in different loops. If yes, what’s the best way? For the latter question, currently I have an idea in my mind to compare their loop trip counts before doing the following lexicographic comparison. Thank you, B.R. - Min -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190611/fd11dc06/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: p...
2013 May 17
2
[LLVMdev] AArch64 build error
Hi, I'm getting a "random" build failure related to AArch64 when building with cmake. The build is running with -j32 so it seems that there is some dependency issue that causes the build to fail when things build in a certain order. Is anyone else seeing this problem? paul 3008 make[2]: *** No rule to make target `lib/Target/AArch64/AArch64GenDAGISel.inc', needed by
2013 Jan 24
2
[Bug 9594] New: Error transferring user and non-user xattr using --fake-super under Linux
https://bugzilla.samba.org/show_bug.cgi?id=9594 Summary: Error transferring user and non-user xattr using --fake-super under Linux Product: rsync Version: 3.1.0 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P5 Component: core AssignedTo: wayned at
2017 Jun 29
0
about reading files in order
You can use: > files <- list.files(path = "folder01") > files <- gtools::mixedsort(files) to order the files in a "human-friendly" order rather than lexicographic order (which sort() provides). FYI 1; it's preferred to use file.path("folder01", list[i]) rather than paste('folder01',lists[i],sep='/'). FYI 2; if you use list.files(path = "folder01", full.names = TRUE), you get the full paths rather name just the file n...
2011 Oct 01
1
[LLVMdev] Tablegen: RegisterInfoEmitter.cpp
Hi, I understand the idea behind compare_numeric() is to compare strings containing digits in a special way: Do a normal string-compare up to the point where both string elemnts are numerical. Find then an outcome based on the number of consecutive digits in the strings while disregarding the value of the digits, eg a12b < a123. I guess then this order should hold: a12 == a22 < a1b, for
2012 Mar 22
2
[LLVMdev] Sorting relocation entries
..., int Idx, > + unsigned RelType, const MCSymbol *Sym, > + uint64_t Addend, const MCFixup *Fixup) > + : r_offset(RelocOffset), Index(Idx), Type(RelType), > + Symbol(Sym), r_addend(Addend), fixup(Fixup) {} > + > + // Support lexicographic sorting. > + bool operator<(const ELFRelocationEntry &RE) const { > + return RE.r_offset < r_offset; > + } > + }; > + I don't think this really belongs to the MCELFObjectTargetWriter class, per se. I suggest moving it outside of the class definition. >...