资源简介
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++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- VC++MFC小游戏实例教程(实例)+MFC类库
- VC++实现CMD命令执行与获得返回信息
- VC++基于OpenGL模拟的一个3维空间模型
- 基于VC++的SolidWorks二次开发SolidWorks
- 派克变换VC++源码(附文档)
- VC++ 串口
- VC++ 大富翁4_大富翁游戏源码
- VC++ 摄像头视频采集与回放源程序
- 转 VC++ 实现电子邮件(Email)发送
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- VC++ 服务程序编写及安装与卸载
- VC++6.0番茄西红柿VAXvirsual assist X完美破
- 基于改进的fcm算法的图像分割vc++
- VC++6.0 绿色版,免安装,非常好用。
- Microsoft Visual C++ 2005 Redistributable Pack
- VC++MFC课程设计的学生成绩管理系统
- 大智慧365DLL插件设计
- VC++6.0汉化包
- VC++完整商业界面源码(再上传)
- VC++编程技术600个大型项目源码.rar
- VC++实现RSA加密算法
- VC++ 中国象棋经典游戏源代码
- 郁金香VC++游戏辅助视频教程
- C语言进阶源码---基于graphics实现图书
- 摄影测量相对定向VC++程序
- VC++数字图像处理典型算法及实现
- VC++酒店客房管理系统 MFC
- 车站计算机联锁vc++6.0程序代码
评论
共有 条评论