Initialize the T-matrix.
548195
def _init_tmatrix(self):
        

        if self.radius_type == Scatterer.RADIUS_MAXIMUM:
            # Maximum radius is not directly supported in the original
            # so we convert it to equal volume radius
            radius_type = Scatterer.RADIUS_EQUAL_VOLUME
            radius = self.equal_volume_from_maximum()
        else:
            radius_type = self.radius_type
            radius = self.radius

        self.nmax = pytmatrix.calctmat(radius, radius_type,
            self.wavelength, self.m.real, self.m.imag, self.axis_ratio,
            self.shape, self.ddelt, self.ndgs)
        self._tm_signature = (self.radius, self.radius_type, self.wavelength,
            self.m, self.axis_ratio, self.shape, self.ddelt, self.ndgs)
403927
def initialize(self):
        """"""
        if self.croniter is None:
            self.time = time.time()
            self.datetime = datetime.now(self.tz)
            self.loop_time = self.loop.time()
            self.croniter = croniter(self.spec, start_time=self.datetime)
661368
def _initialize_lists(model_class, name, bases, attrs):
    """"""
    model_class._lists = {}
    for k, v in attrs.iteritems():
        if isinstance(v, ListField):
            model_class._lists[k] = v
            v.name = v.name or k
1103076
private void init(Matrix rotation, Atom translation) {
		if(rotation.getColumnDimension() != 3 || rotation.getRowDimension() != 3) {
			throw new IllegalArgumentException("Expected 3x3 rotation matrix");
		}


		// Calculate angle
		double c = (rotation.trace()-1)/2.0; //=cos(theta)
		// c is sometimes slightly out of the [-1,1] range due to numerical instabilities
		if( -1-1e-8 < c && c < -1 ) c = -1;
		if( 1+1e-8 > c && c > 1 ) c = 1;
		if( -1 > c || c > 1 ) {
			throw new IllegalArgumentException("Input matrix is not a valid rotation matrix.");
		}
		this.theta = Math.acos(c);

		if(theta < MIN_ANGLE) {
			calculateTranslationalAxis(rotation,translation);
		} else {
			calculateRotationalAxis(rotation, translation, c);
		}
	}
598991
private void initialize() {
        this.level = 0;
        this.next = 0;
        this.empty = null;
        this.scoreIncrement = 1;
        this.ignore = null;
        this.vars = new LNGVector<>();
        this.vals = new LNGByteVector();
        this.phases = new LNGByteVector();
        this.decisions = new LNGDoublePriorityQueue();
        this.control = new LNGVector<>();
        this.trail = new LNGIntVector();
        this.addedlits = new LNGIntVector(100);
        this.seen = new LNGIntVector();
        this.frames = new LNGIntVector();
        this.watches = new LNGVector<>();
        this.stats = new CLStats();
        this.limits = new CLLimits();
        this.model = new LNGBooleanVector();
        this.control.push(new CLFrame());
    }
340766
protected function init()
    {
        // build the local matrix just once
        if (empty($this->errorCodeMatrix)) {
            // get type and order from Doozr_Form_Service_Validate so we don't need to define it manually again
            $typeMatrix = Doozr_Form_Service_Validator_Generic::getValidationTypeMatrix();

            // iterate over types and construct error-code-matrix of it
            foreach ($typeMatrix as $type => $order) {
                $this->errorCodeMatrix[$type] = ($order + 1);
            }
        }

        return $this;
    }
1014780
def _initialize_stretching_matrix(self):
        

        self.S = np.zeros((self.nz, self.nz))

        if (self.nz==2) and (self.rd) and (self.delta):

            self.del1 = self.delta/(self.delta+1.)
            self.del2 = (self.delta+1.)**-1
            self.Us = self.Ubg[0]-self.Ubg[1]

            self.F1 = self.rd**-2 / (1.+self.delta)
            self.F2 = self.delta*self.F1
            self.S[0,0], self.S[0,1] = -self.F1,  self.F1
            self.S[1,0], self.S[1,1] =  self.F2, -self.F2

        else:

            for i in range(self.nz):

                if i == 0:
                    self.S[i,i]   = -self.f2/self.Hi[i]/self.gpi[i]
                    self.S[i,i+1] =  self.f2/self.Hi[i]/self.gpi[i]

                elif i == self.nz-1:
                    self.S[i,i]   = -self.f2/self.Hi[i]/self.gpi[i-1]
                    self.S[i,i-1] =  self.f2/self.Hi[i]/self.gpi[i-1]

                else:
                    self.S[i,i-1] = self.f2/self.Hi[i]/self.gpi[i-1]
                    self.S[i,i]   = -(self.f2/self.Hi[i]/self.gpi[i] +
                                        self.f2/self.Hi[i]/self.gpi[i-1])
                    self.S[i,i+1] = self.f2/self.Hi[i]/self.gpi[i]
