58 int NumRowEntries = 0;
59 double *RowValues = 0;
65 std::vector <int> Ap( numcols+1 );
66 std::vector <int> nextAp( numcols+1 );
67 #ifdef EPETRA_NO_32BIT_GLOBAL_INDICES
68 std::vector <long long> Ai(
EPETRA_MAX( numcols, numentries) ) ;
70 std::vector <int> Ai(
EPETRA_MAX( numcols, numentries) ) ;
72 std::vector <double> Aval(
EPETRA_MAX( numcols, numentries) ) ;
80 std::vector <int>RowsPerCol( numcols ) ;
81 for (
int i = 0 ; i < numcols ; i++ ) RowsPerCol[i] = 0 ;
82 for (
int MyRow = 0; MyRow <numrows; MyRow++ ) {
85 for (
int j = 0; j < NumRowEntries; j++ ) {
86 RowsPerCol[ ColIndices[j] ] ++ ;
93 for (
int i = 0 ; i < numcols ; i++ ) {
94 Ap[i+1]= Ap[i] + RowsPerCol[i] ;
100 for (
int MyRow = 0; MyRow <numrows; MyRow++ ) {
102 assert( ierr == 0 ) ;
103 for (
int j = 0; j < NumRowEntries; j++ ) {
104 Ai[ nextAp[ ColIndices[j] ] ] = MyRow ;
105 Aval[ nextAp[ ColIndices[j] ] ] = RowValues[j] ;
106 nextAp[ ColIndices[j] ] ++ ;
113 for (
int MyRow = 0; MyRow <numrows; MyRow++ ) {
114 int NumInCol = Ap[MyRow+1] - Ap[MyRow] ;
115 #if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)