The Cyclomatic Complexity calculator computes a complexity factor based on the number of edges, nodes, and exit nodes.
INSTRUCTIONS: Enter the following:
- (E) Edges
- (N) Nodes
- (P) Exit Nodes
Cyclomatic Complexity (CC): The calculator returns the factor as a real number.
The Math / Science
The Cyclomatic Complexity estimation technique is used to compute the complexity of a program, algorithm, function, module, method, or class by computing the number of linearly independent paths through the code. The computation of the cyclomatic complexity is abstracted from the control flow graph of the program. The nodes of the graph correspond to functionally indivisible code blocks and edges connect two nodes when successive blocks must execute one after the other.
The formula for Cyclomatic Complexity is:
CC = E - N + 2 * P
where:
String Manipulation Utilities
- String Compare: Examines two given strings to see if they are equal to each other.
- Palindrome Check: Evaluates if a given word or sentence is a palindrome.
- Reverse String: Takes a given string of alphanumeric characters and reverses its order.
- Remove Vowels Consonants Numbers Whitespace: Removes all vowels, consonants, numbers, or whitespace from a string of text.
- String to Comma-Separated List: Takes any string and split it into a comma-separated list with options for spaces, bracket types, and capital letters.
- Word Count: Counts the number of words in a given string regardless of punctuation and new lines.
- Character Count: Counts the number of occurrences of each character in a string of text.
- Regex Remove: Takes a regex expression and compares it to a sample string to see which patterns should be removed from the string.
- Affine Cipher Encrypt: Encrypts ciphertext using an Affine Cipher algorithm given the ciphertext and two keys.
- Affine Cipher Decrypt: Decrypts ciphertext using an Affine Cipher algorithm given the ciphertext and two keys.
- Caesar Cipher Encrypt: Encrypts non-numeric data by shifting the letters forward or backward on the alphabet by a constant amount.
- Caesar Cipher Decrypt: Dencrypts non-numeric data by shifting the letters forward or backward on the alphabet by a constant amount.
- String Alphabet Position Sum: Takes a string and converts each character to an integer corresponding to its position in the alphabet and then sums those positions.