(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



GramSchmidt[V_]:= Module[
{n,m,Q=0*V,qi,qj},
{n,m}=Dimensions[V];
Do[
qi=V[[All,i]];
Do[
qj=Q[[All,j]];
qi=qi-(qi.qj)qj,
{j, 1,i-1}];
Q[[All,i]]=qi/Norm[qi],
{i,1,m}];
Q
]


Vandermonde[n_,m_]:= Module[
{p},
Transpose[
Table[
p=N[j/m];
Table[p^(i-1),{i,1,n}],
{j,m}]
]
]


GramSchmidtDouble[V_]:= Module[
{n,m,Q=0*V,qi,qj},
{n,m}=Dimensions[V];
Do[
qi=V[[All,i]];
Do[
Do[
qj=Q[[All,j]];
qi=qi-(qi.qj)qj,
{j, 1,i-1}],
{2}];
Q[[All,i]]=qi/Norm[qi],
{i,1,m}];
Q
]


GramSchmidtDoubleReorder[V_]:= Module[
{n,m,Q=0*V,qi,qj},
{n,m}=Dimensions[V];
Do[
qi=V[[All,i]];
Do[
qj=Q[[All,j]];
Do[
qi=qi-(qi.qj)qj,
{2}],
{j, 1,i-1}];
Q[[All,i]]=qi/Norm[qi],
{i,1,m}];
Q
]



