Skip to content

Commit

Permalink
import Base functions
Browse files Browse the repository at this point in the history
  • Loading branch information
stecrotti committed Mar 28, 2024
1 parent 60c797f commit 2029bde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/periodic_tensor_train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ function PeriodicTensorTrain(tensors::Vector{Array{F,N}}) where {F<:Number, N}
return PeriodicTensorTrain{F,N}(tensors)
end

@forward PeriodicTensorTrain.tensors getindex, iterate, firstindex, lastindex, setindex!,
check_bond_dims, length, eachindex
@forward PeriodicTensorTrain.tensors Base.getindex, Base.iterate, Base.firstindex,
Base.lastindex, Base.setindex!, Base.length, Base.eachindex,
check_bond_dims

"""
flat_periodic_tt(bondsizes::AbstractVector{<:Integer}, q...)
Expand Down
5 changes: 3 additions & 2 deletions src/tensor_train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ function TensorTrain(tensors::Vector{Array{F,N}}) where {F<:Number, N}
end


@forward TensorTrain.tensors getindex, iterate, firstindex, lastindex, setindex!,
check_bond_dims, length, eachindex
@forward TensorTrain.tensors Base.getindex, Base.iterate, Base.firstindex, Base.lastindex,
Base.setindex!, Base.length, Base.eachindex,
check_bond_dims



Expand Down

0 comments on commit 2029bde

Please sign in to comment.