Fri Feb 24, 2012 10:48 pm
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Display computer code</title>
<style type="text/css">
samp.code{
background: #EEE;
border: 2px groove red;
color: #111;
padding: 6px;
width: 300px;
display: block;
}
</style>
</head>
<body>
<p><samp class="code">
std::vector<std::vector<double> > rawdata(3);<br/>
int datapts = readdata_NxM(argv[4], rawdata);<br/>
if (datapts <= 0) {<br/>
std::cerr << "Error reading data from file \n" << argv[4] << std::endl;<br/>
usage(argv[0]);<br/>
}<br/>
<br/>
// convert from Nx3 matrix to individual vectors. Not very elegant...<br/>
double* xpos = &rawdata[0][0];<br/>
double* ypos = &rawdata[1][0];<br/>
double* clst = &rawdata[2][0];<br/>
double* weights = &weightdata[0][0];<br/>
<br/>
</samp></p>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.