Skip to content

Commit

Permalink
rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed May 16, 2024
1 parent 8621223 commit 11e1f26
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ makedocs(
"Manual" => [
"man/abstractblockarrayinterface.md",
"man/blockarrays.md",
"man/pseudoblockarrays.md",
"man/blockedarrays.md",
],
"API" => [
"lib/public.md",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ A block array layout is specified its _block sizes_ – a tuple of `AbstractArra
## Manual Outline

```@contents
Pages = ["man/abstractblockarrayinterface.md", "man/blockarrays.md", "man/pseudoblockarrays.md"]
Pages = ["man/abstractblockarrayinterface.md", "man/blockarrays.md", "man/blockedarrays.md"]
Depth = 2
```

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/BlockArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ include("blockindices.jl")
include("blockaxis.jl")
include("abstractblockarray.jl")
include("blockarray.jl")
include("pseudo_blockarray.jl")
include("blockedarray.jl")
include("views.jl")
include("blocks.jl")

Expand Down
10 changes: 5 additions & 5 deletions src/pseudo_blockarray.jl → src/blockedarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,17 @@ end
return view(block_arr.blocks, range...)
end

@propagate_inbounds function _pseudoblockindex_getindex(block_arr, blockindex)
@propagate_inbounds function _blockedindex_getindex(block_arr, blockindex)
I = getindex.(axes(block_arr), getindex.(Block.(blockindex.I), blockindex.α))
block_arr.blocks[I...]
end

@propagate_inbounds getindex(block_arr::BlockedArray{T,N}, blockindex::BlockIndex{N}) where {T,N} =
_pseudoblockindex_getindex(block_arr, blockindex)
_blockedindex_getindex(block_arr, blockindex)


@propagate_inbounds getindex(block_arr::BlockedVector{T}, blockindex::BlockIndex{1}) where T =
_pseudoblockindex_getindex(block_arr, blockindex)
_blockedindex_getindex(block_arr, blockindex)

########
# Misc #
Expand Down Expand Up @@ -293,9 +293,9 @@ function ArrayLayouts.rmul!(block_array::BlockedArray, α::Number)
block_array
end

_pseudo_reshape(block_array, axes) = BlockedArray(reshape(block_array.blocks,map(length,axes)),axes)
_blocked_reshape(block_array, axes) = BlockedArray(reshape(block_array.blocks,map(length,axes)),axes)
Base.reshape(block_array::BlockedArray, axes::NTuple{N,AbstractUnitRange{Int}}) where N =
_pseudo_reshape(block_array, axes)
_blocked_reshape(block_array, axes)
Base.reshape(parent::BlockedArray, shp::Tuple{Union{Integer,Base.OneTo}, Vararg{Union{Integer,Base.OneTo}}}) =
reshape(parent, Base.to_shape(shp))
Base.reshape(parent::BlockedArray, dims::Tuple{Int,Vararg{Int}}) =
Expand Down

0 comments on commit 11e1f26

Please sign in to comment.