Re: [julia-users] how to get all combination of rows in array

2016-06-23 Thread programistawpf
BigTHX, W dniu czwartek, 23 czerwca 2016 12:04:40 UTC+2 użytkownik Tamas Papp napisał: > > vcat(unique([A[i,:] for i in 1:size(A,1)])...) > > On Thu, Jun 23 2016, programistawpf wrote: > > > Thx, like below: > > How to crate one matix of result? > > > > julia> unique([A[i,:] for i in 1:size

Re: [julia-users] how to get all combination of rows in array

2016-06-23 Thread Tamas Papp
vcat(unique([A[i,:] for i in 1:size(A,1)])...) On Thu, Jun 23 2016, programistawpf wrote: > Thx, like below: > How to crate one matix of result? > > julia> unique([A[i,:] for i in 1:size(A,1)]) > 10-element Array{Any,1}: > 1x3 Array{Int64,2}: > 0 4 4 > 1x3 Array{Int64,2}: > 4 2 0 > 1x3 A

Re: [julia-users] how to get all combination of rows in array

2016-06-23 Thread programistawpf
Thx, like below: How to crate one matix of result? julia> unique([A[i,:] for i in 1:size(A,1)]) 10-element Array{Any,1}: 1x3 Array{Int64,2}: 0 4 4 1x3 Array{Int64,2}: 4 2 0 1x3 Array{Int64,2}: 1 4 3 1x3 Array{Int64,2}: 2 5 1 1x3 Array{Int64,2}: 2 2 2 1x3 Array{Int64,2}: 2 2

Re: [julia-users] how to get all combination of rows in array

2016-06-23 Thread Tamas Papp
unique([A[i,:] for i in 1:size(A,1)]) you can make it faster by using sub, convert to vectors, etc, depending on what you need it for. On Thu, Jun 23 2016, programistawpf wrote: > how to get all combination of rows in array ? > > 10x3 Array{Int64,2}: > 0 4 4 > 4 2 0 > 1 4 3 > 2 5 1 >

[julia-users] how to get all combination of rows in array

2016-06-23 Thread programistawpf
how to get all combination of rows in array ? 10x3 Array{Int64,2}: 0 4 4 4 2 0 1 4 3 2 5 1 2 2 2 2 2 3 3 0 1 4 1 4 4 4 1 1 3 4 i.e... 001 014 020 ect Paul