Julia 中文文档
作为一个更加具体的例子,一个范用的方阵乘法的伪代码是: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = t calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well C API 也就能够进行更多语言的桥接。(例如在 Python 或是 C# 中 调用 Julia ). 28.1 高级别嵌入 Note: 本节包含可运行在类 Unix 系统上的、使用 C 编写的嵌入式 Julia 代码。Windows 平台请参阅下 一节。 我们从一个简单的 C 程序开始初始化 Julia 并调用一些 Julia 代码: #includeJULIA_DEFINE_FAST_TLS() 0 码力 | 1238 页 | 4.59 MB | 1 年前3Julia v1.2.0 Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = ty `+` calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well Default is 0755 or 0644, de- pending on the blob. 913 914 CHAPTER 79. LIBGIT2 • file_open_flags: bi�lags used to open any files during the checkout. • notify_flags: Flags for what sort of conflicts0 码力 | 1250 页 | 4.29 MB | 1 年前3Julia v1.1.1 Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = ty `+` calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well Default is 0755 or 0644, de- pending on the blob. 885 886 CHAPTER 77. LIBGIT2 • file_open_flags: bi�lags used to open any files during the checkout. • notify_flags: Flags for what sort of conflicts0 码力 | 1216 页 | 4.21 MB | 1 年前3Julia 1.1.0 Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = ty `+` calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well Default is 0755 or 0644, de- pending on the blob. 883 884 CHAPTER 77. LIBGIT2 • file_open_flags: bi�lags used to open any files during the checkout. • notify_flags: Flags for what sort of conflicts0 码力 | 1214 页 | 4.21 MB | 1 年前3Julia 1.2.0 DEV Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = ty `+` calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well Default is 0755 or 0644, de- pending on the blob. 915 916 CHAPTER 80. LIBGIT2 • file_open_flags: bi�lags used to open any files during the checkout. • notify_flags: Flags for what sort of conflicts0 码力 | 1252 页 | 4.28 MB | 1 年前3Julia v1.3.1 Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = ty `+` calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well Default is 0755 or 0644, de- pending on the blob. 923 924 CHAPTER 82. LIBGIT2 • file_open_flags: bi�lags used to open any files during the checkout. • notify_flags: Flags for what sort of conflicts0 码力 | 1276 页 | 4.36 MB | 1 年前3Julia 1.3.0 DEV Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = ty `+` calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well Default is 0755 or 0644, de- pending on the blob. 921 922 CHAPTER 81. LIBGIT2 • file_open_flags: bi�lags used to open any files during the checkout. • notify_flags: Flags for what sort of conflicts0 码力 | 1274 页 | 4.36 MB | 1 年前3Julia 1.8.0 DEV Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = t calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well similar(::SpecialSparseMatrix, ::Type, ::Dims) returns a dense zero matrix. As a consequence, products of bi-, tri- and symmetric tridiagonal matrices with each other result in dense output. Moreover, constructing0 码力 | 1463 页 | 5.01 MB | 1 年前3Julia v1.8.5 Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = t calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well similar(::SpecialSparseMatrix, ::Type, ::Dims) returns a dense zero matrix. As a consequence, products of bi-, tri- and symmetric tridiagonal matrices with each other result in dense output. Moreover, constructing0 码力 | 1565 页 | 5.04 MB | 1 年前3Julia 1.8.4 Documentation
pseudo-code might look like: function matmul(a::AbstractMatrix, b::AbstractMatrix) op = (ai, bi) -> ai * bi + ai * bi ## this is insufficient because it assumes `one(eltype(a))` is constructable: # R = t calls `promote_type` ## but this is not true for some types, such as Bool: # R = promote_type(ai, bi) # this is wrong, since depending on the return value # of type-inference is very brittle (as well similar(::SpecialSparseMatrix, ::Type, ::Dims) returns a dense zero matrix. As a consequence, products of bi-, tri- and symmetric tridiagonal matrices with each other result in dense output. Moreover, constructing0 码力 | 1565 页 | 5.04 MB | 1 年前3
共 87 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9