Displaying 20 results from an estimated 79 matches for "lexicographical".
Did you mean:
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 me...
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[or...
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 t...
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
Hi all
Here is a rather naive implementation of the SEPA algorithm for generating lexical permutations:
lexperm3 <- function(x, n=length(x)) {
perms <- list()
k <- 1
perms[[k]] <- x
k <- k + 1
for (y in 1:(factorial(n)-1)) {
i <- n-1
while (x[i] > x[i+1] && i > 0) {
i <- i - 1
}
# i is largest index st x[i] > x[i+1]
j <- n
#
2019 Jan 03
4
[RFC] Adding a -memeq-lib-function flag to allow the user to specify a memeq function.
Hi all,
We'd like to suggest *adding a -memeq-lib-function* flag to allow the user
to specify a `*memeq()*` function to improve string equality check
performance.
Right now, when llvm encounters a *string equality check*, e.g. `if
(memcmp(a, b, s) == 0)`, it tries to expand to an equality comparison if
`s` is a small compile-time constant, and falls back on calling `memcmp()`
else.
This is
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 easi...
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 f...
2004 Oct 04
2
AW: constructing specially ordered factor
Hi Dimitris,
thank you for your reply,
> does the following work in your data:
>
> levs <- unique.default(Names)
> factor(Names, levs[order(unique.default(Weights))])
your solution is really shorter, but has two issues to be
meant here:
1. "unique.default" is applied twice, what might
be a bit expensive for strings.
2. your solution brings an implicit
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 cores...
2019 Jun 11
3
[RFC][SCEV] Behavior of AddRec in CompareSCEVComplexity
Hi,
Recently I got a crash when I tried to analysis a program with ScalarEvolution AliasAnalysis(SCEV-AA for short). It turns out to be a (possibly) incorrect assertion inside the CompareSCEVComplexity routine.
The simplest solution would be just remove that assertion but I also found that the surrounding logics on calculating SCEV cost seems to be incorrect either. Thus I want to discuss with
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
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
Hi Akira,
This is looking good. Some specific comments on the details below.
Thanks!
Jim
> diff --git a/include/llvm/MC/MCELFObjectWriter.h b/include/llvm/MC/MCELFObjectWriter.h
> index 6e9f5d8..220ecd0 100644
> --- a/include/llvm/MC/MCELFObjectWriter.h
> +++ b/include/llvm/MC/MCELFObjectWriter.h
> @@ -13,6 +13,7 @@
> #include "llvm/MC/MCObjectWriter.h"
>