I have a graph of $N$ nodes that are collaboratively solving an optimization problem. Each node $n$ has a scalar variable $\lambda_n \geq 0, \forall n$ updated at every iteration.
At the end of each iteration, I would like to project the vector $\lambda = [\lambda_1, \lambda_2, \dots, \lambda_n]$ into the simplex, i.e. $\lambda$ needs to satisfy $$ \sum_{i=1}^N \lambda_i = 1$$ Is there a way to perform this step? The issue I'm facing is that to be able to do so, I need to have all the values of $\lambda_n$ in one place to be able to do the projection.