Reference
Contents
Index
PartitionedStructures.M_abstract_element_struct.Element_struct
PartitionedStructures.M_abstract_part_struct.AbstractPartitionedStructure
PartitionedStructures.M_elt_mat.Counter_elt_mat
PartitionedStructures.M_elt_mat.DenseEltMat
PartitionedStructures.M_elt_mat.Elt_mat
PartitionedStructures.M_elt_mat.LOEltMat
PartitionedStructures.M_elt_vec.Elt_vec
PartitionedStructures.M_part_mat.Part_LO_mat
PartitionedStructures.M_part_mat.Part_mat
PartitionedStructures.M_part_v.Part_v
PartitionedStructures.ModElemental_elo_bfgs.Elemental_elo_bfgs
PartitionedStructures.ModElemental_elo_sr1.Elemental_elo_sr1
PartitionedStructures.ModElemental_em.Elemental_em
PartitionedStructures.ModElemental_ev.Elemental_elt_vec
PartitionedStructures.ModElemental_plo.Elemental_plo
PartitionedStructures.ModElemental_plo_bfgs.Elemental_plo_bfgs
PartitionedStructures.ModElemental_plo_sr1.Elemental_plo_sr1
PartitionedStructures.ModElemental_pm.Elemental_pm
PartitionedStructures.ModElemental_pv.Elemental_pv
Base.:==
Base.permute!
Base.permute!
PartitionedStructures.Instances.create_epv_eplo
PartitionedStructures.Instances.create_epv_eplo_bfgs
PartitionedStructures.Instances.create_epv_eplo_sr1
PartitionedStructures.Instances.create_epv_epm
PartitionedStructures.Instances.create_epv_epm_rand
PartitionedStructures.Link.eplo_lbfgs_from_epv
PartitionedStructures.Link.eplo_lose_from_epv
PartitionedStructures.Link.eplo_lsr1_from_epv
PartitionedStructures.Link.epm_from_epv
PartitionedStructures.Link.epv_from_eplo
PartitionedStructures.Link.epv_from_epm
PartitionedStructures.Link.mul_epm_epv
PartitionedStructures.Link.mul_epm_epv!
PartitionedStructures.Link.mul_epm_vector
PartitionedStructures.Link.mul_epm_vector!
PartitionedStructures.Link.string_counters_iter
PartitionedStructures.Link.string_counters_total
PartitionedStructures.M_abstract_element_struct.get_indices
PartitionedStructures.M_abstract_element_struct.get_nie
PartitionedStructures.M_abstract_element_struct.set_indices!
PartitionedStructures.M_abstract_element_struct.set_nie!
PartitionedStructures.M_abstract_part_struct.check_epv_epm
PartitionedStructures.M_abstract_part_struct.full_check_epv_epm
PartitionedStructures.M_abstract_part_struct.get_N
PartitionedStructures.M_abstract_part_struct.get_component_list
PartitionedStructures.M_abstract_part_struct.get_ee_struct
PartitionedStructures.M_abstract_part_struct.get_ee_struct
PartitionedStructures.M_abstract_part_struct.get_ee_struct
PartitionedStructures.M_abstract_part_struct.get_n
PartitionedStructures.M_abstract_part_struct.initialize_component_list!
PartitionedStructures.M_elt_mat.get_Bie
PartitionedStructures.M_elt_mat.get_Bsr
PartitionedStructures.M_elt_mat.get_cem
PartitionedStructures.M_elt_mat.get_counter_elt_mat
PartitionedStructures.M_elt_mat.get_current_untouched
PartitionedStructures.M_elt_mat.get_index
PartitionedStructures.M_elt_mat.iter_info
PartitionedStructures.M_elt_mat.total_info
PartitionedStructures.M_elt_mat.update_counter_elt_mat!
PartitionedStructures.M_elt_vec.get_vec
PartitionedStructures.M_elt_vec.set_add_vec!
PartitionedStructures.M_elt_vec.set_minus_vec!
PartitionedStructures.M_elt_vec.set_vec!
PartitionedStructures.M_part_mat.get_L
PartitionedStructures.M_part_mat.get_L
PartitionedStructures.M_part_mat.get_ee_struct_Bie
PartitionedStructures.M_part_mat.get_eelo_set
PartitionedStructures.M_part_mat.get_eelo_set_Bie
PartitionedStructures.M_part_mat.get_eelo_sub_set
PartitionedStructures.M_part_mat.get_permutation
PartitionedStructures.M_part_mat.get_spm
PartitionedStructures.M_part_mat.hard_reset_L!
PartitionedStructures.M_part_mat.hard_reset_spm!
PartitionedStructures.M_part_mat.reset_L!
PartitionedStructures.M_part_mat.reset_spm!
PartitionedStructures.M_part_mat.set_L!
PartitionedStructures.M_part_mat.set_L_to_spm!
PartitionedStructures.M_part_mat.set_eelo_set!
PartitionedStructures.M_part_mat.set_permutation!
PartitionedStructures.M_part_mat.set_spm!
PartitionedStructures.M_part_v.add_v!
PartitionedStructures.M_part_v.build_v
PartitionedStructures.M_part_v.build_v!
PartitionedStructures.M_part_v.build_v!
PartitionedStructures.M_part_v.get_v
PartitionedStructures.M_part_v.reset_v!
PartitionedStructures.M_part_v.set_v!
PartitionedStructures.ModElemental_elo_bfgs.LBFGS_eelo
PartitionedStructures.ModElemental_elo_bfgs.LBFGS_eelo_rand
PartitionedStructures.ModElemental_elo_bfgs.init_eelo_LBFGS
PartitionedStructures.ModElemental_elo_bfgs.reset_eelo_bfgs!
PartitionedStructures.ModElemental_elo_sr1.LSR1_eelo
PartitionedStructures.ModElemental_elo_sr1.LSR1_eelo_rand
PartitionedStructures.ModElemental_elo_sr1.init_eelo_LSR1
PartitionedStructures.ModElemental_elo_sr1.reset_eelo_sr1!
PartitionedStructures.ModElemental_em.create_id_eem
PartitionedStructures.ModElemental_em.fixed_ones_eem
PartitionedStructures.ModElemental_em.identity_eem
PartitionedStructures.ModElemental_em.one_size_bloc
PartitionedStructures.ModElemental_em.ones_eem
PartitionedStructures.ModElemental_ev.create_eev
PartitionedStructures.ModElemental_ev.eev_from_sparse_vec
PartitionedStructures.ModElemental_ev.new_eev
PartitionedStructures.ModElemental_ev.ones_eev
PartitionedStructures.ModElemental_ev.sparse_vec_from_eev
PartitionedStructures.ModElemental_ev.specific_ones_eev
PartitionedStructures.ModElemental_plo.PLBFGSR1_eplo
PartitionedStructures.ModElemental_plo.PLBFGSR1_eplo_rand
PartitionedStructures.ModElemental_plo.identity_eplo_LOSE
PartitionedStructures.ModElemental_plo_bfgs.PLBFGS_eplo
PartitionedStructures.ModElemental_plo_bfgs.PLBFGS_eplo_rand
PartitionedStructures.ModElemental_plo_bfgs.identity_eplo_LBFGS
PartitionedStructures.ModElemental_plo_sr1.PLSR1_eplo
PartitionedStructures.ModElemental_plo_sr1.PLSR1_eplo_rand
PartitionedStructures.ModElemental_plo_sr1.identity_eplo_LSR1
PartitionedStructures.ModElemental_pm.correlated_var
PartitionedStructures.ModElemental_pm.get_eem_set
PartitionedStructures.ModElemental_pm.get_eem_set
PartitionedStructures.ModElemental_pm.get_eem_set_Bie
PartitionedStructures.ModElemental_pm.get_eem_sub_set
PartitionedStructures.ModElemental_pm.identity_epm
PartitionedStructures.ModElemental_pm.identity_epm
PartitionedStructures.ModElemental_pm.n_i_SPS
PartitionedStructures.ModElemental_pm.n_i_sep
PartitionedStructures.ModElemental_pm.ones_epm
PartitionedStructures.ModElemental_pm.ones_epm_and_id
PartitionedStructures.ModElemental_pm.part_mat
PartitionedStructures.ModElemental_pv.add_epv!
PartitionedStructures.ModElemental_pv.create_epv
PartitionedStructures.ModElemental_pv.epv_from_epv!
PartitionedStructures.ModElemental_pv.epv_from_v
PartitionedStructures.ModElemental_pv.epv_from_v!
PartitionedStructures.ModElemental_pv.get_eev_set
PartitionedStructures.ModElemental_pv.get_eev_subset
PartitionedStructures.ModElemental_pv.get_eev_value
PartitionedStructures.ModElemental_pv.minus_epv!
PartitionedStructures.ModElemental_pv.ones_kchained_epv
PartitionedStructures.ModElemental_pv.part_vec
PartitionedStructures.ModElemental_pv.prod_part_vectors
PartitionedStructures.ModElemental_pv.rand_epv
PartitionedStructures.ModElemental_pv.scale_epv
PartitionedStructures.ModElemental_pv.scale_epv!
PartitionedStructures.ModElemental_pv.set_eev!
PartitionedStructures.ModElemental_pv.set_epv!
PartitionedStructures.PartMatInterface.update
PartitionedStructures.PartMatInterface.update!
PartitionedStructures.PartMatInterface.update!
PartitionedStructures.PartMatInterface.update!
PartitionedStructures.PartMatInterface.update!
PartitionedStructures.PartitionedLOQuasiNewton.PLBFGS_update
PartitionedStructures.PartitionedLOQuasiNewton.PLBFGS_update!
PartitionedStructures.PartitionedLOQuasiNewton.PLSE_update
PartitionedStructures.PartitionedLOQuasiNewton.PLSE_update!
PartitionedStructures.PartitionedLOQuasiNewton.PLSR1_update
PartitionedStructures.PartitionedLOQuasiNewton.PLSR1_update!
PartitionedStructures.PartitionedLOQuasiNewton.Part_update
PartitionedStructures.PartitionedLOQuasiNewton.Part_update!
PartitionedStructures.PartitionedQuasiNewton.PBFGS_update
PartitionedStructures.PartitionedQuasiNewton.PBFGS_update!
PartitionedStructures.PartitionedQuasiNewton.PCS_update
PartitionedStructures.PartitionedQuasiNewton.PCS_update!
PartitionedStructures.PartitionedQuasiNewton.PSE_update
PartitionedStructures.PartitionedQuasiNewton.PSE_update!
PartitionedStructures.PartitionedQuasiNewton.PSR1_update
PartitionedStructures.PartitionedQuasiNewton.PSR1_update!
PartitionedStructures.Utils.BFGS
PartitionedStructures.Utils.BFGS!
PartitionedStructures.Utils.SE
PartitionedStructures.Utils.SE!
PartitionedStructures.Utils.SR1
PartitionedStructures.Utils.SR1!
PartitionedStructures.Utils.max_indices
PartitionedStructures.Utils.min_indices
PartitionedStructures.Utils.my_and
PartitionedStructures.M_abstract_part_struct.AbstractPartitionedStructure
— TypeSupertype of every partitioned-structure, ex: Elemental_pv
, Elemental_pm
, Elemental_plo_bfgs
, Internal_pv
...
Base.:==
— Method(==)(ps1::T, ps2::T) where T <: AbstractPartitionedStructure
Return true if both partitioned-structures are composed of the same amont of element-structures, and have the same size.
PartitionedStructures.M_abstract_part_struct.check_epv_epm
— Methodbool = check_epv_epm(epm::Y, epv::Z) where {Y <: AbstractPartitionedStructure, Z <: AbstractPartitionedStructure}
Similar to ==
, but it can compare different partitioned-structures, example: an Elemental_pv
and an Elemental_pm
. check_epv_epm
is a superficial test, see full_check_epv_epm(epm, epv)
for a complete check of the partitioned-structure (i.e. if each element depends of the same variable subset).
PartitionedStructures.M_abstract_part_struct.full_check_epv_epm
— Methodfull_check_epv_epm(ep1::Y, ep2::Z) where {Y <: AbstractPartitionedStructure, Z <: AbstractPartitionedStructure}
Check if each element-structure of both partitioned-structures depend of the same subset of variables.
PartitionedStructures.M_abstract_part_struct.get_N
— Methodget_N(ps::T) where T <: AbstractPartitionedStructure
Return the number of element composing the partitioned-structure ps
.
PartitionedStructures.M_abstract_part_struct.get_component_list
— Methodlist = get_component_list(ps::T) where T <: AbstractPartitionedStructure
ith_component = get_component_list(ps::T, i::Int) where T <: AbstractPartitionedStructure
Return either the list of every element-structure composing the partitioned-structure ps
or the i
-th element-structure of ps
.
PartitionedStructures.M_abstract_part_struct.get_ee_struct
— Methodee_vector = get_ee_struct(eps::AbstractPartitionedStructure{T}) where T
ee = get_ee_struct(eps::AbstractPartitionedStructure{T}, i::Int) where T
Return a vector of every elemental elements fom elemental partitioned-structure eps
or only its i
-th elemental element.
PartitionedStructures.M_abstract_part_struct.get_n
— Methodget_n(ps::T) where T <: AbstractPartitionedStructure
Return the total size of the partitioned-structure ps
.
PartitionedStructures.M_abstract_part_struct.initialize_component_list!
— Methodinitialize_component_list!(ps::T) where T <: AbstractPartitionedStructure)
Build for each variable i (∈ {1,..., n}) the list of elements (⊆ {1,...,N}) being parametrised by i
.
PartitionedStructures.M_abstract_element_struct.Element_struct
— TypeSupertype of every element-structure, ex : Elemental_elt_vec
, Elemental_em
, Elemental_elo_bfgs
, Internal_elt_vec
...
PartitionedStructures.M_abstract_element_struct.get_indices
— Methodindices = get_indices(elt::T) where T <: Element_struct
indice = get_indices(elt::T, i::Int) where T <: Element_struct
Every element-structure is based on a variable subset of a partitioned-structure. get_indices(elt)
retrieves the variable set of an element elt
. get_indices(elt, i)
retrieves the i
-th variable associated to elt
.
PartitionedStructures.M_abstract_element_struct.get_nie
— Methodnie = get_nie(elt::T) where T <: Element_struct
Return the elemental size of the element elt.nie
.
PartitionedStructures.M_abstract_element_struct.set_indices!
— Methodset_indices!(elt::T, indices::Vector{Int}) where T <: Element_struct
Set the indices of the element elt.indices
to indices
.
PartitionedStructures.M_abstract_element_struct.set_nie!
— Methodset_nie!(elt::T, nie::Int) where T <: Element_struct
Set the element size of elt
to nie
.
PartitionedStructures.M_elt_vec.Elt_vec
— TypeSupertype of element-vectors.
PartitionedStructures.M_elt_vec.get_vec
— Methodvec = get_vec(ev::T) where T <: Elt_vec
vec_i = get_vec(ev::T, i::Int) where T <: Elt_vec
Return the vector ev.vec
or ev.vec[i]
from an element-vector.
PartitionedStructures.M_elt_vec.set_add_vec!
— Methodset_add_vec!(ev::T, vec::Vector{Y}) where {T <: Elt_vec, Y <: Number}
Add vec
to the vector ev.vec
of the element-vector ev
.
PartitionedStructures.M_elt_vec.set_minus_vec!
— Methodset_minus_vec!(ev::T) where T <: Elt_vec
Multiply by -1
the vector inside the element-vector ev
.
PartitionedStructures.M_elt_vec.set_vec!
— Methodset_vec!(ev::T, vec::Vector{Y}) where {Y <: Number, T <: Elt_vec{Y}}
set_vec!(ev::T, i::Int, val::Y) where {Y <: Number, T <: Elt_vec{Y}}
Set ev.vec
to vec
or ev.vec[i] = val
of the element-vector ev
.
PartitionedStructures.ModElemental_ev.Elemental_elt_vec
— TypeElemental_elt_vec{T} <: Elt_vec{T}
Represent an elemental element-vector:
indices
retains the indices of the elemental variables;nie
is the elemental size (=length(indices)
);vec
is the current value of the elemental element vector.
PartitionedStructures.ModElemental_ev.create_eev
— Methodeev = create_eev(elt_var::Vector{Int}; type=Float64)
Create a random elemental element-vector eev
from the elemental variables elt_var
. eev
is set to random values.
PartitionedStructures.ModElemental_ev.eev_from_sparse_vec
— Methodeem = eev_from_sparse_vec(sparsevec::SparseVector{T,Y})
Define an elemental element-vector from a sparsevec::SparseVector
. The indices and the values are define with findnz(sparse_vec)
.
PartitionedStructures.ModElemental_ev.new_eev
— Methodeem = new_eev(nᵢ::Int; T=Float64, n=nᵢ^2)
Create an elemental element-vector of size nie
, with random values and whose the indices are within the range 1:n
.
PartitionedStructures.ModElemental_ev.ones_eev
— Methodeem = ones_eev(nᵢ::Int; T=Float64, n=nᵢ^2)
Create an elemental element-vector of size nie
with values set to 1
and whose the indices are within the range 1:n
.
PartitionedStructures.ModElemental_ev.sparse_vec_from_eev
— Methodsp_vec = sparse_vec_from_eev(eev::Elemental_elt_vec{T}; n::Int=maximum(get_indices(eev))) where T
Create a SparseVector
from the element element-vector eev
.
PartitionedStructures.ModElemental_ev.specific_ones_eev
— Methodeem = specific_ones_eev(nie::Int, index::Int; T=Float64, mul::Float64=1.)
Create an elemental element-vector of size nie
, of random values multiplied by mul
and whose indices are in range index:index+nie
.
PartitionedStructures.ModElemental_pv.Elemental_pv
— TypeElemental_pv{T} <: Part_v{T}
Represent an elemental partitioned-vector.
PartitionedStructures.M_part_v.build_v!
— Methodbuild_v!(epv::Elemental_pv{T}) where T
Build the vector epv.v
by accumulating the contribution of each elemental element-vector.
PartitionedStructures.ModElemental_pv.add_epv!
— Methodadd_epv!(epv1::Elemental_pv{T}, epv2::Elemental_pv{T})
Build in place of epv2
the elementwise addition of epv1
and epv2
.
PartitionedStructures.ModElemental_pv.create_epv
— Methodepv = create_epv(sp_set::Vector{SparseVector{T,Y}}; kwargs...) where {T,Y}
epv = create_epv(eev_set::Vector{Elemental_elt_vec{T}}; n=max_indices(eev_set)) where T
Create an elemental partitioned-vector from a vector eev_set
of: SparseVector
, elemental element-vector or a vector of indices.
PartitionedStructures.ModElemental_pv.epv_from_epv!
— Methodepv_from_epv!(epv1::Elemental_pv{T}, epv2::Elemental_pv{T}) where T
Set the elemental partitioned-vector epv1
to epv2
.
PartitionedStructures.ModElemental_pv.epv_from_v!
— Methodepv_from_v!(epv_x::Elemental_pv{T}, x::Vector{T}) where T
Set the values of the element partitioned-vector epv
to x
. Usefull to define Uᵢ x, ∀ i ∈ {1,...,N}.
PartitionedStructures.ModElemental_pv.epv_from_v
— Methodepv = epv_from_v(x::Vector{T}, shape_epv::Elemental_pv{T}) where T
Define a new elemental partitioned-vector from x
that have the same structure than shape_epv
. The value of each elemental element-vector comes from the corresponding indices of x
. Usefull to define Uᵢ x, ∀ x.
PartitionedStructures.ModElemental_pv.get_eev_set
— Methodeev_set = get_eev_set(epv::Elemental_pv{T}) where T
Return either the vector of every elemental element-vector of the elemental partitioned-vector epv
or the i
-th elemental element-vector.
PartitionedStructures.ModElemental_pv.get_eev_subset
— Methodeev_subset = get_eev_subset(epv::Elemental_pv{T}, indices::Vector{Int}) where T
Return a subset of the elemental element vector composing the elemental partitioned-vector epv
. indices
selects the differents elemental element-vector needed.
PartitionedStructures.ModElemental_pv.get_eev_value
— Methodeev_i_value = get_eev_value(epv::Elemental_pv{T}, i::Int) where T
eev_ij_value = get_eev_value(epv::Elemental_pv{T}, i::Int, j::Int) where T
Return either the value of the i
-th elemental element-vector of the elemental partitioned-vector epv
or only the j
-th component of the i
-th elemental element-vector.
PartitionedStructures.ModElemental_pv.minus_epv!
— Methodminus_epv!(epv::Elemental_pv{T}) where T <: Number
Build in place the -epv
, by inversing the value of each elemental element-vector.
PartitionedStructures.ModElemental_pv.ones_kchained_epv
— Methodepv = ones_kchained_epv(N::Int, k::Int; T=Float64)
Construct an elemental partitioned-vector of N
elemental element-vector of size k
which overlaps the next element-vector on k-1
variables.
PartitionedStructures.ModElemental_pv.part_vec
— Methodepv = part_vec(;n::Int=9, T=Float64, nie::Int=5, overlapping::Int=1, mul::Float64=1.)
Define an elemental partitioned-vector formed by N
(deduced from n
and nie
) elemental element-vectors of size nie
. Each elemental element-vector overlaps the previous and the next element by overlapping
.
PartitionedStructures.ModElemental_pv.prod_part_vectors
— Method(acc, res) = prod_part_vectors(epv1::Elemental_pv{T}, epv2::Elemental_pv{T}) where T
Perform an elementwise scalar product between the two elemental partitioned-vector epv1
and epv2
. acc
accumulates the sum of the element-vectors scalar product. res
contrains the details of every element-vector scalar product.
PartitionedStructures.ModElemental_pv.rand_epv
— Methodepv = rand_epv(N::Int,n::Int; nie=3, T=Float64)
Define an elemental partitioned-vector of N
elemental element-vector of size nᵢ
whose values are randoms and the indices are in the range 1:n
.
PartitionedStructures.ModElemental_pv.scale_epv!
— Methodv = scale_epv!(epv::Elemental_pv{T}, scalars::Vector{T}) where T
Return a vector v
from epv
where the contribution of each element-vector is multiply by the corresponding value from scalars
. v
is extract from epv.v
PartitionedStructures.ModElemental_pv.scale_epv
— Methodv = scale_epv(epv::Elemental_pv{T}, scalars::Vector{T}) where T <: Number
Return a vector v
from epv
where the contribution of each element-vector is multiply by the corresponding value from scalars
.
PartitionedStructures.ModElemental_pv.set_eev!
— Methodset_eev!(epv::Elemental_pv{T}, i::Int, vec::Vector{T}) where T
set_eev!(epv::Elemental_pv{T}, i::Int, j::Int, val:: T) where T
Set either the i
-th elemental element-vector epv
to vec
or its j
-th component to val
.
PartitionedStructures.ModElemental_pv.set_epv!
— Methodset_epv!(epv::Elemental_pv{T}, vec_value_eev::Vector{Vector{T}}) where T <: Number
Set the values of the elemental element-vectors of epv
with the components of vec_value_eev
.
PartitionedStructures.M_elt_mat.Counter_elt_mat
— TypeCounter_elt_mat
Count for an element-matrix the updates performed on it, from its allocation. total_update + total_reset + total_untouched == attempt
, .
PartitionedStructures.M_elt_mat.DenseEltMat
— TypeSupertype of every dense element-matrix, ex: Elemental_em
PartitionedStructures.M_elt_mat.Elt_mat
— TypeSupertype of every element-matrix, ex: Elemental_em
, Elemental_elo_sr1
, Elemental_elo_bfgs
PartitionedStructures.M_elt_mat.LOEltMat
— TypeSupertype of every element linear-operator, ex: Elemental_elo_sr1
, Elemental_elo_bfgs
PartitionedStructures.M_elt_mat.get_Bie
— Methodget_Bie(elt_mat::T) where T <: Elt_mat
Return the element-matrix elt_mat.Bie
.
PartitionedStructures.M_elt_mat.get_Bsr
— Methodget_Bsr(elt_mat::T) where T <: Elt_mat
Return the temporary vector elt_mat._Bsr
.
PartitionedStructures.M_elt_mat.get_cem
— Methodcem = get_cem(elt_mat::T) where T <: Elt_mat
Return the Counter_elt_mat
of the elemental element-matrix elt_mat
.
PartitionedStructures.M_elt_mat.get_counter_elt_mat
— Methodcem = get_counter_elt_mat(elt_mat::T) where T <: Elt_mat
Return the Counter_elt_mat
of the elemental element-matrix elt_mat
.
PartitionedStructures.M_elt_mat.get_current_untouched
— Methodindex = get_current_untouched(cem::Counter_elt_mat)
Return index: the number of the last partitioned-updates that did not update the element-matrix elt_mat
. If the last partitioned-update updates elt_mat
then index
will be equal to 0
.
PartitionedStructures.M_elt_mat.get_index
— Methodindex = get_index(elt_mat::T) where T <: Elt_mat
Return index: the number of the last partitioned-updates that did not update the element-matrix elt_mat
. If the last partitioned-update updates elt_mat
then index
will be equal to 0
.
PartitionedStructures.M_elt_mat.iter_info
— Method(current_update, current_untouched, current_reset) = iter_info(cem::Counter_elt_mat)
Return the information about the last partitioned quasi-Newton update applied onto the element counter cem
(associated to an element-matrix).
PartitionedStructures.M_elt_mat.total_info
— Method(total_update, total_untouched, current_reset) = iter_info(cem::Counter_elt_mat)
Return the informations about all the quasi-Newton updates applied onto the element associated to the counter cem
.
PartitionedStructures.M_elt_mat.update_counter_elt_mat!
— Methodupdate_counter_elt_mat!(cem::Counter_elt_mat, qn::Int)
Update the cem
counter given the index qn
from the quasi-Newton update BFGS!, SR1!, SE!.
PartitionedStructures.M_part_mat.Part_LO_mat
— TypeSupertype of every partitioned limited-memory operator, ex: Elemental_plo_bfgs
, Elemental_plo_sr1
, Elemental_plo
.
PartitionedStructures.M_part_mat.Part_mat
— TypeSupertype of every partitioned-matrix, ex: Elemental_pm
, Elemental_plo_bfgs
, Elemental_plo_sr1
, Elemental_plo
.
PartitionedStructures.M_part_mat.get_L
— MethodL = get_L(pm::T) where T <: Part_mat
Return the sparse matrix pm.L
, who aims to store a Cholesky factor. By default pm.L
is not instantiate.
PartitionedStructures.M_part_mat.get_L
— MethodL_ij = get_L(pm::T, i::Int, j::Int) where T <: Part_mat
Return the value pm.L[i,j]
, from the sparse matrix pm.L
.
PartitionedStructures.M_part_mat.get_ee_struct_Bie
— Methodget_ee_struct_Bie(pm::T, i::Int) where T <: Part_mat
Return the i
-th elemental element-matrix of the partitioned-matrix pm
.
PartitionedStructures.M_part_mat.get_eelo_set
— Methodeelo_set = get_eelo_set(plm::T) where T <: Part_LO_mat
eelo = get_eelo_set(plm::T, i::Int) where T <: Part_LO_mat
Return either the vector of every elemental element linear-operator plm.eelo_set
or the i
-th elemental element linear-operator plm.eelo_set[i]
.
PartitionedStructures.M_part_mat.get_eelo_set_Bie
— MethodBie = get_eelo_set_Bie(plm::T, i::Int) where T <: Part_LO_mat
Return the linear-operator of the i
-th elemental element linear-operator of plm
.
PartitionedStructures.M_part_mat.get_eelo_sub_set
— Methodeelo_subset = get_eelo_sub_set(plm::T, indices::Vector{Int}) where T <: Part_LO_mat
Return a subset of the elemental element linear-operators composing the elemental partitioned limited-memory operator plm
. indices
selects the differents elemental element linear-operators needed.
PartitionedStructures.M_part_mat.get_permutation
— Methodperm = get_permutation(pm::T) where T <: Part_mat
Get the current permutation of the partitioned-matrix pm
.
PartitionedStructures.M_part_mat.get_spm
— Methodspm = get_spm(pm::T) where T <: Part_mat
spm_ij = get_spm(pm::T, i::Int, j::Int) where T <: Part_mat
Get either the sparse matrix associated to the partitioned-matrix pm
or pm[i,j]
.
PartitionedStructures.M_part_mat.hard_reset_L!
— Methodhard_reset_L!(pm::T) where T <: Part_mat
Reset the sparse matrix pm.L
.
PartitionedStructures.M_part_mat.hard_reset_spm!
— Methodhard_reset_spm!(pm::T) where T <: Part_mat
Reset the sparse matrix pm.spm
.
PartitionedStructures.M_part_mat.reset_L!
— Methodreset_L!(pm)
Set the elements of sparse matrix pm.L
to 0
.
PartitionedStructures.M_part_mat.reset_spm!
— Methodreset_spm!(pm::T) where {Y <: Number, T <: Part_mat{Y}}
Set the elements of sparse matrix pm.spm
to 0
.
PartitionedStructures.M_part_mat.set_L!
— Methodset_L!(pm::P, i::Int, j::Int, value::T) where {T <: Number, P <: Part_mat{T}}
Set the value of pm.L[i,j] = value
.
PartitionedStructures.M_part_mat.set_L_to_spm!
— Methodset_L_to_spm!(pm::T) where T <: Part_mat
Set the sparse matrix plm.L
to the sparse matrix plm.spm
.
PartitionedStructures.M_part_mat.set_eelo_set!
— Methodset_eelo_set!(eplo::P, i::Int, eelo::Y) where {T, P <: Part_LO_mat{T}, Y <: LOEltMat{T}}
Set the i
-th elemental element linear-operator eplo.eelo
to eelo
.
PartitionedStructures.M_part_mat.set_permutation!
— Methodset_permutation!(pm::T, perm::Vector{Int}) where T <: Part_mat
Set the permutation of the partitioned-matrix pm
to perm
.
PartitionedStructures.M_part_mat.set_spm!
— Methodset_spm!(pm::P) where {T <: Number, P <: Part_mat{T}}
Build the sparse matrix of the partitioned-matrix pm
in pm.spm
by gathering the contribution of every element-matrix. The sparse matrix is built with respect to the indices of each elemental element linear-operator.
PartitionedStructures.M_part_v.Part_v
— TypeSupertype of every partitioned-vectors, ex : Elementaleltvec, Internaleltvec.
PartitionedStructures.M_part_v.add_v!
— Methodadd_v!(pv::T, i::Int, value::Y) where {Y, T <: Part_v{Y}}
add_v!(pv::T, indices::Vector{Int}, values::Vector{Y}) where {Y, T <: Part_v{Y}}
Add value
(resp values
) to the vector of the partitioned-vector pv.v
at the indice i
(resp indices
).
PartitionedStructures.M_part_v.build_v!
— Methodbuild_v!(pv::T) where T <: Part_v
Accumulate in pv.v
the contributions of every element-vector of the partitioned-vector pv
.
PartitionedStructures.M_part_v.build_v
— Methodvec = build_v(pv::T) where T <: Part_v
Build the vector v = pv.v
by accumulating inside pv.v
the contributions of every element-vector of the partitioned-vector pv
.
PartitionedStructures.M_part_v.get_v
— Methodv = get_v(pv::T) where T <: Part_v
Return the vector pv.v
of the partitioned-vector pv
.
PartitionedStructures.M_part_v.reset_v!
— Methodreset_v!(pv::T) where {Y, T <: Part_v{Y}}
Reset the vector embedded in the partitioned-vector pv
, i.e. pv.v .= (Y)(0)
.
PartitionedStructures.M_part_v.set_v!
— Methodset_v!(pv::T, v::Vector{Y}) where {Y, T <: Part_v{Y}}
set_v!(pv::T, i::Int, value::Y) where {Y, T <: Part_v{Y}}
Set the components of the vector pv.v
(resp. pv.v[i]
) from the partitioned-vector pv
to the vector v
(resp. value
).
PartitionedStructures.ModElemental_pm.Elemental_pm
— TypeElemental_pm{T} <: Part_mat{T}
Represent an elemental partitioned quasi-Newton linear-operator. Each element is an elemental element-matrix which may apply a BFGS or a SR1 update. N
is the number of elements. n
is the size of the elemental partitioned limited-memory operator. eelo_set
is the set of elemental element linear-operators. spm
and L
are sparse matrices either to form the sparse matrix gathering the elements or the Cholesky factor of spm
. component_list
summarizes for each variable i (∈ {1,..., n}) the list of elements (⊆ {1,...,N}) being parametrised by i
. permutation
is the current permutation of the elemental partitioned limited-memory operator ([1:n;]
initially).
Base.permute!
— Methodpermute!(epm::Elemental_pm{T}, p::Vector{Int}) where T
Apply the permutation p
to the elemental partitionned matrix epm
. The permutation is applied to every elemental element-matrix eem
via indices
. The current epm
permutation is stored in epm.permutation
.
PartitionedStructures.M_abstract_part_struct.get_ee_struct
— Methodeem_set = get_ee_struct(epm::Elemental_pm{T}) where T
Return the vector of every elemental element-matrices epm.eem_set
.
PartitionedStructures.M_abstract_part_struct.get_ee_struct
— Methodeem = get_ee_struct(epm::Elemental_pm{T}, i::Int) where T
Return the i
-th elemental element-matrix epm.eem_set[i]
.
PartitionedStructures.ModElemental_pm.correlated_var
— Methodcorrelated_var(epm::Elemental_pm{T}, i::Int) where T
Gather all the variables appearing in the elements also paramtrized by the i
-th variable.
PartitionedStructures.ModElemental_pm.get_eem_set
— Methodeem_set = get_eem_set(epm::Elemental_pm{T}) where T
Return the vector of every elemental element-matrices epm.eem_set
.
PartitionedStructures.ModElemental_pm.get_eem_set
— Methodeem = get_eem_set(epm::Elemental_pm{T}, i::Int) where T
Return the i
-th elemental element-matrix epm.eem_set[i]
.
PartitionedStructures.ModElemental_pm.get_eem_set_Bie
— MethodBie = get_eem_set_Bie(get_eem_set_Bie(epm::Elemental_pm{T}, i::Int) where T
Get the matrix of the i
-th elemental element-matrix of epm
.
PartitionedStructures.ModElemental_pm.get_eem_sub_set
— Methodeem_subset = get_eem_sub_set(epm::Elemental_pm{T}, indices::Vector{Int}) where T
Return a subset of elemental element-matrices composing epm
. indices
selects the different elemental element-matrices needed.
PartitionedStructures.ModElemental_pm.identity_epm
— Methodepm = identity_epm(N::Int, n::Int; T=Float64, nie::Int=5, linear_vector::Vector{Bool} = zeros(Bool, N))
Return a partitionned matrix of type T
of N
identity elemental element-matrices. Each elemental element-matrix is of size nie
with randoms positions. linear_vector
indicates which element linear-opeartor should not contribute to the partitioned linear-operator.
PartitionedStructures.ModElemental_pm.identity_epm
— Methodepm = identity_epm(element_variables::Vector{Vector{Int}}; N::Int=length(element_variables), n::Int=max_indices(element_variables), T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N))
epm = identity_epm(element_variables::Vector{Vector{Int}}, N::Int, n::Int; T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N))
Return a partitionned matrix of type T
of N
identity elemental element-matrices. N
and n
may be extrapolate from element_variables
. The elemental variables are based from the indices informed in element_variables
. linear_vector
indicates which element linear-opeartor should not contribute to the partitioned linear-operator.
PartitionedStructures.ModElemental_pm.n_i_SPS
— Methodepm = n_i_SPS(n::Int; T=Float64, nie::Int=5, overlapping::Int=1, mul=5.)
Define an elemental partitioned-matrix epm
of size n
. The partitioned-matrix is composed by N ≈ (n/nie)*2
elemental element-matrices, of size nie
, they overlap onto the next element by overlapping
. The diagonal terms of each elemental element-matrix are of value mul
, whereas the other terms are set to 1.
PartitionedStructures.ModElemental_pm.n_i_sep
— Methodepm = n_i_sep(n::Int; T=Float64, nie::Int=5, mul=5.)
Define an elemental partitioned-matrix epm
composed of nie
separable blocs. Each elemental element-matrix is composed of 1
except the diagonal terms which are of value mul
.
PartitionedStructures.ModElemental_pm.ones_epm
— Methodepm = ones_epm(N::Int, n::Int; T=Float64, nie::Int=5)
Create a partitionned matrix of type T
of N
elemental element-matrices ones(nie, nie)
whose positions are random. The partitionned matrix created may be singular.
PartitionedStructures.ModElemental_pm.ones_epm_and_id
— Methodepm = ones_epm_and_id(N::Int, n::Int; T=Float64, nie::Int=5)
Create a partitionned matrix of type T
with N+n
elemental element-matrices. The first N
elemental element-matrices are ones(nie, nie)
with randoms positions in the range 1:n
. The remaining n
elemental element-matrices are of size 1, with value [1], they are placed in the diagonal terms This way, the partitionned matrix is generally not singular.
PartitionedStructures.ModElemental_pm.part_mat
— Methodepm = part_mat(;n::Int=9, T=Float64, nie::Int=5, overlapping::Int=1, mul=5.)
Define an elemental partitioned-matrix epm
composed of N
(deduced from n
and nie
) elemental element-matrices of size nie
. Each elemental element-matrix overlaps the previous and the next element by overlapping
.
PartitionedStructures.ModElemental_em.Elemental_em
— TypeElemental_em{T} <: DenseEltMat{T}
Represent an elemental element-matrix. It has fields:
indices
: indices of elemental variables;nie
: elemental size (=length(indices)
);Bie::Symmetric{T, Matrix{T}}
: the elemental matrix;counter
: counts how many update the elemental matrix goes through from its allocation;convex
: ifconvex==true
, thenElemental_em
default update is BFGS otherwise it is SR1;linear
: iflinear==true
, then the element matrix contribution is null;_Bsr
: a vector used during quasi-Newton update of the elemental matrix.
Base.permute!
— Methodpermute!(eem::Elemental_em{T}, p::Vector{Int}) where T
Set the indices of the element variables of eem
to p
. Must be use with caution.
PartitionedStructures.ModElemental_em.create_id_eem
— Methodeem = create_id_eem(elt_var::Vector{Int}; T=Float64)
Create a nie
identity elemental element-matrix of type T
based on the vector of the elemental variables elt_var
.
PartitionedStructures.ModElemental_em.fixed_ones_eem
— Methodeem = fixed_ones_eem(i::Int, nie::Int; T=Float64, mul=5.)
Create a nie
elemental element-matrix of type T
at indices index:index+nie-1
. All the components of the element-matrix are set to 1
except the diagonal terms that are set to mul
. This method is used to define diagonal dominant element-matrix.
PartitionedStructures.ModElemental_em.identity_eem
— Methodeem = identity_eem(nie::Int; T=Float64, n=nie^2)
Return a nie
identity elemental element-matrix of type T
from nie
random indices in the range 1:n
.
PartitionedStructures.ModElemental_em.one_size_bloc
— Methodeem = one_size_bloc(index::Int; T=Float64)
Return an elemental element-matrix of type T
of size one at index
.
PartitionedStructures.ModElemental_em.ones_eem
— Methodeem = ones_eem(nie::Int; T=Float64, n=nie^2)
Return a nie
ones elemental element-matrix of type T
from nie
random indices in the range 1:n
.
PartitionedStructures.Utils.BFGS!
— MethodBFGS!(x0::Vector{Y}, x1::Vector{Y}, g0::Vector{Y}, g1::Vector{Y}, B0::Array{Y,2}; kwargs...) where Y <: Number
BFGS!(s::Vector{Y}, y::Vector{Y}, B::Symmetric{Y,Matrix{Y}}; kwargs...) where Y <: Number
BFGS!(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}; index=0, reset=4, kwargs...)
Perform the BFGS update in place of the matrix B1
by using the vectors s = x1 - x0
and y = g1 - g0
and the current matrix B0
.
PartitionedStructures.Utils.BFGS
— MethodBFGS(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
BFGS(x0::Vector{Y}, x1::Vector{Y}, g0::Vector{Y}, g1::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
Perform the BFGS update over the matrix B
by using the vectors s = x1 - x0
and y = g1 - g0
.
PartitionedStructures.Utils.SE!
— MethodSE!(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
SE!(x::Vector{Y}, x1::Vector{Y}, g::Vector{Y}, g1::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
SE!(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}, B1::Array{Y,2}; index=0, reset=4, ω = 1e-6, kwargs...)
Perform a BFGS update in place of B1
by using the matrix B
, the vectors s = x1 - x0
and y = g1 - g0
if the curvature condition dot(s,y) > eps(eltype(s))
holds. Otherwise, it performs a SR1 update onto B1
with B, s, y
.
PartitionedStructures.Utils.SE
— MethodSE(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
SE(x::Vector{Y}, x1::Vector{Y}, g::Vector{Y}, g1::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
Perform a BFGS update over the matrix B
by using the vectors s = x1 - x0
and y = g1 - g0
if the curvature condition dot(s,y) > eps(eltype(s))
holds. Otherwise, it performs a SR1 update with B, s, y
.
PartitionedStructures.Utils.SR1!
— MethodSR1!(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
SR1!(x::Vector{Y}, x1::Vector{Y}, g::Vector{Y}, g1::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
SR1!(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}, B1::Array{Y,2}; index=0, reset=4, ω = 1e-6, kwargs...)
Perform the SR1 update in place of the matrix B1
by using the vectors s = x1 - x0
and y = g1 - g0
and the current matrix B
.
PartitionedStructures.Utils.SR1
— MethodSR1(s::Vector{Y}, y::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
SR1(x::Vector{Y}, x1::Vector{Y}, g::Vector{Y}, g1::Vector{Y}, B::Array{Y,2}; kwargs...) where Y <: Number
Perform the SR1 update over the matrix B
by using the vectors s = x1 - x0
and y = g1 - g0
.
PartitionedStructures.Utils.max_indices
— Methodindice_max = max_indices(list_of_element_variables::Vector{Vector{T}}) where T
indice_max = max_indices(elt_set::Vector{T}) where T <: Element_struct
Return the maximum index of the element variables in list_of_element_variables
or in elt_set
.
PartitionedStructures.Utils.min_indices
— Methodindice_min = min_indices(list_of_element_variables::Vector{Vector{T}}) where T
indice_min = min_indices(elt_set::Vector{T}) where T <: Element_struct
Return the minimum index of the element variables in list_of_element_variables
or in elt_set
.
PartitionedStructures.Utils.my_and
— Functionmy_and(a::Bool, b::Bool)
Return a && b
.
PartitionedStructures.Link.eplo_lbfgs_from_epv
— Methodeplo = eplo_lbfgs_from_epv(epv::T) where {Y <: Number, T <: Elemental_pv{Y}}
Create an elemental limited-memory partitioned quasi-Newton operator PLBFGS eplo
with the same partitioned structure than epv
. Each element linear-operator of eplo
is set to a LBFGSOperator
of suitable size.
PartitionedStructures.Link.eplo_lose_from_epv
— Methodeplo = eplo_lose_from_epv(epv::Elemental_pv{T}) where {T <: Number}
Create an elemental limited-memory partitioned quasi-Newton operator PLSE eplo
with the same partitioned structure than epv
. Each element linear-operator of eplo
is set to a LBFGSOperator
of suitable size, but it may change to a LSR1Operator
later on.
PartitionedStructures.Link.eplo_lsr1_from_epv
— Methodeplo = eplo_lsr1_from_epv(epv::T) where {Y <: Number, T <: Elemental_pv{Y}}
Create an elemental limited-memory partitioned quasi-Newton operator PLSR1 eplo
with the same partitioned structure than epv
. Each element linear-operator of eplo
is set to a LSR1Operator
of suitable size.
PartitionedStructures.Link.epm_from_epv
— Methodepm = epm_from_epv(epv::T) where {Y <: Number, T <: Elemental_pv{Y}}
Create an elemental partitioned quasi-Newton operator epm
with the same partitioned structure than epv
. Each element-matrix of epm
is set with an identity matrix of suitable size.
PartitionedStructures.Link.epv_from_eplo
— Methodepv = epv_from_eplo(eplo::T) where T <: Part_mat{Y}
Create an elemental partitioned-vector epv
with the same partitioned structure than eplo
. Each element-vector of epv
is set to a random vector of suitable size. Make a name difference with the method epv_from_epm()
.
PartitionedStructures.Link.epv_from_epm
— Methodepv = epv_from_epm(epm::T) where T <: Part_mat{Y}
Create an elemental partitioned-vector epv
with the same partitioned structure than epm
. Each element-vector of epv
is set to a random vector of suitable size.
PartitionedStructures.Link.mul_epm_epv!
— Methodmul_epm_epv!(epv_res::Elemental_pv{Y}, epm::T, epv::Elemental_pv{Y}) where {Y <: Number, T <: Part_mat{Y}}
Compute the elementwise product between the elemental partitioned-matrix epm
and the elemental partitioned-vector epv
. The result of each element-matrix element-vector product is stored in the elemental partitioned-vector epv_res
.
PartitionedStructures.Link.mul_epm_epv
— Methodepv_res = mul_epm_epv(epm::T, epv::Elemental_pv{Y}) where {Y <: Number, T <: Part_mat{Y}}
Compute the elementwise product between the elemental partitioned-matrix epm
and the elemental partitioned-vector epv
. The result is an elemental partitioned-vector epv_res
storing the elementwise products between epm
and epv
.
PartitionedStructures.Link.mul_epm_vector!
— Methodmul_epm_vector!(res::Vector{Y}, epm::T, x::Vector{Y}) where {Y <: Number, T <: Part_mat{Y}}
mul_epm_vector!(res::Vector{Y}, epm::T, epv::Elemental_pv{Y}, x::Vector{Y}) where {Y <: Number, T <: Part_mat{Y}}
Compute the product between the elemental partitioned-matrix epm
and the vector x
. The method uses temporary the elemental partitioned-vector epv
. The result is stored in res
, a vector similar to x
.
PartitionedStructures.Link.mul_epm_vector
— Methodresult = mul_epm_vector(epm::T, x::Vector{Y}) where {Y <: Number, T <: Part_mat{Y}}
result = mul_epm_vector(epm::T, epv::Elemental_pv{Y}, x::Vector{Y}) where {Y <: Number, T <: Part_mat{Y}}
Compute the product between the elemental partitioned-matrix epm <: Part_mat
and the vector x
. The method uses temporary the elemental partitioned-vector epv
. The method returns result
, a vector similar to x
.
PartitionedStructures.Link.string_counters_iter
— Methods = string_counters_iter(pm::T; name = :PQN) where {T <: Part_mat}
Produce s::String
that summarizes the partitioned update applied onto pm
at the last iterate. The method accumulates the informations gathered by each element-counter during the last iterate.
PartitionedStructures.Link.string_counters_total
— Methods = string_counters_total(pm::T; name = :PQN) where {T <: Part_mat}
Produce s::String
that summarizes the partitioned update applied onto pm
since its allocations. The method accumulates the informations gathered by each element-counter since their allocations.
PartitionedStructures.PartitionedQuasiNewton.PBFGS_update!
— MethodPBFGS_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
PBFGS_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, epv_s::Elemental_pv{T}; verbose=true, kwargs...) where T
Perform the PBFGS update onto the elemental partitioned-matrix epm_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
.
PartitionedStructures.PartitionedQuasiNewton.PBFGS_update
— Methodcopy_epm_B = PBFGS_update(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
Perform the PBFGS update onto a copy of the elemental partitioned-matrix epm_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Return the updated copy of epm_B
.
PartitionedStructures.PartitionedQuasiNewton.PCS_update!
— MethodPCS_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
PCS_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, epv_s::Elemental_pv{T}; verbose=true, kwargs...) where T
Perform the PCS update onto the elemental partitioned-matrix epm_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
.
PartitionedStructures.PartitionedQuasiNewton.PCS_update
— MethodB = PCS_update(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
Perform the PCS update onto a copy of the elemental partitioned-matrix epm_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Each elemental element-matrix eem
is update given its convex
field, if convex==true
the elemental element-matrix eem
is update with BFGS otherwise it is SR1.
PartitionedStructures.PartitionedQuasiNewton.PSE_update!
— MethodPSE_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
PSE_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, epv_s::Elemental_pv{T}; verbose=true, kwargs...) where T
Perform the PSE update onto the elemental partitioned-matrix epm_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
.
PartitionedStructures.PartitionedQuasiNewton.PSE_update
— Methodcopy_epm_B = PSE_update(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
Perform the PSE update onto a copy of the elemental partitioned-matrix epm_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Return the updated copy of epm_B
.
PartitionedStructures.PartitionedQuasiNewton.PSR1_update!
— MethodPSR1_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
PSR1_update!(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, epv_s::Elemental_pv{T}; verbose=true, kwargs...) where T
Performs the PSR1 update onto the elemental partitioned-matrix epm_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
.
PartitionedStructures.PartitionedQuasiNewton.PSR1_update
— Methodcopy_epm_B = PSR1_update(epm_B::Elemental_pm{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
Perform the PSR1 update onto a copy of the elemental partitioned-matrix epm_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Return the updated copy of epm_B
.
PartitionedStructures.PartitionedLOQuasiNewton.PLBFGS_update!
— MethodPLBFGS_update!(eplo_B::Elemental_plo_bfgs{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
PLBFGS_update!(eplo_B::Elemental_plo_bfgs{T}, epv_y::Elemental_pv{T}, epv_s::Elemental_pv{T}; verbose=true, reset=true, kwargs...) where T
Perform the PLBFGS update onto the partitioned limited-memory operator eplo_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
.
PartitionedStructures.PartitionedLOQuasiNewton.PLBFGS_update
— Methodcopy_eplo_B = PLBFGS_update(eplo_B::Elemental_plo_bfgs{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
Perform the PLBFGS update onto a copy of the partitioned limited-memory operator eplo_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Return the updated copy of eplo_B
.
PartitionedStructures.PartitionedLOQuasiNewton.PLSE_update!
— MethodPLSE_update!(eplo_B::Y, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where {T, Y <: Part_LO_mat{T}}
PLSE_update!(eplo_B::Y, epv_y::Elemental_pv{T}, epv_s::Elemental_pv{T}; ω = 1e-6, verbose=true, reset=4, kwargs...) where {T, Y <: Part_LO_mat{T}}
Perform the partitionned update PLSE onto the partitioned limited-memory operator eplo_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
. Each element linear-operator from eplo_B
is either a LBFGSOperator
or LSR1Operator
. The update tries to apply a LBFGS update to every Bᵢ, but if the curvature condition yᵢᵀUᵢs > 0 is not satisfied it replaces the LBFGSOperator
by a LSR1Operator
and applies a LSR1 update. If Bᵢ is initally a LSR1Opeartor, we replace it by a LBFGSOperator
if the curvature condition yᵢᵀUᵢs > 0 holds and we update it, otherwise the LSR1Operator
Bᵢ is update.
PartitionedStructures.PartitionedLOQuasiNewton.PLSE_update
— Methodcopy_eplo_B = PLSE_update(eplo_B::Y, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where {T, Y <: Part_LO_mat{T}}
Perform the partitionned update PLSE onto a copy of the partitioned limited-memory operator eplo_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Each element linear-operator from eplo_B
is either a LBFGSOperator
or LSR1Operator
. The update tries to apply a LBFGS update to every Bᵢ, but if the curvature condition yᵢᵀUᵢs > 0 is not satisfied it replaces the LBFGSOperator
by a LSR1Operator
and applies a LSR1 update. If Bᵢ is initally a LSR1Opeartor, we replace it by a LBFGSOperator
if the curvature condition yᵢᵀUᵢs > 0 holds and we update it, otherwise the LSR1Operator
Bᵢ is update. Return the updated copy of eplo_B
.
PartitionedStructures.PartitionedLOQuasiNewton.PLSR1_update!
— MethodPLSR1_update!(eplo_B::Elemental_plo_sr1{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
PLSR1_update!(eplo_B::Elemental_plo_sr1{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
Perform the PLSR1 update onto the partitioned limited-memory operator eplo_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
.
PartitionedStructures.PartitionedLOQuasiNewton.PLSR1_update
— Methodcopy_eplo_B = PLSR1_update(eplo_B::Elemental_plo_sr1{T}, epv_y::Elemental_pv{T}, s::Vector{T}; kwargs...) where T
Perform the PSR1 update onto a copy of the partitioned limited-memory operator eplo_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Return the updated copy of eplo_B
.
PartitionedStructures.PartitionedLOQuasiNewton.Part_update!
— MethodPart_update!(eplo_B::Y, epv_y::Elemental_pv{T}, s::Vector{T}) where {T, Y <: Part_LO_mat{T}}
Part_update!(eplo_B::Y, epv_y::Elemental_pv{T}, epv_s::Elemental_pv{T}; kwargs...) where {T, Y <: Part_LO_mat{T}}
Perform a partitioned quasi-Newton update onto the partitioned limited-memory operator eplo_B
, given the step s
(or the element-steps epv_s
) and the difference of elemental partitioned-gradients epv_y
. Each elemental element linear-operator from eplo_B
is either a LBFGSOperator
or LSR1Operator
. The update performs on each element the quasi-Newton update associated to the linear-operator.
PartitionedStructures.PartitionedLOQuasiNewton.Part_update
— Methodcopy_eplo_B = Part_update(eplo_B::Y, epv_y::Elemental_pv{T}, s::Vector{T}) where {T, Y <: Part_LO_mat{T}}
Perform a quasi-Newton partitionned update onto a copy of the partitioned limited-memory operator eplo_B
, given the step s
and the difference of elemental partitioned-gradients epv_y
. Each elemental element linear-operator from eplo_B
is either a LBFGSOperator
or LSR1Operator
. The update performs on each element the quasi-Newton update associated to the linear-operator. Return the updated copy of eplo_B
.
PartitionedStructures.ModElemental_elo_bfgs.Elemental_elo_bfgs
— TypeElemental_elo_bfgs{T} <: LOEltMat{T}
Represent an elemental element LBFGSOperator
:
indices
retains the indices of the elemental variables;nie
is the elemental size (=length(indices)
);Bie
aLBFGSOperator
;linear
: iflinear==true
, then the element matrix contribution is null;counter
counts how many update the elemental limited-memory operator goes through from its allocation.
PartitionedStructures.ModElemental_elo_bfgs.LBFGS_eelo
— Methodeelo = LBFGS_eelo(nie::Int; T=Float64, index=1)
Return an Elemental_elo_bfgs
of type T
of size nie
, the indices are all the values in the range index:index+nie-1
.
PartitionedStructures.ModElemental_elo_bfgs.LBFGS_eelo_rand
— Methodeelo = LBFGS_eelo_rand(nie::Int; T=Float64, n=nie^2)
Return an Elemental_elo_bfgs
of type T
with nie
random indices within the range 1:n
.
PartitionedStructures.ModElemental_elo_bfgs.init_eelo_LBFGS
— Methodeelo = init_eelo_LBFGS(elt_var::Vector{Int}; T=Float64, mem=5)
Return an Elemental_elo_bfgs
of type T
based on the vector of the elemental variableselt_var
.
PartitionedStructures.ModElemental_elo_bfgs.reset_eelo_bfgs!
— Methodreset_eelo_bfgs!(eelo::Elemental_elo_bfgs{T}) where T <: Number
Reset the LBFGS linear-operator of the elemental element linear-operator eelo
.
PartitionedStructures.ModElemental_plo_bfgs.Elemental_plo_bfgs
— TypeElemental_plo_bfgs{T} <: Part_LO_mat{T}
Represent an elemental partitioned quasi-Newton limited-memory operator PLBFGS. Each element is an elemental element LBFGSOperator
. N
is the number of elements. n
is the size of the elemental partitioned limited-memory operator. eelo_set
is the set of elemental element linear-operators. spm
and L
are sparse matrices either to form the sparse matrix gathering the elements or the Cholesky factor of spm
. component_list
summarizes for each variable i (∈ {1,..., n}) the list of elements (⊆ {1,...,N}) being parametrised by i
. permutation
is the current permutation of the elemental partitioned limited-memory operator ([1:n;]
initially).
PartitionedStructures.ModElemental_plo_bfgs.PLBFGS_eplo
— Methodeplo = PLBFGS_eplo(; n::Int=9, T=Float64, nie::Int=5, overlapping::Int=1)
Return an elemental partitioned limited-memory operator PLBFGS of N
(deduced from n
and nie
) elemental element linear-operators. Each element overlaps the coordinates of the next element by overlapping
components.
PartitionedStructures.ModElemental_plo_bfgs.PLBFGS_eplo_rand
— Methodeplo = PLBFGS_eplo_rand(N::Int, n::Int; T=Float64, nie::Int=5)
Return an elemental partitioned limited-memory operator PLBFGS of N
elemental element linear-operators. The size of each element is nie
, whose positions are random in the range 1:n
.
PartitionedStructures.ModElemental_plo_bfgs.identity_eplo_LBFGS
— Methodeplo = identity_eplo_LBFGS(element_variables::Vector{Vector{Int}}; N::Int=length(element_variables), n::Int=max_indices(element_variables), T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N), mem=5)
eplo = identity_eplo_LBFGS(element_variables::Vector{Vector{Int}}, N::Int, n::Int; T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N), mem=5)
Return an elemental partitioned limited-memory operator PLBFGS of N
elemental element linear-operators. The positions are given by the vector of the element variables element_variables
. linear_vector
indicates which element linear-opeartor should not contribute to the partitioned linear-operator.
PartitionedStructures.ModElemental_elo_sr1.Elemental_elo_sr1
— TypeElemental_elo_sr1{T} <: LOEltMat{T}
Represent an elemental element LSR1Operator
;
indices
retains the indices of the elemental variables;nie
is the elemental size (=length(indices)
);Bie
aLSR1Operator
;linear
: iflinear==true
, then the element matrix contribution is null;counter
counts how many update the elemental limited-memory operator goes through from its allocation.
PartitionedStructures.ModElemental_elo_sr1.LSR1_eelo
— Methodeelo = LSR1_eelo(nie::Int; T=Float64, index=1)
Return an Elemental_elo_sr1
of type T
of size nie
, the indices are all the values in the range index:index+nie-1
.
PartitionedStructures.ModElemental_elo_sr1.LSR1_eelo_rand
— Methodeelo = LSR1_eelo_rand(nie::Int; T=Float64, n=nie^2)
Return an Elemental_elo_sr1
of type T
with nie
random indices within the range 1:n
.
PartitionedStructures.ModElemental_elo_sr1.init_eelo_LSR1
— Methodeelo = init_eelo_LSR1(elt_var::Vector{Int}; T=Float64, mem=5)
Return an Elemental_elo_sr1
of type T
based on the vector of the elemental variables elt_var
.
PartitionedStructures.ModElemental_elo_sr1.reset_eelo_sr1!
— Methodreset_eelo_sr1!(eelo::Elemental_elo_sr1{T}) where T <: Number
Reset the LSR1 linear-operator of the elemental element linear-operator matrix eelo
.
PartitionedStructures.ModElemental_plo_sr1.Elemental_plo_sr1
— TypeElemental_plo_sr1{T} <: Part_LO_mat{T}
Represent an elemental partitioned quasi-Newton limited-memory operator PLSR1. Each element is an elemental element LSR1Operator
. N
is the number of elements. n
is the size of the elemental partitioned limited-memory operator. eelo_set
is the set of elemental element linear-operators. spm
and L
are sparse matrices either to form the sparse matrix gathering the elements or the Cholesky factor of spm
. component_list
summarizes for each variable i (∈ {1,..., n}) the list of elements (⊆ {1,...,N}) being parametrised by i
. permutation
is the current permutation of the elemental partitioned limited-memory operator ([1:n;]
initially).
PartitionedStructures.ModElemental_plo_sr1.PLSR1_eplo
— Methodeplo = PLSR1_eplo(; n::Int=9, T=Float64, nie::Int=5, overlapping::Int=1)
Return an elemental partitionned limited-memory operator PLSR1 of N
(deduced from n
and nie
) elemental element linear-operators. Each element overlaps the coordinates of the next element by overlapping
components.
PartitionedStructures.ModElemental_plo_sr1.PLSR1_eplo_rand
— Methodeplo = PLSR1_eplo_rand(N::Int, n::Int; T=Float64, nie::Int=5)
Return an elemental partitionned limited-memory operator PLSR1 of N
elemental element linear-operators. The size of each element is nie
, whose positions are random in the range 1:n
.
PartitionedStructures.ModElemental_plo_sr1.identity_eplo_LSR1
— Methodeplo = identity_eplo_LSR1(element_variables::Vector{Vector{Int}}; N::Int=length(element_variables), n::Int=max_indices(element_variables), T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N); mem=5)
eplo = identity_eplo_LSR1(element_variables::Vector{Vector{Int}}, N::Int, n::Int; T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N); mem=5)
Return an elemental partitionned limited-memory operator PLSR1 of N
elemental element linear-operators. The positions are given by the vector of the element variables element_variables
. linear_vector
indicates which element linear-opeartor should not contribute to the partitioned linear-operator.
PartitionedStructures.ModElemental_plo.Elemental_plo
— TypeElemental_plo{T} <: Part_LO_mat{T}
Represent an elemental partitioned quasi-Newton limited-memory operator PLSE. Each element may either be a LBFGSOperator
or a LSR1Operator
. N
is the number of elements. n
is the size of the elemental partitioned limited-memory operator. eelo_set
is the set of elemental element linear-operators. spm
and L
are sparse matrices either to form the sparse matrix gathering the elements or the Cholesky factor of spm
. component_list
summarizes for each variable i (∈ {1,..., n}) the list of elements (⊆ {1,...,N}) being parametrised by i
. permutation
is the current permutation of the elemental partitioned limited-memory operator ([1:n;]
initially).
PartitionedStructures.ModElemental_plo.PLBFGSR1_eplo
— Methodeplo = PLBFGSR1_eplo(;n::Int=9, T=Float64, nie::Int=5, overlapping::Int=1, prob=0.5)
Create an elemental partitionned limited-memory operator PLSE of N
(deduced from n
and nie
) elemental element linear-operators. Each element overlaps the coordinates of the next element by overlapping
components. Each element is randomly (rand() > p
) choose between an elemental element LBFGS operator or an elemental element LSR1 operator.
PartitionedStructures.ModElemental_plo.PLBFGSR1_eplo_rand
— Methodeplo = PLBFGSR1_eplo_rand(N::Int, n ::Int; T=Float64, nie::Int=5, prob=0.5)
Create an elemental partitionned limited-memory operator PLSE of N
elemental element linear-operators. The size of each element is nie
, whose positions are random in the range 1:n
. Each element is randomly (rand() > p) choose between an elemental element LBFGS operator or an elemental element LSR1 operator.
PartitionedStructures.ModElemental_plo.identity_eplo_LOSE
— Methodeplo = identity_eplo_LOSE(element_variables::Vector{Vector{Int}}; N::Int=length(element_variables), n::Int=max_indices(element_variables), T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N), mem=5)
eplo = identity_eplo_LOSE(element_variables::Vector{Vector{Int}}, N::Int, n::Int; T=Float64, linear_vector::Vector{Bool} = zeros(Bool, N), mem=5)
Create an elemental partitionned limited-memory operator of N
elemental element linear-operators initialized with LBFGS operators. The positions are given by the vector of the element variables element_variables
. linear_vector
indicates which element linear-opeartor should not contribute to the partitioned linear-operator.
PartitionedStructures.Instances.create_epv_eplo
— Method(eplo,epv) = create_epv_eplo_sr1(;n=9,nie=5,overlapping=1, mul_v=100.)
Create an elemental partitioned limited-memory quasi-Newton operator eplo
and elemental partitioned-vector epv
. Both have the same partitioned structure defined by the size of the problem n::Int
, the size of the element nie::Int
and the overlapping between the consecutive elements overlapping::Int
. Each elemental element-matrix is instantiated as a LBFGSOperator
, but it may change to a LSR1Operator
later on. The value of each elemental element-vector is rand(nie) .* mul_v::Real
. Warning: You have to choose carefully the values n
, nie
and overlap
, otherwise the method may fail. The default values are correct.
PartitionedStructures.Instances.create_epv_eplo_bfgs
— Method(eplo,epv) = create_epv_eplo_bfgs(;n=9,nie=5,overlapping=1, mul_v=100.)
Create an elemental partitioned limited-memory quasi-Newton operator PLBFGS eplo
and an elemental partitioned-vector epv
. Both have the same partitioned structure defined by the size of the problem n::Int
, the size of the element nie::Int
and the overlapping between the consecutive elements overlapping::Int
. Each elemental element-matrix is a LBFGSOperator
. The value of each elemental element-vector is rand(nie) .* mul_v::Real
. Warning: You have to choose carefully the values n
, nie
and overlap
, otherwise the method may fail. The default values are correct.
PartitionedStructures.Instances.create_epv_eplo_sr1
— Method(eplo,epv) = create_epv_eplo_sr1(;n=9,nie=5,overlapping=1, mul_v=100.)
Create an elemental partitioned limited-memory quasi-Newton operator PLSR1 eplo
and an elemental partitioned-vector epv
. Both have the same partitioned structure defined by the size of the problem n::Int
, the size of the element nie::Int
and the overlapping between the consecutive elements overlapping::Int
. Each elemental element-matrix is a LSR1Operator
. The value of each elemental element-vector is rand(nie) .* mul_v::Real
. Warning: You have to choose carefully the values n
, nie
and overlap
, otherwise the method may fail. The default values are correct.
PartitionedStructures.Instances.create_epv_epm
— Method(epm,epv) = create_epv_epm(;n=9,nie=5,overlapping=1,mul_m=5., mul_v=100.)
Create an elemental partitioned-matrix epm
and an elemental partitioned-vector epv
. Both have the same partitioned structure defined by the size of the problem n::Int
, the size of the element nie::Int
and the overlapping between the consecutive elements overlapping::Int
. Each elemental element-matrix is fill with ones, except the terms of the diagonal of value mul_v::Real
. The value of each elemental element-vector is rand(nie) .* mul_v::Real
. Warning: You have to choose carefully the values n
, nie
and overlap
, otherwise the method may fail. The default values are correct.
PartitionedStructures.Instances.create_epv_epm_rand
— Method(epm,epv) = create_epv_epm_rand(;n=9,nie=5,overlapping=1,range_mul_m=nie:2*nie, mul_v=100.)
Create an elemeental partitioned quasi-Newton operator epm
and an elemental partitioned-vector epv
. Both have the same partitioned structure defined by the size of the problem n::Int
, the size of the element nie::Int
and the overlapping between the consecutive elements overlapping::Int
. Each elemental element-matrix is fill with ones, except the terms of the diagonal of value rand(1:range_mul_v)
. The value of each elemental element-vector is rand(nie) .* mul_v::Real
. Warning: You have to choose carefully the values n
, nie
and overlap
, otherwise the method may fail. The default values are correct.
PartitionedStructures.PartMatInterface.update!
— Methodupdate!(epm::T, epv_y::Elemental_pv{Y}, epv_s::Elemental_pv{Y}; name=:pse, kwargs...) where {Y <: Number, T <: Part_mat{Y}}
update!(epm::T, epv_y::Elemental_pv{Y}, s::Vector{Y}; kwargs...) where {Y <: Number, T <: Part_mat{Y}}
Update the elemental partitioned-matrix epm
with a partitioned quasi-Newton update considering the difference of elemental partitioned-gradients epv_y
and the step s
(or elemental steps epv_s
). The PSE update is run by default, you can apply a PBFGS or a PSR1 update with the optionnal argument name
, respectively name=:pbfgs
or name=:psr1
.
PartitionedStructures.PartMatInterface.update!
— Methodupdate!(eplo::Elemental_plo_bfgs{Y}, epv_y::Elemental_pv{Y}, s::Vector{Y}; kwargs...) where Y <: Number
update!(eplo::Elemental_plo_bfgs{Y}, epv_y::Elemental_pv{Y}, epv_s::Elemental_pv{Y}; kwargs...) where Y <: Number
Updates the elemental partitioned limited-memory operator eplo
with the partitioned quasi-Newton update PLBFGS considering the difference of elemental partitioned-gradients epv_y
and the step s
(or elemental steps epv_s
).
PartitionedStructures.PartMatInterface.update!
— Methodupdate!(eplo::Elemental_plo_sr1{Y}, epv_y::Elemental_pv{Y}, s::Vector{Y}; kwargs...) where Y <: Number
update!(eplo::Elemental_plo_sr1{Y}, epv_y::Elemental_pv{Y}, epv_s::Elemental_pv{Y}; kwargs...) where Y <: Number
Updates the elemental partitioned limited-memory operator eplo
with the partitioned quasi-Newton update PLSR1 considering the difference of elemental partitioned-gradients epv_y
and the step s
(or elemental steps epv_s
).
PartitionedStructures.PartMatInterface.update!
— Methodupdate!(eplo::Elemental_plo{Y}, epv_y::Elemental_pv{Y}, s::Vector{Y}; kwargs...) where Y <: Number
update!(eplo::Elemental_plo{Y}, epv_y::Elemental_pv{Y}, epv_s::Elemental_pv{Y}; kwargs...) where Y <: Number
Updates the elemental partitioned limited-memory operator eplo
with the partitioned quasi-Newton update PLSE considering the difference of elemental partitioned-gradients epv_y
and the step s
(or elemental steps epv_s
).
PartitionedStructures.PartMatInterface.update
— MethodB = update(epm::T, epv_y::Elemental_pv{Y}, s::Vector{Y}; kwargs...) where {Y <: Number, T <: Part_mat{Y}}
Update the elemental partitioned operator epm <: Part_mat
with a partitioned quasi-Newton update considering the difference of elemental partitioned-gradients epv_y
and the step s
. If epm
is an elemental partitioned-matrix, the PSE update is run by default. You can apply a PBFGS or a PSR1 update with the optionnal argument name
, respectively name=:pbfgs
or name=:psr1
. It returns a matrix accumulating every element-contribtion of the updated epm
. Warning: this method should be use to test your algorithm, if you don't intend to form the matrix use update!(epm, epv_y, s)
.