I have a set of knots on an interval [a,b]:
$a=y_0<y_1<\dots<y_g<y_{g+1}=b$
and on these knots I want to construct basis of orthogonal B-splines of the order $k+1$. First I will create a basis of regular B-splines. For that I need to add $2k$ additional knots so that I can construct the full basis:
$y_{-k}\leq y_{-k+1}\leq \dots \leq y_{-1} \leq y_0=a$
$b=y_{g+1}\leq y_{g+2}\leq \dots \leq y_{g+k} \leq y_{g+k+1}$
Now I have a set of $g+k+1$ B-splines $B_{-k}^{k+1}(x),\dots,B_g^{k+1}(x)$ for which this holds up
$\sum_{i=-k}^g{B_i^{k+1}(x)}=1, \ \forall x \in [ a,b ]$
Now I want to orthogonalize B-spline functions via Gram-Schmidt method. Specifically, I'm using this algorithm:
$e_0=h_0/||h_0||$,
for $i=1,\dots,n-1$:
$e_{i+1}=\alpha_ie_i+\beta_{i+1}h_{i+1}=\alpha_nh_n/||h_n||+\beta_{n+1}h_{n+1}$
where
$\alpha_{i}=-\beta_{i+1}\langle e_{i},h_{i+1}\rangle \\ \beta_{i+1}=\frac{1}{\sqrt{||{h_{i+1}}||^2 - \langle e_{i},h_{i+1} \rangle ^2}}$
where $h_i$ stands for the elements I want to orthogonalize and $e_i$ for the desired orthogonalization.
As the inner product, I'm using
$\langle B_i^{k+1}, B_j^{k+1}\rangle=\int_{y_i}^{y_{j+k+1}} B_i^{k+1}(x) B_j^{k+1}(x) \ dx$
where $y_i,...,y_{i+k+1}$ are the knots of the i-th B-spline and $y_j,...,y_{j+k+1}$ are the knots of the j-th B-spline. The problem is, unless the B-splines are defined on the equidistant set of knots spaced by one (for example [0,1,2,3,4]), the resulting B-splines are orthogonal, but their function value are too low. I'd like the resulting B-splines to be orthogonal but to still have this feature
$\sum_{i=-k}^g{B_i^{k+1}(x)}=1, \ \forall x \in [ a,b ]$
I understand that I need to multiply the integral by something, but I'm not quite sure by what. I've worked out that if I have equidistant knots, then inner product defined as
$\frac{k+1}{y_{i+k+1}-y_i} \int_{y_i}^{y_{j+k+1}} B_i^{k+1}(x) B_j^{k+1}(x) \ dx$
works. However I'm not sure what to do generally for the non-equidistant knots.