资源简介
MKL统计学包关于样本标准差计算的源程序
代码片段和文件信息
// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。
//
#include “stdafx.h“
#include
#include
#include
#include
// Main program
int _tmain(int argc _TCHAR* argv[])
{
double r[1000];
double ss1s2Raw2MomCentral2Mom;
VSLStreamStatePtr stream;
VSLSSTaskPtr task;
MKL_INT i j errstatusxstoragestatusDIMN;
s = 0.0;
vslNewStream( &stream VSL_BRNG_MCG31 777 );
vdRngGaussian( VSL_RNG_METHOD_GAUSSIAN_ICDF stream 1000 r 5.0 2.0 );
for ( j=0; j<1000; j++ ) {
s += r[j];
}
s /= 1000.0;
errstatus = vslSaveStreamF( stream “d:\\abc“ );
if((errstatus==VSL_ERROR_OK)||(errstatus==VSL_STATUS_OK))
printf(“\n stored successd\n“);
else
printf(“\n err no. : %d stored no successd\n“errstatus);
vslDeleteStream( &stream );
printf( “1.Sample mean of normal distribution = %f\n“ s );
DIM=1;
N=1000;
xstorage=VSL_SS_MATRIX_STORAGE_ROWS;
/* Create a task */
status = vsldSSNewTask( &task &DIM &N &xstorage r 0 0 );
/* Initialize the task parameters */
status = vsldSSEditTask( task VSL_SS_ED_VARIATION &s2 );
status = vsldSSEditMoments( task &s1 &Raw2Mom 0 0&Central2Mom 0 0 );
status = vsldSSCompute(task VSL_SS_MEAN | VSL_SS_VARIATION VSL_SS_METHOD_FAST);
printf(“status3=%d\n“status);
printf( “3.Sample mean and stdev of normal distribution = (%lf %lf)\n“ ss2*s1*sqrt(N/(N-1.0)) );
status=vslSSDeleteTask (&task);
return 0;
}
/*
//*******************************************************************************
! Copyright(C) 2003-2014 Intel Corporation. All Rights Reserved.
!
! The source code information and material (“Material“) contained herein is
! owned by Intel Corporation or its suppliers or licensors and title to such
! Material remains with Intel Corporation or its suppliers or licensors. The
! Material contains proprietary information of Intel or its suppliers and
! licensors. The Material is protected by worldwide copyright laws and treaty
! provisions. No part of the Material may be used copied reproduced
! modified published uploaded posted transmitted distributed or disclosed
! in any way without Intel‘s prior express written permission. No license
! under any patent copyright or other intellectual property rights in the
! Material is granted to or conferred upon you either expressly by
! implication inducement estoppel or otherwise. Any license under such
! intellectual property rights must be express and approved by Intel in
! writing.
!
! *Third Party trademarks are the property of their respective owners.
!
! Unless otherwise agreed by Intel in writing you may not remove or alter
! this notice or any other notice embedded in Materials by Intel or Intel‘s
! suppliers or licensors
相关资源
- VC++调用大漠插件
- VC++ 使用RSA算法防止非法注册机破解软
- VC++开发GIS系统代码陈建春书
- VC++ MFC MSCOMM VS2010 手把手学会串口收发
- C++ 家庭理财管理系统
- VC++解析并显示JPEG图片showjpeg.rar
- vc++能够显示网页html
- C++使用ADO连接Access数据库源代码(修
- VC++连接STK
- 全景图像拼接程序源代码VC++
- 面向对象的编程技术课程设计VC++_MF
- 基于VC++的PC机实现与429通信板的数据
- GPS车辆监控系统源代码
- VC++高精度媒体定时器的使用_MFC
- 等值线追踪与绘制(源代码).rar
- VC++利用消息机制在两个EXE程序间通信
- 仓库管理系统 vc++
- vc++ 画图形,选中图形可以移动图形
- VC++6.0版做的五子棋程序源码,含禁手
- VC++五子棋窗体界面程序源码可以VC6
- VC++视频帧提取软件
- 用vc++ mfc 编写的一个网页浏览器
- vc++ 6.0使用dbghelp.dll生成dmp内存转储文
- VC++(MFC)实现FTP功能(源代码)
- VC++操作MSChart表格控件,效果不错。
- 郁金香vc++辅助教程合集
- VC++ MFC 的计算器的详细设计
- vc++ 和 openGL 做的 3D水波模拟 非常炫
- VC++实现算数编码
- VIsual C++实现的连连看游戏程序
评论
共有 条评论