资源简介
纯C++代码,配置环境后可以直接运行,所需要的环境配置方法可以看我的博客前两篇

代码片段和文件信息
//
// Complex.cpp
// FFT
//
// Created by boone on 2018/7/17.
// Copyright © 2018年 boone. All rights reserved.
//
#include “Complex.h“
Complex::Complex()
{
real = 0;
imag = 0;
}
Complex::Complex(double re double im)
{
real = re;
imag = im;
}
Complex Complex::operator+(double v)
{
return Complex(real + v imag);
}
Complex Complex::operator-(double v)
{
return Complex(real - v imag);
}
Complex Complex::operator*(double v)
{
return Complex(real*v imag*v);
}
Complex Complex::operator/(double v)
{
return Complex(real / v imag / v);
}
Complex Complex::operator=(double v)
{
real = v;
imag = 0;
return *this;
}
Complex Complex::operator+=(double v)
{
real += v;
return *this;
}
Complex Complex::operator-=(double v)
{
real -= v;
return *this;
}
Complex Complex::operator*=(double v)
{
real *= v;
imag *= v;
return *this;
}
Complex Complex::operator/=(double v)
{
real /= 2;
imag /= 2;
return *this;
}
Complex Complex::operator+(Complex c)
{
return Complex(real + c.real imag + c.imag);
}
Complex Complex::operator-(Complex c)
{
return Complex(real - c.real imag - c.imag);
}
Complex Complex::operator*(Complex c)
{
double re = real*c.real - imag*c.imag;
double im = real*c.imag + imag*c.real;
return Complex(re im);
}
Complex Complex::operator/(Complex c)
{
double x = c.real;
double y = c.imag;
double f = x*x + y*y;
double re = (real*x + imag*y) / f;
double im = (imag*x - real*y) / f;
return Complex(re im);
}
Complex Complex::operator=(Complex c)
{
real = c.real;
imag = c.imag;
return *this;
}
Complex Complex::operator+=(Complex c)
{
real += c.real;
imag += c.imag;
return *this;
}
Complex Complex::operator-=(Complex c)
{
real -= c.real;
imag -= c.imag;
return *this;
}
Complex Complex::operator*=(Complex c)
{
double re = real*c.real - imag*c.imag;
double im = real*c.imag + imag*c.real;
real = re;
imag = im;
return *this;
}
Complex Complex::operator/=(Complex c)
{
double x = c.real;
double y = c.imag;
double f = x*x + y*y;
double re = (real*x + imag*y) / f;
double im = (imag*x - real*y) / f;
real = re;
imag = im;
return *this;
}
BOOL Complex::operator==(Complex c)
{
return ((real == c.real) && (imag == c.imag));
}
BOOL Complex::operator!=(Complex c)
{
return ((real != c.real) || (imag != c.imag));
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-07-18 14:16 Spectrum3.0\
文件 361 2018-07-18 09:17 Spectrum3.0\FFT.h
目录 0 2018-07-18 14:23 __MACOSX\
目录 0 2018-07-18 14:23 __MACOSX\Spectrum3.0\
文件 423 2018-07-18 09:17 __MACOSX\Spectrum3.0\._FFT.h
文件 1825 2018-07-18 14:15 Spectrum3.0\FFT.cpp
文件 176 2018-07-18 14:15 __MACOSX\Spectrum3.0\._FFT.cpp
文件 2478 2018-07-17 20:14 Spectrum3.0\Complex.cpp
文件 176 2018-07-17 20:14 __MACOSX\Spectrum3.0\._Complex.cpp
文件 3818 2018-07-18 14:16 Spectrum3.0\main.cpp
文件 333 2018-07-18 14:16 __MACOSX\Spectrum3.0\._main.cpp
文件 1084 2018-07-17 20:14 Spectrum3.0\Complex.h
文件 266 2018-07-17 20:14 __MACOSX\Spectrum3.0\._Complex.h
- 上一篇:c语言版学生成绩管理系统实验报告
- 下一篇:OpenCV+C++图像处理项目14个
相关资源
- 安卓c语言开发SDL2+opengles
- 交互式计算机图形学 第六版 OpenGL源代
- VC++基于OpenGL模拟的一个3维空间模型
- opengl绘制汽车.cpp
- opengl实现水流效果sph
- opengl源代码,全是精华!
- OpenGL迷宫山东大学图形学实验三
- opengl的立方体消隐算法
- vc++ opengl代码爆炸
- 我见过最漂亮的CS仿真程序openGL和C+
- 利用FFT计算频谱图
- 广东某工业大学的openGL课程设计
- 使用OpenGL实现多个小球在密闭空间内
- 利用openGL和C++实现光线跟踪绘图的完
- OpenGl C++太阳系小行星运行系统 可切换
- vc++和OpenGL实现三维地形实时动态显示
- C++实现利用OpenGL实现三维绘图
- 太阳、地球、月亮之间的运动图Open
- MFC 单文档 实现opengl 三维旋转 缩放
- OPENGL的烟花程序(代码)
- MFC+OpenGL三维建模与动画显示
- 基于opengl粒子系统实现喷泉的模拟
- 一个基于openGL的太阳系模型,太阳地
- vc6.0+opengl纯色五角星填充
- vc6.0+opengl动态绘制五角星
- NeHe_OpenGL教程完整版 里面有地址可以
- OpenGL简单——实现立方体贴上不同纹
- MFC实现dem的读取与现实
- VC++ OpenGL三维地形漫游
- OpenGL实现三维地形实时动态显示
评论
共有 条评论