C++ program creating array the uses the dot product?

normalized dot product

// Matches the Signal with the Pattern Signal using the "dot product"

// of Signal and Pattern divided by the square root of the energy of each.

// According to the Cauchy-Schwartz inequality, the result will be

// between -1 and +1; +1.0 where identical, near 0.0 where unalike and

// -1.0 when the object Signal is the negative of the pattern Signal.

//

// The Pattern must be no longer than the Signal: if it is, an error

// value of -2.0 is returned immediately. If Signal is longer than

// Pattern, then the appropriate "head" of Signal is used. Thus the

// signal vector operation is dot(Pattern[0,L-1], Signal[0,L-1]).

//

// The application, or client, can scan the Pattern along the Signal

// in a loop to create an output signal. That operation is called

// normalized cross correlation.

// Restrict the dot product to the subsignal of amplitudes from

// S[LO]..S[HI] and otherwise behave as the above function.

// Useful for client to search signal object for a matching pattern,

// such as finding the next EKG (heart wave) cycle from the current one.

I am confused what this question is asking, any help understanding it would be awesome. We have a pre set up array with quantitys inside it.

double Signal::normalizedDotProduct (const Signal& Pattern) const

{

?????

}