Displaying 20 results from an estimated 20 matches for "permuate".
2018 Mar 30
3
getting all circular arrangements without accounting for order
Dear friends,
I would like to get all possible arrangements of n objects listed 1:n on a circle.
Now this is easy to do in R. Keep the last spot fixed at n and fill in the rest using permuations(n-1, n-1) from the gtools package.
However, what if clockwise or counterclockwise arrangements are the same? I know that half of the above (n - 1)! arrangements are redundant.
Is there an easy way to
2009 Aug 11
1
nested repeated measures MANOVA using adonis
I am trying to apply a permuation-based MANOVA (Anderson 2001) to a set of
morphological data from three ecomorphs of fish reared under two different
conditions and measured at two points during ontogeny. I will supply a
distance matrix based on Procrustes distances calculated outside of vegan.
I have not found an example of a design such as this for adonis. However, I
have designed my factors
2018 Mar 30
0
getting all circular arrangements without accounting for order
If one is equal to the reverse of another, keep only one of the pair.
B.
> On Mar 29, 2018, at 9:48 PM, Ranjan Maitra <maitra at email.com> wrote:
>
> Dear friends,
>
> I would like to get all possible arrangements of n objects listed 1:n on a circle.
>
> Now this is easy to do in R. Keep the last spot fixed at n and fill in the rest using permuations(n-1, n-1)
2018 Mar 30
3
getting all circular arrangements without accounting for order
Thanks!
Yes, however, this seems a bit wasteful. Just wondering if there are other, more efficient options possible.
Best wishes,
Ranjan
On Thu, 29 Mar 2018 22:20:19 -0400 Boris Steipe <boris.steipe at utoronto.ca> wrote:
> If one is equal to the reverse of another, keep only one of the pair.
>
> B.
>
>
>
> > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra
2005 Dec 15
3
[LLVMdev] Vector LLVM extension v.s. DirectX Shaders
...ed)
I consider to add new instructions, instead of intrinsic, to LLVM.
However, there are two options.
In the vector LLVM extension, there are dedicated instructions
manipulating the vectors like 'extract', 'combine', and 'permute'. DSP
and other scientific programs do not permuate the vectors as frequent
as 3D programs do. Almost each 3D instruction requires to permuate its
operands. For example:
// Each register is a 4-component vector
// the names of the components are x, y, z, w
add r0.xy, r1.zxyw, r2.yyyy
The components of r1 and r2 and permuted before the additi...
2018 Mar 30
0
getting all circular arrangements without accounting for order
I don't know if this is more efficient than enumerating with distinct
directions and weeding... it seems kind of heavyweight to me:
#######
library(gtools)
directionless_circular_permutations <- function( n ) {
v <- seq.int( n-1 )
ix <- combinations( n-1, 2 )
jx <- permutations( n-3, n-3 )
x <- lapply( seq.int( nrow( ix ) )
, function( i ) {
2008 Dec 11
3
generate combination multiset (set with repetition)
Hi,
This has been asked before but not sufficiently answered from what I
could find. How do you create combinations
with repetitions (multisets) in R?
If I have
> set <- array(1:3)
And I want to choose all combinations of picking 2 numbers, I want to
get a print out like
[,1] [,2]
[1,] 1 1
[2,] 1 2
[3,] 1 3
[4,] 2 2
[5,] 2 3
[6,] 3 3
subsets(set,
2018 Mar 30
2
getting all circular arrangements without accounting for order
Jeff,
I wanted to let you know that your function is faster than generating the directional circular permutations and weeding.
Here is the time for n = 10. I compared with just doing the permutations, there is no point in proceeding further with the weeding since it is slower at the start itself.
system.time(directionless_circular_permutations(10))
user system elapsed
1.576 0.000
2005 Dec 15
0
[LLVMdev] Vector LLVM extension v.s. DirectX Shaders
...ably
stay intrinsics. In general, intrinsics are far easier to add than
instructions.
> In the vector LLVM extension, there are dedicated instructions
> manipulating the vectors like 'extract', 'combine', and 'permute'. DSP
> and other scientific programs do not permuate the vectors as frequent
> as 3D programs do.
Yes, I think that rob is interested in porting these instructions to
mainline LLVM, he just hasn't had time so far.
> Almost each 3D instruction requires to permuate its
> operands. For example:
>
> // Each register is a 4-componen...
2006 Apr 08
0
[LLVMdev] RE: LLVM extension v.s. DirectX Shaders
...should be straight-forward.
Take a look at llvm/include/llvm/IntrinsicsPowerPC.td for examples.
Adding an intrinsic to LLVM now is just a matter of adding it to the
include/llvm/Intrinsics*.td file and adding a line to your code generator
.td file.
> DSP and other scientific programs do not permuate the vectors as
> frequent as 3D programs do. Almost each 3D instruction requires to
> permuate its operands. For example:
>
> // Each register is a 4-component vector
> // the names of the components are x, y, z, w
> add r0.xy, r1.zxyw, r2.yyyy
>
> The components of r1...
2018 Mar 30
0
getting all circular arrangements without accounting for order
New function below is a bit faster due to more efficent memory handling.
for-loop FTW!
directionless_circular_permutations2 <- function( n ) {
n1 <- n - 1L
v <- seq.int( n1 )
ix <- combinations( n1, 2L )
jx <- permutations( n-3L, n-3L )
jxrows <- nrow( jx )
jxoffsets <- seq.int( jxrows )
result <- matrix( n, nrow = factorial( n1 )/2L, ncol = n )
k
1999 Apr 30
1
Question on the idiom: start <- coef; start[fit$pivot] <- coef
I wonder if someone could explain how the following R idiom works (it's
used in
glm.fit).
start <- coef
start[fit$pivot] <- coef
coef is a vector of coefficients, set by .Fortran("dqrls", ...).
fit$pivot is a vector of integer indexes (indicating how dqrls permuted
the columns
of x). If coef has n elements, fit$pivot is a permutation of seq(1,5).
start[fit$pivot]
2015 Mar 12
2
PROBLEMA DE MEMORIA AL HACER PERMUTACIONES
Buenas tardes amigos,
De nuevo por aqui con un incoveniente, tengo el siguiente arreglo:
> MuestraS
[1] 1 0 0 0 1 0 1 1 1 1 1 0
Deseo realizar todas las permutaciones posibles para luego tomar una
muestra aleatoria pequeña, esto lo debo hacer varias veces incrementando el
largo del arreglo "MuestraS".
El inconveniente esta en que al hacer las permutaciones con este arreglo de
12
2010 Apr 24
2
multiple paired t-tests without loops
I am new to R and I suspect my problem is easily solved, but I haven't
been able to figure it out without using loops. I am trying to
implement Blair & Karniski's (1993) permutation test. I've included a
sample data frame below. This data frame represents the conditional
means (C1, C2) for 3 subjects in 2 consecutive samples of a continuous
data set (e.g. ERP waveform).
2002 Mar 18
3
function design
I have a, no doubt, simple question. I wish to write a function such
that
a <- 9
b <- 10
changer _ function(x,y) { if (y>x){ x <<- Y+1}}
Of course there are easier ways to accomplish the task above, but I am
more interested in how to have the "x <<- Y+1" part of the function to
change x in place for purposes of a much larger function.
I have been wrestling with
2005 May 18
2
Call forwarding...
Sorry for posting this again, but it seems to have become attached to
another thread. Guess I replied to another message instead of starting a
new one...
Hi,
I'm trying to setup a call forwarding rule so that when an extention
doesn't answer the call is forwarded to my mobile.
I'm using voiptalk.org for incoming and outgoing calls and SIP phones
for extentions (so all IP based -
2010 Jun 21
2
Garch in the mean
Hello,
I was wondering if anyone knew how to fit a series using a Garch-M (Garch
in the mean) model. From what I gathered from the documentation, it does
not seem to be implemented in either fGarch, fSeries, or tSeries. Perhaps
there is an option that allows this functionality. Otherwise, if it's
possible to modify an existing function I would appreciate any guidance on
how to go about
2006 Oct 16
2
Re : Re : Generate a random bistochastic matrix
Yes, you're right. In fact, it's just an adaptation of a matlab command and the author advises using N^4 replications that's why it's the default in the function. The bistochastic matrix is not my subject of interest, but I need it to perform some random tranformation of a vector of incomes.
Florent Bresson
----- Message d'origine ----
De : Richard M. Heiberger <rmh at
2006 Oct 16
5
Re : Generate a random bistochastic matrix
Thanks, I tried someting like this, but computation takes times for large matrices
btransf <- function(y,X=length(y)^4) {
N <- length(y)
bm <- matrix(rep(1/N,N^2),N,N)
for(j in 1:X){
coord <- sample(1:N,4,replace=T)
d <- runif(1,0,min(bm[coord[1],coord[2]],bm[coord[3],coord[4]]))
2008 Aug 04
16
zpool upgrade wrecked GRUB
Machine is running x86 snv_94 after recent upgrade from opensolaris 2008.05. ZFS and zpool reported no troubles except suggesting upgrade for from ver.10 to ver.11. seemed like a good idea at the time. system up for several days after that point then took down for some unrelated maintenance.
now will not boot the opensol, drops to grub prompt, no menus.
zfs was mirrored on two disks c6d0s0 and