MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / add

Method add

src/main/java/com/thealgorithms/maths/FFT.java:74–79  ·  view source on GitHub ↗

Adds this complex number to another. @param z The number to be added. @return The sum.

(Complex z)

Source from the content-addressed store, hash-verified

72 * @return The sum.
73 */
74 public Complex add(Complex z) {
75 Complex temp = new Complex();
76 temp.real = this.real + z.real;
77 temp.img = this.img + z.img;
78 return temp;
79 }
80
81 /**
82 * Subtracts a number from this complex number.

Callers 15

addTestMethod · 0.95
addFalseTestMethod · 0.95
fftMethod · 0.95
activitySelectionMethod · 0.45
getEgyptianFractionMethod · 0.45
minMergeCostMethod · 0.45
mergeMethod · 0.45
coinChangeProblemMethod · 0.45
stableMatchMethod · 0.45
generateSubsetsMethod · 0.45
findLineMethod · 0.45

Calls

no outgoing calls

Tested by 6

addTestMethod · 0.76
addFalseTestMethod · 0.76
kShortestPathsMethod · 0.36
dijkstraMethod · 0.36
GraphMethod · 0.36
addEdgeMethod · 0.36