Changeset 0b59f5 in git for Singular/LIB/linalg.lib
- Timestamp:
- Dec 13, 1999, 4:33:50 PM (24 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 82ed244cff3158b7a79a6eed4e0548d485960cfe
- Parents:
- 925cab8e04ecb2f3c2e451b913c11bcac28b2374
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/linalg.lib
r925cab r0b59f5 3 3 ////////////////////////////////////////////////////////////////////////////// 4 4 5 version="$Id: linalg.lib,v 1. 3 1999-10-25 12:45:16obachman Exp $";5 version="$Id: linalg.lib,v 1.4 1999-12-13 15:33:48 obachman Exp $"; 6 6 info=" 7 7 LIBRARY: linalg.lib PROCEDURES FOR ALGORITHMIC LINEAR ALGEBRA … … 21 21 gaussred(A); gaussian reduction: P*A=U*S, S is a row reduced form of A 22 22 gaussred_pivot(A); gaussian reduction: P*A=U*S, S is a row reduced form of A 23 g nf(A); gauss normal form of A24 rk(A); rank of A25 U DO(A); P*A=U*D*O23 gauss_nf(A); gauss normal form of A 24 mat_rk(A); rank of A 25 U_D_O(A); P*A=U*D*O 26 26 pos_def(A,i); test of positive symmetric matrizes. 27 27 "; … … 824 824 825 825 ////////////////////////////////////////////////////////////////////////////// 826 proc g nf(matrix A)827 "USAGE: g nf(A); any constant matrix A826 proc gauss_nf(matrix A) 827 "USAGE: gauss_nf(A); any constant matrix A 828 828 RETURN: matrix; gauss normal form of A 829 EXAMPLE: example g nf; shows an example"829 EXAMPLE: example gauss_nf; shows an example" 830 830 { 831 831 list Z; … … 841 841 ring r=7,(x),dp; 842 842 matrix A[4][4]= 1,4,4,7,2,5,5,4,4,1,1,3,0,2,2,7; 843 print(g nf(A));844 } 845 846 ////////////////////////////////////////////////////////////////////////////// 847 proc rk(matrix A)848 "USAGE: rk(A); any constant matrix A843 print(gauss_nf(A)); 844 } 845 846 ////////////////////////////////////////////////////////////////////////////// 847 proc mat_rk(matrix A) 848 "USAGE: mat_rk(A); any constant matrix A 849 849 RETURN: int; rank of A 850 EXAMPLE: example rk; shows an example"850 EXAMPLE: example mat_rk; shows an example" 851 851 { 852 852 list Z; … … 862 862 ring r=7,(x),dp; 863 863 matrix A[4][4]= 1,4,4,7,2,5,5,4,4,1,1,3,0,2,2,7; 864 rk(A);865 } 866 867 ////////////////////////////////////////////////////////////////////////////// 868 proc U DO(matrix A)864 mat_rk(A); 865 } 866 867 ////////////////////////////////////////////////////////////////////////////// 868 proc U_D_O(matrix A) 869 869 "USAGE: gaussred(A); constant invertible matrix A 870 870 RETURN: list Z: Z[1]=P , Z[2]=U , Z[3]=D , Z[4]=O … … 922 922 -10,10,-9,5,-1,-6,5; 923 923 print(A); 924 list Z=U DO(A);924 list Z=U_D_O(A); 925 925 "P=";print(Z[1]); 926 926 "U=";print(Z[2]); … … 956 956 } 957 957 958 Z=U DO(A);958 Z=U_D_O(A); 959 959 960 960 if(Z[1]==-1){return(0);} //A not regular , therefor not pos.definit … … 1023 1023 } 1024 1024 1025 r= rk(A);1025 r=mat_rk(A); 1026 1026 1027 1027 //1. b constant vector
Note: See TracChangeset
for help on using the changeset viewer.