! Calculeaza y din: L*y =b
! Prin substitutie inainte
! Matricea L - data de Cholesky
! 'y' stocat in 'b'
!
subroutine forward(n, l,b)
real(4) l(n*(n+1)/2), b(n)
real(4) lik, lii

! i=1:
b(1) =b(1)/l(1)

A_DO: do i =2, n
yi =0.
	do k=1,i-1
	yk =b(k)
	lik =l(loca(i,k))
	yi =yi +lik*yk
	enddo
yi =b(i) -yi
lii =l(loca(i,i))
yi =yi/lii
b(i) =yi

ENDDO A_DO


END subroutine forward
