小编Abh*_*ore的帖子

Julia中"Base"关键字的含义是什么?

我在Julia语言文档中看到了这个例子.它使用了一些东西Base.这是什么Base

immutable Squares    
    count::Int    
end

Base.start(::Squares) = 1  
Base.next(S::Squares, state) = (state*state, state+1)  
Base.done(S::Squares, s) = s > S.count;  
Base.eltype(::Type{Squares}) = Int # Note that this is defined for the type  
Base.length(S::Squares) = S.count; 
Run Code Online (Sandbox Code Playgroud)

julia

3
推荐指数
2
解决办法
290
查看次数

标签 统计

julia ×1