All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ejml.data.ComplexPolar64F Maven / Gradle / Ivy

Go to download

A fast and easy to use dense matrix linear algebra library written in Java.

The newest version!
/*
 * Copyright (c) 2009-2014, Peter Abeles. All Rights Reserved.
 *
 * This file is part of Efficient Java Matrix Library (EJML).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.ejml.data;

import org.ejml.ops.ComplexMath64F;

/**
 * 

* {@link Complex64F} number in polar notation.
* z = r*(cos(θ) + i*sin(θ))
* where r and θ are polar coordinate parameters *

* @author Peter Abeles */ public class ComplexPolar64F { public double r; public double theta; public ComplexPolar64F(double r, double theta) { this.r = r; this.theta = theta; } public ComplexPolar64F( Complex64F n ) { ComplexMath64F.convert(n, this); } public ComplexPolar64F() { } public Complex64F toStandard() { Complex64F ret = new Complex64F(); ComplexMath64F.convert(this, ret); return ret; } public double getR() { return r; } public void setR(double r) { this.r = r; } public double getTheta() { return theta; } public void setTheta(double theta) { this.theta = theta; } public String toString() { return "( r = "+r+" theta = "+theta+" )"; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy