[julia-users] Re: Applied NLA course in Julia

2016-06-21 Thread Dawid Crivelli
@Chris: the Jacobi diagonalization is not included in IterativeSolvers, just the system solving one -- probably they're very close, but I'm not an expert on the topic

[julia-users] Re: Applied NLA course in Julia

2016-06-21 Thread Dawid Crivelli
Thanks for the notes, they look interesting. The Jacobi algorithm coded in Julia by someone competent is also very welcome - I heard it's perfect for tracking the evolution of eigenvalues when a matrix is continuously transformed, but I was too lazy to implement it myself! Probably a dedicated

[julia-users] Re: Creating variables programmatically

2015-11-03 Thread Dawid Crivelli
How about using a dictionary instead of variables, to do something like the following: images = Dict{AbstractString, Image}() # dictionary associating an Image object to a string image["flower"] = imread("flower.png") # made up function name Accessing the dictionary won't significantly

[julia-users] Re: ANN: NearestNeighbors.jl

2015-11-01 Thread Dawid Crivelli
Well done, I've been trying also your package KDTrees.jl which is very useful to have! Is this going to be the backbone for a future fast-multipole-method code?

[julia-users] Re: ANN: NBInclude.jl --- include() for IJulia notebooks

2015-10-13 Thread Dawid Crivelli
Seconded, thank you very much!

[julia-users] Re: Sobol sequence over 2^32 - 1

2015-10-12 Thread Dawid Crivelli
It looks like the Sobol.jl package has not been tested in the most recent version with generating sequences over 2^31 numbers. It starts returning Inf instead of the big numbers of the official version.

[julia-users] Definition of equality

2015-08-21 Thread Dawid Crivelli
How do you define the `==` operator for a new type? If I try and define the `isequal` operator, that definition does not apply to '==': import Base.isequal type inty insideint :: Int end isequal(a :: inty, b :: Int) = a.insideint == b inty(5) == 5# false on Julia Version

Re: [julia-users] question about altering the shape of a 3-d array

2015-08-03 Thread Dawid Crivelli
Oh, that's entirely something different then. I was going to suggest you to take a look at https://github.com/Jutho/TensorOperations.jl for more operations such as the contraction along arbitrary dimensions of tensors written in Julia, since this is very commonly needed in DMRG algorithms.

Re: [julia-users] question about altering the shape of a 3-d array

2015-08-02 Thread Dawid Crivelli
Jim, are you porting DMRG code from Matlab to Julia?

Re: [julia-users] solving large system of complex nonlinear ODEs

2015-05-07 Thread Dawid Crivelli
b) seems more reliable but indeed it seems to only solve equations with real coefficients. Usually reinterpreting the NxN complex coefficient matrix and the N-sized solution vector as 2N (x 2N) sized real matrices/vectors does the trick. The ODE procedures don't care if it's real or complex

[julia-users] Re: unique function Matlab-Julia

2015-04-22 Thread Dawid Crivelli
You can probably get around it, by using the `indexin` function redunant = rand(1:4,10)# [1,3,3,4,3,1,3,3,3,4] slimmed = unique(redunant) # returns in my case [1,2,3,4] indexin(slimmed, redunant) # returns [6, 9, 10], which is one of the possibilities It's almost easier to modify either

[julia-users] Re: Fortran subroutine and Julia

2015-02-11 Thread Dawid Crivelli
Try initializing the c with some value, because right now you are creating an empty array with no storage allocated. a = 100.0 b = 10.0 c = [0.0] # or Array(Float64,1) ppmm = ccall((:multiply_, /home/juser/ManUTD/fortran_try/fsbrtn), Void,(Ptr{Float64},Ptr{Float64},Ptr{Float64}),a,b,c)

Re: [julia-users] Levi-Civita symbol/tensor

2015-02-10 Thread Dawid Crivelli
Thanks for the code – would you be willing to contribute it under the MIT license? Of course, I'm glad it can be of use

Re: [julia-users] Levi-Civita symbol/tensor

2015-02-10 Thread Dawid Crivelli
I have a short code for checking the sign of a permutation for personal use. It's O(L^2) where L is the length of the permutation vector, but it's perfectly fine for L in the few tens range. function sign{T:Integer}(perm::AbstractVector{T}) L = length(perm) crosses = 0 for i = 1:L