_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0-dev.2842 (2017-02-17 17:00 UTC)
_/ |\__'_|_|_|\__'_| | Commit ded2d87* (0 days old master)
|__/ | x86_64-w64-mingw32
julia> Pkg.build("Cxx")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from /Cxx.h:1: | |
In file included from /Users/gnimuc/.julia/dev/Cxx/src/CxxREPL/replpane.jl:68: | |
In file included from /Users/gnimuc/.julia/dev/Cxx/src/CxxREPL/../../deps/src/clang-6.0.0/include/clang/Parse/Parser.h:25: | |
In file included from /Users/gnimuc/.julia/dev/Cxx/src/CxxREPL/../../deps/src/clang-6.0.0/include/clang/Sema/Sema.h:43: | |
/Users/gnimuc/.julia/dev/Cxx/src/CxxREPL/../../deps/src/clang-6.0.0/include/clang/Sema/ExternalSemaSource.h:87:55: error: too few template arguments for class template 'MapVector' | |
virtual void ReadMismatchingDeleteExpressions(llvm::MapVector< | |
^ | |
/Users/gnimuc/Codes/julia/usr/bin/../include/llvm/ADT/MapVector.h:38:7: note: template is declared here | |
class MapVector { | |
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor | |
function juliacn(radius=100; outercircleratio=0.75, innercircleratio=0.65) | |
points = ngon(O, radius, 3, pi/6, vertices=true) | |
fontsize(150) | |
fontface("TamilMN-Bold") | |
setcolor(Luxor.reds[1]...) | |
translate(-63.25, 51.25) | |
text("C", points[1], halign="center", valign="bottom") | |
translate(7, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A = sprand(65535, 65500, 1e-5) | |
v = rand(65500) | |
function foo(A, v) | |
b = zeros(size(A,1)) | |
rows = rowvals(A) | |
vals = nonzeros(A) | |
m, n = size(A) | |
for i = 1:n | |
@inbounds @simd for j in nzrange(A, i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- """ | |
- munkres(costMat) -> Zs | |
- | |
- Find an optimal solution of the assignment problem represented by the square | |
- matrix `costMat`. Return an sparse matrix illustrating the optimal matching. | |
- | |
- # Examples | |
- | |
- ```julia | |
- julia> costMat = ones(3, 3) - eye(3, 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- module Hungarian | |
- | |
- | |
- # Zero markers used in hungarian algorithm | |
- # 0 => NON => Non-zero | |
- # 1 => Z => ordinary zero | |
- # 2 => STAR => starred zero | |
- # 3 => PRIME => primed zero | |
- const NON = Int8(0) | |
- const Z = Int8(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is actually cross-correlation | |
function toyconv(x::AbstractArray{T,3}, w::AbstractArray{T,4}, pad::Integer, _stride::Integer) where T<:Real | |
xSpatialDims = size(x, 1, 2) | |
kernelSpatialDims = size(w, 1, 2) | |
channelNum, kernelNum = size(w, 3, 4) | |
ySpatialDims = 1 .+ (xSpatialDims .+ 2pad .- kernelSpatialDims) .÷ _stride | |
δ = kernelSpatialDims[1] ÷ 2 | |
padSpatialDims = xSpatialDims .+ 2pad | |
xOffset = OffsetArray(x, pad, pad, 0) | |
xPadded = PaddedView(zero(T), xOffset, (padSpatialDims..., channelNum)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function topology(s1::Tuple{Int64,Int64}, s2::Tuple{Int64,Int64}, s3::Tuple{Int64,Int64}, a::Tuple{Int64,Int64}, b::Tuple{Int64,Int64}, c::Tuple{Int64,Int64}) | |
ks1 = (s1[1]+a[1], s1[2]+a[2]) | |
ks2 = (s2[1]+b[1], s2[2]+b[2]) | |
ks3 = (s3[1]+c[1], s3[2]+c[2]) | |
dφ1 = ks2[1] - ks1[1] | |
dr1 = s2[1] - s1[1] | |
dφ2 = ks2[2] - ks3[2] | |
dr2 = s2[2] - s3[2] | |
dφ3 = ks2[2] - ks1[2] | |
# dr3 = dr1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Dierckx | |
function foo() | |
x = [0., 1., 2., 3., 4.] | |
y = [-1., 0., 7., 26., 63.] | |
spl = Spline1D(x, y) | |
a = evaluate(spl, ones(10000)) | |
reshape(a,100,100) | |
end | |
function bar() |