1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<HTML>
<HEAD>
<TITLE>TSP (libtsp/VR) - VRfCheckSym</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>VRfCheckSym</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
int VRfCheckSym (const float x[], int N)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Determine if an array of floats is symmetric or anti-symmetric
</DL>
<H4>Description</H4>
This procedure returns a value which indicates whether a given array of float
values is symmetric, anti-symmetric or neither. A symmetric array has values
which satisfy,
<PRE>
x[i] = x[N-i-1], for i = 0, 1, ..., N-1.
</PRE>
An anti-symmetric array has values which satisfy,
<PRE>
x[i] = -x[N-i-1], for i = 0, 1, ..., N-1.
</PRE>
An all-zero array will be declared to be symmetric.
<H4>Parameters</H4>
<DL>
<DT>
<- int VRfCheckSym
<DD>
integer value,
<PRE>
+1, if x[i] = x[N-i-1], for i = 0, 1, ..., N-1
-1, if x[i] = -x[N-i-1], for i = 0, 1, ..., N-1
0, otherwise
</PRE>
<DT>
-> const float x[]
<DD>
Array of floats (N elements)
<DT>
-> int N
<DD>
Number of elements in the input array
</DL>
<H4>Author / revision</H4>
P. Kabal Copyright (C) 1995
/ Revision 1.9 1995/02/09
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>
|