triqs_modest.embedding.Embedding.split_imp

Embedding.split_imp()

Dispatched C++ function(s).

[1] (imp_idx: int, p: (int) -> bool)
  -> Embedding

[2] (imp_idx: int, block_list: [int])
  -> Embedding

[1] Split impurity imp_idx using a predicate.

Partitions the blocks of impurity imp_idx into two new impurities based on predicate p. Blocks for which p(block_idx) returns true stay with imp_idx; the rest are assigned to a new impurity inserted at imp_idx + 1.


[2] Split impurity imp_idx based on block_list.

For impurity imp_idx, split part of its blocks into a new impurity. The blocks that were split off remain mapped to their original alpha blocks with the updated imp_idx.


Parameters:
imp_idxint

Impurity number.

p(int) -> bool

Predicate taking a block index and returning true/false.

block_list[int]

A list of blocks of imp_idx to split off.

Returns:
Embedding

New embedding with the updated \(\psi\) map.