To find the depth of each node in a general double-parent binary tree T with root nodes given in the array r, you can use a recursive algorithm. Here's the algorithm in pseudocode:
```
Algorithm: FindDepth(node, depth)
Set node's depth to the given depth
For each child node of the current node
Recursively call FindDepth(child, depth + 1)
Algorithm: DepthOfEachNode(r)
For each root node in the array r
Call FindDepth(root, 0)
```
In this algorithm, `FindDepth` is a recursive function that takes a node and its current depth as parameters. It sets the depth of the current node to the given depth and then recursively calls itself for each child node, incrementing the depth by 1.
The `DepthOfEachNode` algorithm iterates through each root node in the array r and calls the `FindDepth` function for each root node, starting with a depth of 0.
By running the `DepthOfEachNode` algorithm on the root nodes of the binary tree, the depth of each node will be calculated and stored in each corresponding node.
You can implement this algorithm in your preferred programming language, using the appropriate data structures and tree traversal techniques based on your specific tree representation.