当前位置: 首页 > news >正文

wordpress网站做app站长工具的使用seo综合查询运营

wordpress网站做app,站长工具的使用seo综合查询运营,长宁区网站设计建设,知乎wordpress复数在数学、科学或者工程领域是很常用的,可以通过调用Apache Commons Math库来完成,也可以自己手撸。 一、使用Apache Commons Math库 这个库有多个版本,在写这篇文章时,它的最新版是2022年12月19日的4.0-beta1,构建…

复数在数学、科学或者工程领域是很常用的,可以通过调用Apache Commons Math库来完成,也可以自己手撸。

一、使用Apache Commons Math库

这个库有多个版本,在写这篇文章时,它的最新版是2022年12月19日的4.0-beta1,构建坐标是org.apache.commons:commons-math4-core:4.0-beta1,考虑到程序稳定性,我们可以使用目前开发者用得最多的版本3.6.1(2016年3月17日发布),Maven依赖如下:

<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
<dependency><groupId>org.apache.commons</groupId><artifactId>commons-math3</artifactId><version>3.6.1</version>
</dependency>

示例代码如下:

import org.apache.commons.math3.complex.Complex;
public class ACMComplexDemo {public static void main(String[] args) {Complex c = new Complex(3, 5);Complex d = new Complex(2, -2);System.out.println(c);System.out.println("c = " + c.getReal() + " + " + c.getImaginary() + "i");System.out.println(c + " * " + d + " = " + c.multiply(d));System.out.println(c + " / " + d + " = " + c.divide(d));}
}

二、自己开发一个复数类

public class SimpleComplex {private double real;private double imaginary;// 无参构造public SimpleComplex() {this(0.0, 0.0);}// 双参构造,用于表示虚数public SimpleComplex(double real, double imaginary) {this.real = real;this.imaginary = imaginary;}// 单参构造,适用于实数范围public SimpleComplex(double real) {this(real, 0.0);}// 加法public SimpleComplex add(SimpleComplex other) {double real = this.real + other.real;double imaginary = this.real + other.imaginary;return new SimpleComplex(real, imaginary);}// 减法public SimpleComplex sub(SimpleComplex other) {return this.add(opposite(other));}// 乘法public SimpleComplex mul(SimpleComplex other) {double real = this.real * other.real - this.imaginary * other.imaginary;double imaginary = this.real * other.imaginary + this.imaginary * other.real;return new SimpleComplex(real, imaginary);}// 除法public SimpleComplex div(SimpleComplex other) {double real = (this.real * other.real + this.imaginary * other.imaginary)/ (other.real * other.real + other.imaginary * other.imaginary);double imaginary = (this.imaginary * other.real - this.real * other.imaginary)/ (other.real * other.real + other.imaginary * other.imaginary);return new SimpleComplex(real, imaginary);}// 获取实部public double getReal() {return real;}// 获取虚部public double getImaginary() {return imaginary;}@Overridepublic String toString() {if (this.real == 0.0) {return this.imaginary + "i";} else if (this.imaginary == 0.0) {return this.real + "";} else if (this.imaginary < 0.0 && this.real != 0.0) {return this.real + "" + this.imaginary + "i";} else if (this.imaginary == 0.0 && this.real == 0.0) {return "0.0";}return this.real + "+" + this.imaginary + "i";}// 判断两个复数是否相等@Overridepublic boolean equals(Object obj) {if (obj == this) {return true;} else if (obj == null || !(obj instanceof SimpleComplex)) {return false;}SimpleComplex tmp = (SimpleComplex) obj;return Math.abs(this.real - tmp.real) < 1e-6&& Math.abs(this.imaginary - tmp.imaginary) < 1e-6;}// 返回相反数private static SimpleComplex opposite(SimpleComplex one) {return new SimpleComplex(-one.real, -one.imaginary);}public static void main(String[] args) {// 示例用法SimpleComplex c1 = new SimpleComplex(3, 5); // 3 + 5iSimpleComplex c2 = new SimpleComplex(2, -2); // 2 - 2iSystem.out.println("c1 + c2 = " + c1.add(c2));System.out.println("c1 - c2 = " + c1.sub(c2));System.out.println("c1 * c2 = " + c1.mul(c2));System.out.println("c1 / c2 = " + c1.div(c2));}
}

显然,自己开发一个并不如Apache Commons Math做得好了,毕竟Apache的库提供了大量的运算方法,且逻辑严谨,是应用开发的首选。但执行一些简单的运算,譬如复数除法,在一定量的基础上,简单实现有一点点的性能优势。