728440
def Tmatrix(X):
    
    T = [[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]
    for row in X:
        for k in range(3):
            for l in range(3):
                T[k][l] += row[k] * row[l]
    return T
620097
private void initGraphics() {
        // prefill matrix with pixelOffColor
        for (int y = 0 ; y < rows ; y++) {
            for (int x = 0 ; x < cols ; x++) {
                matrix[x][y] = pixelOffColor;
            }
        }

        if (Double.compare(getPrefWidth(), 0.0) <= 0 || Double.compare(getPrefHeight(), 0.0) <= 0 ||
            Double.compare(getWidth(), 0.0) <= 0 || Double.compare(getHeight(), 0.0) <= 0) {
            if (getPrefWidth() > 0 && getPrefHeight() > 0) {
                setPrefSize(getPrefWidth(), getPrefHeight());
            } else {
                setPrefSize(preferredWidth, preferredHeight);
            }
        }

        canvas = new Canvas(preferredWidth, preferredHeight);
        ctx = canvas.getGraphicsContext2D();

        getChildren().setAll(canvas);
        canvas.addEventHandler(MouseEvent.MOUSE_PRESSED, clickHandler);
    }
716087
public void setMatrix(int[] matrix) {
		this.matrix = matrix;
		sum = 0;
		for (int i = 0; i < matrix.length; i++)
			sum += matrix[i];
	}
1335198
public void init() {
		N = getParameterLength();
		jacR = new DMatrixRMaj[N];
		for (int i = 0; i < N; i++) {
			jacR[i] = new DMatrixRMaj(3,3);
		}
		jacobian = new DMatrixRMaj(N,9);
		paramInternal = new double[N];
		numericalJac = createNumericalAlgorithm(function);
	}
1145265
def _initialize_with_array(self, data, rowBased=True):
        """"""
        if rowBased:
            self.matrix = []
            if len(data) != self._rows:
                raise ValueError("Size of Matrix does not match")
            for col in xrange(self._columns):
                self.matrix.append([])
                for row in xrange(self._rows):
                    if len(data[row]) != self._columns:
                        raise ValueError("Size of Matrix does not match")
                    self.matrix[col].append(data[row][col])
        else:
            if len(data) != self._columns:
                raise ValueError("Size of Matrix does not match")
            for col in data:
                if len(col) != self._rows:
                    raise ValueError("Size of Matrix does not match")
            self.matrix = copy.deepcopy(data)
506760
protected void initialize(T input , GrayS32 output ) {
		this.graph = output;
		final int N = input.width*input.height;

		regionSize.resize(N);
		threshold.resize(N);
		for( int i = 0; i < N; i++ ) {
			regionSize.data[i] = 1;
			threshold.data[i] = K;
			graph.data[i] = i; // assign a unique label to each pixel since they are all their own region initially
		}

		edges.reset();
		edgesNotMatched.reset();
	}
1228015
def initialize(self):
        ''''''
        if es.indices.exists(self.index_name):
            es.indices.put_mapping(index=self.index_name, doc_type=DOCTYPE, body=MAPPING)
        else:
            es.indices.create(self.index_name, {
                'mappings': {'advice': MAPPING},
                'settings': {'analysis': ANALSYS},
            })
1229385
def init(self):
        """"""

        evclass_shape = [16, 40, 10]
        evtype_shape = [16, 16, 40, 10]
        evclass_psf_shape = [16, 40, 10, 100]
        evtype_psf_shape = [16, 16, 40, 10, 100]

        self._hists_eff = dict()
        self._hists = dict(evclass_on=np.zeros(evclass_shape),
                           evclass_off=np.zeros(evclass_shape),
                           evclass_alpha=np.zeros([16, 40, 1]),
                           evtype_on=np.zeros(evtype_shape),
                           evtype_off=np.zeros(evtype_shape),
                           evtype_alpha=np.zeros([16, 1, 40, 1]),
                           evclass_psf_on=np.zeros(evclass_psf_shape),
                           evclass_psf_off=np.zeros(evclass_psf_shape),
                           evtype_psf_on=np.zeros(evtype_psf_shape),
                           evtype_psf_off=np.zeros(evtype_psf_shape),
                           )
1261503
private void initialize()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "initialize");
        
    subsets = new ReliabilitySubset[maxReliabilityIndex + 1];
    subsetIDs = new long[maxReliabilityIndex + 1];
    for(int i=0;i<subsetIDs.length;i++)
    {
      subsetIDs[i] = NO_ID;             
    }
    
    createControlAdapter(); 
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initialize");
  }
388395
public void initialize( int totalCameras , int totalViews , int totalPoints , int totalRigid ) {
		cameras = new Camera[totalCameras];
		views = new View[totalViews];
		points = new Point[totalPoints];
		rigids = new Rigid[totalRigid];

		for (int i = 0; i < cameras.length; i++) {
			cameras[i] = new Camera();
		}
		for (int i = 0; i < views.length; i++) {
			views[i] = new View();
		}
		for (int i = 0; i < points.length; i++) {
			points[i] = new Point(pointSize);
		}

		for (int i = 0; i < rigids.length; i++) {
			rigids[i] = new Rigid();
		}
		// forget old assignments
		lookupRigid = null;
	}