Changeset 606


Ignore:
Timestamp:
Nov 22, 2004, 12:18:16 AM (20 years ago)
Author:
steve
Message:

Converted B matrix to CSR format in least squares

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/least_squares.py

    r595 r606  
    3030from Numeric import zeros, array, Float, Int, dot, transpose
    3131from LinearAlgebra import solve_linear_equations
    32 from sparse import Sparse
     32from sparse import Sparse, Sparse_CSR
    3333from cg_solve import conjugate_gradient, VectorShapeError
    3434
     
    203203                self.B = self.AtA
    204204
    205 
     205            #Convert self.B matrix to CSR format for faster matrix vector
     206            self.B = Sparse_CSR(self.B)
    206207       
    207208    def build_interpolation_matrix_A(self, point_coordinates):
     
    515516
    516517
     518
    517519        return conjugate_gradient(self.B, Atz, Atz,imax=2*len(Atz) )
    518520        #FIXME: Should we store the result here for later use? (ON)       
Note: See TracChangeset for help on using the changeset viewer.