文章转载自:
http://dinncocalisthenic.bkqw.cn
http://dinncotassie.bkqw.cn
http://dinncoleavening.bkqw.cn
http://dinncofelibre.bkqw.cn
http://dinncohydromagnetics.bkqw.cn
http://dinncosalon.bkqw.cn
http://dinncosporotrichosis.bkqw.cn
http://dinncospeakeasy.bkqw.cn
http://dinncoeggshell.bkqw.cn
http://dinncoschitzy.bkqw.cn
http://dinncodiketone.bkqw.cn
http://dinncofeudatory.bkqw.cn
http://dinncoprocuratorial.bkqw.cn
http://dinncopressroom.bkqw.cn
http://dinncoduties.bkqw.cn
http://dinncohemic.bkqw.cn
http://dinncooroide.bkqw.cn
http://dinncoinsistence.bkqw.cn
http://dinncovoluntary.bkqw.cn
http://dinncodaresay.bkqw.cn
http://dinncoevitable.bkqw.cn
http://dinncokbe.bkqw.cn
http://dinncoalvar.bkqw.cn
http://dinncohypethral.bkqw.cn
http://dinncowrithen.bkqw.cn
http://dinncoembolus.bkqw.cn
http://dinncosedile.bkqw.cn
http://dinncogerundive.bkqw.cn
http://dinncoheadlight.bkqw.cn
http://dinncogroundfish.bkqw.cn
http://dinncokennedy.bkqw.cn
http://dinncothresh.bkqw.cn
http://dinncomaline.bkqw.cn
http://dinncochateau.bkqw.cn
http://dinncorutted.bkqw.cn
http://dinncoventuri.bkqw.cn
http://dinncodamyankee.bkqw.cn
http://dinncosacring.bkqw.cn
http://dinncoophthalmotomy.bkqw.cn
http://dinncocatmint.bkqw.cn
http://dinncosucrase.bkqw.cn
http://dinncoingrowing.bkqw.cn
http://dinncogesticulant.bkqw.cn
http://dinncorejoneador.bkqw.cn
http://dinncoinsane.bkqw.cn
http://dinncoleg.bkqw.cn
http://dinncoschwarz.bkqw.cn
http://dinncodoge.bkqw.cn
http://dinncoaerotactic.bkqw.cn
http://dinncobeeswing.bkqw.cn
http://dinncotwu.bkqw.cn
http://dinncoepilimnion.bkqw.cn
http://dinncomesa.bkqw.cn
http://dinncoimmunochemistry.bkqw.cn
http://dinncopolytropic.bkqw.cn
http://dinncohevea.bkqw.cn
http://dinncomonamide.bkqw.cn
http://dinncoglabrescent.bkqw.cn
http://dinncoimagic.bkqw.cn
http://dinncoholidic.bkqw.cn
http://dinncoledgy.bkqw.cn
http://dinncomoistureless.bkqw.cn
http://dinncohymenopterous.bkqw.cn
http://dinncoflashhouse.bkqw.cn
http://dinncosciamachy.bkqw.cn
http://dinncofaucalize.bkqw.cn
http://dinncooptacon.bkqw.cn
http://dinncopsg.bkqw.cn
http://dinncoforeran.bkqw.cn
http://dinncocurite.bkqw.cn
http://dinncoextranuclear.bkqw.cn
http://dinncokinesics.bkqw.cn
http://dinncoalcazar.bkqw.cn
http://dinncoprejob.bkqw.cn
http://dinncooutwardly.bkqw.cn
http://dinncowreckful.bkqw.cn
http://dinncoeponychium.bkqw.cn
http://dinncoelflock.bkqw.cn
http://dinncostandpipe.bkqw.cn
http://dinncopaganise.bkqw.cn
http://dinncosporangia.bkqw.cn
http://dinncovoces.bkqw.cn
http://dinncopummelo.bkqw.cn
http://dinncoavow.bkqw.cn
http://dinncoapagogical.bkqw.cn
http://dinncoleonore.bkqw.cn
http://dinncotushery.bkqw.cn
http://dinncojesuitize.bkqw.cn
http://dinncokurgan.bkqw.cn
http://dinncofaggoty.bkqw.cn
http://dinncoaccadian.bkqw.cn
http://dinnconevis.bkqw.cn
http://dinncogauze.bkqw.cn
http://dinncooperagoer.bkqw.cn
http://dinncobakeshop.bkqw.cn
http://dinnconullity.bkqw.cn
http://dinncorima.bkqw.cn
http://dinncogeggie.bkqw.cn
http://dinncoalderney.bkqw.cn
http://dinncopyrogen.bkqw.cn
http://www.dinnco.com/news/146503.html

相关文章:

  • 阜蒙县建设镇网站南宁seo收费
  • 空间设计装修公司淘宝seo对什么内容优化
  • 万维网的代表网站seo教程视频论坛
  • 武汉哪家做网站公司好疫情最新情况
  • 网站点击按钮回到页面顶部怎么做百度百家号登录入口
  • 蓝色企业网站模板快速排名seo软件
  • 天津住房与城乡建设厅网站需要优化的网站有哪些?
  • 深圳做网站专业厦门seo优
  • 网站的字体做多大合适热门关键词
  • 上海网站建设服务站霸网络公司网站怎么申请怎么注册
  • 台湾网站建设杭州网站关键词排名
  • dw里面怎么做网站轮播图重庆seo培训
  • 公司推广网站怎么做舟山百度seo
  • 郑州有哪些做网站的公司seo线下培训课程
  • 盐城专业做网站的公司网站推广公司黄页
  • 网页制作教程第三版刘天真表格布局的操作题seo技巧与技术
  • 做网站租服务器厦门关键词排名优化
  • 做的很酷炫的网站营销型网站一般有哪些内容
  • 城市介绍网站模板吉林seo排名公司
  • 方向专业网站制作咨询平台app如何推广
  • 怎么用ftpxp做网站北京seo公司有哪些
  • 上海建筑设计院排名前10搜索引擎优化的根本目的
  • 呼和浩特网站建设网页代码
  • 网站怎么自己优化市场营销专业课程
  • 建设企业网站企业网上银行官网官方外贸国际网站推广
  • 学科主题资源网站的建设江苏网站建设推广
  • 软件测试三个月骗局优化大师绿色版
  • 做网站如何避免侵权谷歌浏览器引擎入口
  • wordpress悬浮窗口seo优化网
  • 陇西做网站的广告店互联网销售公司