Changeset 76581ef in tol
- Timestamp:
- Sep 17, 2010, 5:18:50 PM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- d979291
- Parents:
- 84faccd
- File:
-
- 1 edited
-
tol/btol/matrix_type/matgra.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/matrix_type/matgra.cpp
r84faccd r76581ef 1739 1739 return; 1740 1740 } 1741 //Std(BText("\nTRACE [InversePermutation] 1 n=")+pr); 1742 //Std(BText("\nTRACE [InversePermutation] 2 pr=")+pr); 1743 //Std(BText("\nTRACE [InversePermutation] 3 pc=")+pr); 1741 1744 contens_.Alloc(pr,pc); 1742 1745 const double* p = (const double*)P.Data().Buffer(); 1743 1746 double* c = (double*)contens_.GetData().GetBuffer(); 1747 for(i=0; i<n; i++) 1748 { 1749 c[k-1] = 0.0; 1750 } 1744 1751 for(i=1; i<=n; i++, p++) 1745 1752 { 1746 1753 k = (int)(*p); 1747 c[k-1] = i; 1754 //Std(BText("\nTRACE [InversePermutation] 4.")+i+" k="<<k); 1755 if(*p!=k) 1756 { 1757 Error(I2("Cannot apply InversePermutation to a matrix with non integer cells ", 1758 "No se puede aplicar InversePermutation a una matriz con celdas o enteras ")+ 1759 (*p)+"!= "+k+"]"); 1760 } 1761 else if((k<1)||(k>n)) 1762 { 1763 Error(I2("Cannot apply InversePermutation to a matrix with cells out of range ", 1764 "No se puede aplicar InversePermutation a una matriz con celdas fuera de rango ")+ 1765 k + "!<: [1, ..., "+n+"]"); 1766 c[k-1] = BDat::Nan(); 1767 } 1768 else if(c[k-1]!=0.0) 1769 { 1770 Error(I2("Cannot apply InversePermutation to a matrix with repeated cells ", 1771 "No se puede aplicar InversePermutation a una matriz con celdas repetidas ")+ 1772 c[k-1] + " <-> "+i+"]"); 1773 } 1774 else 1775 { 1776 c[k-1] = i; 1777 } 1748 1778 //Std(BText("\n[InversePermutation] ")+k+" -> "+i) 1749 1779 }
Note: See TracChangeset
for help on using the changeset viewer.
