blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 986
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 122
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
84c1af4d4314f6fe68ca1d769f7d0e6e688d7e6f | 65e00876bdb944938fc9f80f74c98372268d4d3d | /array/array19.cpp | b953808aa60ede4173c1faffe5f66912a19a343f | [] | no_license | nipunarora-eGov/Coding-Interview-101 | 372086b1e80f03e3f00a7b5b8616e0966c0a29f6 | 9fda66bfe0afedc2d161b1657e75a286a0ccdb9e | refs/heads/main | 2023-02-15T07:59:33.433792 | 2021-01-06T09:57:42 | 2021-01-06T09:57:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 177 | cpp | /*take three pointers i,j,k pointing at the start of every array initially
increment pointer who points the smallest value
if all three point to same element then store in ans*/ | [
"aroranipun1@gmail.com"
] | aroranipun1@gmail.com |
8989bda01d98b87d58b0c6268be1e1bc813e34d6 | ac57d9b3568f7e3808408721b12f1e325ce06969 | /grid.cpp | e13db5b88f4aa1a5ae003caf3f8524e9bd3533cd | [] | no_license | eth-csem/grids | bff609d994ab3430122abc8d8ecb15c0e1458fc9 | 8b33e9ee90babf962c6310848aa740bc37ef104d | refs/heads/master | 2020-12-30T23:09:28.964468 | 2017-08-24T06:27:37 | 2017-08-24T06:27:37 | 80,622,450 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,820 | cpp | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "point_clouds.h"
/*! \file
\brief Main executable. Read input, calls functions to generate specific types of
point clouds, and write the point clouds into a file..
*/
/*==========================================================================*/
/* Main function to compute various grids. ---------------------------------*/
/*==========================================================================*/
int main(int argc, char *argv[])
{
/* Local variables. ----------------------------------------------------*/
PointCloud C;
void print_help();
/* Check which grid to build. ------------------------------------------*/
/* Cubed sphere. -------------------------------------------------------*/
if (!strcmp(argv[1],"cubed_sphere"))
{
printf("\ncubed sphere\n");
printf("name of refinement list: %s\n",argv[2]);
printf("output written to: %s\n",argv[3]);
printf("radius of the sphere: %f km\n",atof(argv[4]));
printf("minimum point distance: %f km\n",atof(argv[5]));
C.cubed_sphere(argv[2],atof(argv[4]));
C.write(argv[3],atof(argv[5]));
}
/* Cubed ball. ---------------------------------------------------------*/
else if (!strcmp(argv[1],"cubed_ball"))
{
printf("\ncubed ball\n");
printf("name of refinement list: %s\n",argv[2]);
printf("output written to: %s\n",argv[3]);
printf("minimum point distance: %f km\n",atof(argv[4]));
C.cubed_ball(argv[2]);
C.write(argv[3], atof(argv[4]));
}
/* Fibonacci sphere. ---------------------------------------------------*/
else if (!strcmp(argv[1],"fibonacci_sphere"))
{
printf("\nFibonacci sphere\n");
printf("name of refinement list: %s\n",argv[2]);
printf("output written to: %s\n",argv[3]);
printf("radius of the sphere: %f km\n",atof(argv[4]));
printf("minimum point distance: %f km\n",atof(argv[5]));
C.fibonacci_sphere(argv[2],atof(argv[4]));
C.write(argv[3], atof(argv[5]));
}
/* Fibonacci ball. -----------------------------------------------------*/
else if (!strcmp(argv[1],"fibonacci_ball"))
{
printf("\nFibonacci ball\n");
printf("name of refinement list: %s\n",argv[2]);
printf("output written to: %s\n",argv[3]);
printf("minimum point distance: %f km\n",atof(argv[4]));
C.fibonacci_ball(argv[2]);
C.write(argv[3], atof(argv[4]));
}
/* Regular spherical grid. ---------------------------------------------*/
else if (!strcmp(argv[1],"regular"))
{
printf("\nregular spherical grid\n");
printf("name of refinement list: %s\n",argv[2]);
printf("output written to: %s\n",argv[3]);
printf("minimum point distance: %f km\n",atof(argv[4]));
C.regular(argv[2]);
C.write(argv[3], atof(argv[4]));
}
/* Vertical profile. ---------------------------------------------------*/
else if (!strcmp(argv[1],"profile"))
{
printf("\nvertical profile\n");
printf("latitude=%lg deg, longitude=%lg deg\n",atof(argv[2]),atof(argv[3]));
printf("radius=%lg:%lg:%lg km\n",atof(argv[4]),atof(argv[6]),atof(argv[5]));
C.profile(atof(argv[2]),atof(argv[3]),atof(argv[4]),atof(argv[5]),atof(argv[6]));
C.write(argv[7], 0.0);
}
/* Vertical slice. -----------------------------------------------------*/
else if (!strcmp(argv[1],"slice"))
{
printf("\nvertical slice\n");
printf("min. latitude=%lg deg, min. longitude=%lg deg, min. radius=%lg km\n",atof(argv[2]),atof(argv[3]),atof(argv[4]));
printf("max. latitude=%lg deg, max. longitude=%lg deg, max. radius=%lg km\n",atof(argv[5]),atof(argv[6]),atof(argv[7]));
printf("radius increment=%lg km, angular increment=%lg deg\n",atof(argv[8]),atof(argv[9]));
C.slice(atof(argv[2]),atof(argv[3]),atof(argv[4]),atof(argv[5]),atof(argv[6]),atof(argv[7]),atof(argv[8]),atof(argv[9]));
C.write(argv[10], 0.0);
}
/* Get help. -----------------------------------------------------------*/
else if (!strcmp(argv[1],"-help"))
{
print_help();
}
/* Error. --------------------------------------------------------------*/
else
{
printf("ERROR! No valid option!\n");
print_help();
}
return 0;
}
/*==========================================================================*/
/* Print help message. -----------------------------------------------------*/
/*==========================================================================*/
void print_help()
{
printf("\nUsage of grid:\n");
printf("--------------\n");
printf("grid cubed_sphere [name of refinement list] [output file name] [radius of the sphere (km)] [min. point distance (km)]\n");
printf("grid cubed_ball [name of refinement list] [output file name] [min. point distance (km)]\n");
printf("grid fibonacci_sphere [name of refinement list] [output file name] [radius of the sphere (km)] [min. point distance (km)]\n");
printf("grid fibonacci_ball [name of refinement list] [output file name] [min. point distance (km)]\n");
printf("grid regular [name of refinement list] [output file name] [minimum point distance (km)]\n");
printf("grid profile [latitude (deg)] [longitude (deg)] [min. radius (km)] [max. radius (km)] [radius increment (km)]\n");
printf("grid slice [min. latitude (deg)] [min. longitude (deg)] [min. radius (km)] [max. latitude (deg)] [max. longitude (deg)] [max. radius (km)] [radius increment (km)] [angular increment (deg)]\n");
} | [
"andreas.fichtner@erdw.ethz.ch"
] | andreas.fichtner@erdw.ethz.ch |
720029270cd32c3ce1346ffbe9fde1acca3e2f5a | beda62f6f4a8ab7f5c9c3a66cc3d7ef5a1d21f78 | /DrinkWater/DrinkWater/DrinkWaterDlg.cpp | c092a6def849543b39f821c68614d10490bd5563 | [] | no_license | radtek/c- | 2295287d5757120fa07f17f6a34b0bb293c1e1d3 | d0715068462c29d7b4a01ac8905ae76d207db16d | refs/heads/master | 2020-11-24T22:20:43.658511 | 2018-09-19T02:04:26 | 2018-09-19T02:04:26 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 12,409 | cpp |
// DrinkWaterDlg.cpp : 实现文件
//
#include "stdafx.h"
#include "DrinkWater.h"
#include "DrinkWaterDlg.h"
#include "afxdialogex.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
//获取当前文件位置
CString GetCurrentPath()
{
HMODULE module = GetModuleHandle(0);
char pFileName[MAX_PATH];
GetModuleFileName(module, pFileName, MAX_PATH);
CString csFullPath(pFileName);
int nPos = csFullPath.ReverseFind( _T('\\') );
if( nPos < 0 )
return CString("");
else
return csFullPath.Left( nPos );
}
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();
// 对话框数据
enum { IDD = IDD_ABOUTBOX };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialogEx(CAboutDlg::IDD)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()
// CDrinkWaterDlg 对话框
CDrinkWaterDlg::CDrinkWaterDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(CDrinkWaterDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_bIconIsExist = FALSE;
m_bPlaySoundOnce = FALSE;
}
void CDrinkWaterDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_STATIC_PIC, m_pic);
}
BEGIN_MESSAGE_MAP(CDrinkWaterDlg, CDialogEx)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_CLOSE()
ON_BN_CLICKED(IDOK, &CDrinkWaterDlg::OnBnClickedOk)
ON_WM_DESTROY()
ON_MESSAGE(WM_SYSTEMTRAY, OnSystemtray)//添加消息映射
ON_COMMAND(ID_32777, &CDrinkWaterDlg::On32777)
ON_COMMAND(ID_32781, &CDrinkWaterDlg::On32781)
ON_WM_TIMER()
END_MESSAGE_MAP()
// CDrinkWaterDlg 消息处理程序
BOOL CDrinkWaterDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// 将“关于...”菜单项添加到系统菜单中。
// IDM_ABOUTBOX 必须在系统命令范围内。
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
m_strCulPath = GetCurrentPath();
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// 设置此对话框的图标。当应用程序主窗口不是对话框时,框架将自动
// 执行此操作
SetIcon(m_hIcon, TRUE); // 设置大图标
SetIcon(m_hIcon, FALSE); // 设置小图标
// TODO: 在此添加额外的初始化代码
SetWindowPos(&wndTopMost,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
if (!m_bIconIsExist)
{
m_NotifyIcon.cbSize = sizeof(NOTIFYICONDATA);
//NotifyIcon.hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_NotifyIcon.hIcon = m_hIcon; //上面那句也可以
m_NotifyIcon.hWnd = m_hWnd;
lstrcpy(m_NotifyIcon.szTip,_T("喝水提醒"));
m_NotifyIcon.uCallbackMessage = WM_SYSTEMTRAY;
m_NotifyIcon.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
m_bIconIsExist = Shell_NotifyIcon(NIM_ADD,&m_NotifyIcon);
//MoveWindow(0,0,0,0);
//SetTimer(TIMER_HIDE_WINDOW,1,NULL);
SetTimer(TIMER_DRINK_WATER,1000,NULL);
}
m_editFont.CreatePointFont(300, "宋体");
GetDlgItem(IDC_ST_GREET)->SetFont(&m_editFont);
GetDlgItem(IDC_ST_DRINK)->SetFont(&m_editFont);
m_bStartUp = bGetStartUp();
m_pic.SetIcon(m_hIcon);
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
void CDrinkWaterDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialogEx::OnSysCommand(nID, lParam);
}
}
// 如果向对话框添加最小化按钮,则需要下面的代码
// 来绘制该图标。对于使用文档/视图模型的 MFC 应用程序,
// 这将由框架自动完成。
void CDrinkWaterDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // 用于绘制的设备上下文
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
// 使图标在工作区矩形中居中
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// 绘制图标
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialogEx::OnPaint();
}
}
//当用户拖动最小化窗口时系统调用此函数取得光标
//显示。
HCURSOR CDrinkWaterDlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
void CDrinkWaterDlg::OnClose()
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
// TODO: 在此添加控件通知处理程序代码
if(Shell_NotifyIcon(NIM_ADD,&m_NotifyIcon))
m_bIconIsExist = TRUE;
this->ShowWindow(HIDE_WINDOW);
//CDialogEx::OnClose();
}
void CDrinkWaterDlg::OnBnClickedOk()
{
// TODO: 在此添加控件通知处理程序代码
OnClose();
}
afx_msg LRESULT CDrinkWaterDlg::OnSystemtray(WPARAM wParam, LPARAM lParam)
{
//wParam接收的是图标的ID,而lParam接收的是鼠标的行为
// if(wParam!=IDR_MAINFRAME)
// return 1;
switch(lParam)
{
case WM_RBUTTONDOWN://右键起来时弹出快捷菜单
{
CMenu menuexit;
//menu.LoadMenuW(IDR_MENU);//加载菜单资源
if (m_bStartUp)
{
menuexit.LoadMenu(IDR_MENU1);
}
else
{
menuexit.LoadMenu(IDR_MENU2);
}
CMenu *pPopup=menuexit.GetSubMenu(0);
CPoint mypoint;
GetCursorPos(&mypoint);
//ClientToScreen(&mypoint);//将客户区坐标转换为屏幕坐标
SetForegroundWindow();
PostMessage(WM_NULL,0,0);
//显示右键菜单,由视类窗口拥有。
pPopup->TrackPopupMenu(TPM_LEFTALIGN,mypoint.x,mypoint.y,this);
}
break;
case WM_LBUTTONDBLCLK://左键单击的处理
{
//ModifyStyleEx(0,WS_EX_TOPMOST); //可以改变窗口的显示风格
//OnTimer(TIMER_DRINK_WATER);
showDlg();
}
break;
}
return 0;
}
void CDrinkWaterDlg::OnBnClickedMfcmenubutton1()
{
// TODO: 在此添加控件通知处理程序代码
}
void CDrinkWaterDlg::OnDestroy()
{
if(Shell_NotifyIcon(NIM_DELETE,&m_NotifyIcon))
m_bIconIsExist = FALSE;
//MessageBox("OnDestroy");
CDialogEx::OnDestroy();
// TODO: 在此处添加消息处理程序代码
}
void CDrinkWaterDlg::On32777()
{
// TODO: 在此添加命令处理程序代码
//托盘右键开机启动
Autostart();
}
void CDrinkWaterDlg::On32781()
{
// TODO: 在此添加命令处理程序代码
//托盘右键退出
CDialogEx::OnCancel();
}
void CDrinkWaterDlg::OnTimer(UINT_PTR nIDEvent)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CTime time = CTime::GetCurrentTime();
CString strHour = time.Format("%H");
CString strMin = time.Format("%M");
CString strSec = time.Format("%S");
int nHour = atoi(strHour);
CString strGreet = "问候";
switch(nIDEvent)
{
case TIMER_HIDE_WINDOW:
ShowWindow(SW_HIDE);
KillTimer(TIMER_HIDE_WINDOW);
break;
case TIMER_DRINK_WATER:
if (m_bIconIsExist)
;//break;
SetDlgItemText(IDC_ST_HOUR,strHour);
SetDlgItemText(IDC_ST_MINUTE,strMin);
SetDlgItemText(IDC_ST_SECOND,strSec);
if (nHour >= 0 && nHour < 5)
strGreet = "凌晨好";
else if (nHour >= 5 && nHour < 7)
strGreet = "清晨好";
else if (nHour >= 7 && nHour < 9)
strGreet = "早上好";
else if (nHour >= 9 && nHour < 12)
strGreet = "上午好";
else if (nHour >= 12 && nHour < 14)
strGreet = "中午好";
else if (nHour >= 14 && nHour < 17)
strGreet = "下午好";
else if (nHour >= 17 && nHour < 19)
strGreet = "傍晚好";
else if (nHour >= 19 && nHour < 21)
strGreet = "晚上好";
else if (nHour >= 21 && nHour < 24)
strGreet = "深夜好";
SetDlgItemText(IDC_ST_GREET,strGreet);
UpdateWindow();
GetDlgItem(IDC_ST_DRINK)->ShowWindow(SW_SHOW);
SetTimer(TIMER_BLINK,700,NULL);
if (m_bPlaySoundOnce)
{
m_bPlaySoundOnce = FALSE;
//PlaySound(m_strCulPath+"\\sound\\drink.wav",NULL, SND_ASYNC|SND_NODEFAULT );
CString strPlaySound = strGreet.Left(4) + "|好|快去喝水了";
DrinkPlaySound(strPlaySound);
}
if ( (strMin == "30" || strMin == "00") && strSec == "00")
showDlg(true);
break;
case TIMER_BLINK:
GetDlgItem(IDC_ST_DRINK)->ShowWindow(SW_HIDE);
KillTimer(TIMER_BLINK);
break;
default:
break;
}
CDialogEx::OnTimer(nIDEvent);
}
void CDrinkWaterDlg::showDlg(bool bAuto)
{
m_bIconIsExist = FALSE;
if (bAuto)
m_bPlaySoundOnce = TRUE;
if(Shell_NotifyIcon(NIM_DELETE,&m_NotifyIcon))
m_bIconIsExist = FALSE;
CRect cr;
GetClientRect(&cr);//获取对话框客户区域大小
ClientToScreen(&cr);//转换为荧幕坐标
int x = GetSystemMetrics ( SM_CXSCREEN );
int y= GetSystemMetrics ( SM_CYSCREEN );
MoveWindow((x - cr.Width())/2 ,cr.top, cr.Width(),cr.Height());
ShowWindow(SW_SHOWNORMAL);
}
//字符串分割
int SplitString(const CString str, char split, CStringArray &strArray)
{
strArray.RemoveAll();
CString strTemp = str;
int iIndex = 0;
while (1)
{
iIndex = strTemp.Find(split);
if(iIndex >= 0)
{
strArray.Add(strTemp.Left(iIndex));
strTemp = strTemp.Right(strTemp.GetLength()-iIndex-1);
}
else
{
break;
}
}
strArray.Add(strTemp);
return strArray.GetSize();
}
void CDrinkWaterDlg::DrinkPlaySound(CString strSound)
{
CStringArray strArray;
int nArraylength = SplitString(strSound,'|',strArray);
if(nArraylength == 0)
return;
for (int i = 0; i < nArraylength; i++)
{
CString strPlaySound = m_strCulPath + "\\sound\\" + strArray[i] + ".wav";
//MessageBox(strPlaySound);
if (i == nArraylength - 1)
PlaySound(strPlaySound,NULL, SND_ASYNC );
else
PlaySound(strPlaySound,NULL, SND_SYNC );
}
}
bool CDrinkWaterDlg::bGetStartUp()
{
bool bRet = false;
HKEY hKey;
CString lpRun = _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
long lRet = RegOpenKeyEx(HKEY_CURRENT_USER, lpRun, 0, KEY_ALL_ACCESS, &hKey);
if(lRet == ERROR_SUCCESS)
{
DWORD dwType = REG_SZ;
DWORD dwSize;
RegQueryValueEx(hKey,_T("DrinkWater"),NULL,NULL,NULL,&dwSize);
TCHAR *szData = new TCHAR[dwSize];
//szData[dwSize-1] = '\0';
lRet = RegQueryValueEx(hKey,_T("DrinkWater"),NULL,&dwType,(LPBYTE)szData,&dwSize);
//lRet = RegSetValueEx(hKey, _T("DrinkWater"), 0, REG_SZ, (LPBYTE)pFileName, (lstrlen(pFileName) + 1)*sizeof(TCHAR));
//lRet = RegQueryValueEx(hKey, _T("ddd"), NULL, NULL, (LPBYTE)&dwData, &dwSize);
//关闭注册表
RegCloseKey(hKey);
if(lRet == ERROR_SUCCESS)
{
bRet = true;
}
else
{
//MessageBox(_T("读取失败!"),_T("提示"));
}
delete []szData;
}
return bRet;
}
void CDrinkWaterDlg::Autostart()
{
m_bStartUp = !m_bStartUp;
HKEY hKey;
//找到系统的启动项
CString lpRun = _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
if(m_bStartUp)
{
//打开启动项Key
long lRet = RegOpenKeyEx(HKEY_CURRENT_USER, lpRun, 0, KEY_ALL_ACCESS, &hKey);
if(lRet == ERROR_SUCCESS)
{
TCHAR pFileName[MAX_PATH] = {0};
//得到程序自身的全路径
DWORD dwRet = GetModuleFileName(NULL, pFileName, MAX_PATH);
TRACE(pFileName);
//添加一个子Key,并设置值 // 下面"Demo"是应用程序名字(不需要加后缀.exe)
lRet = RegSetValueEx(hKey, _T("DrinkWater"), 0, REG_SZ, (LPBYTE)pFileName, (lstrlen(pFileName) + 1)*sizeof(TCHAR));
//关闭注册表
RegCloseKey(hKey);
if(lRet != ERROR_SUCCESS)
{
//MessageBox(_T("系统参数错误,设置自启动失败!"),_T("提示"));
}
else
{
//MessageBox(_T("开机启动设置成功!"), _T("提示"));
}
}
else
{
//MessageBox(_T("系统参数错误,设置自启动失败!"),_T("提示"));
}
}
else
{
long lRet = RegOpenKeyEx(HKEY_CURRENT_USER, lpRun, 0, KEY_ALL_ACCESS, &hKey);
if(lRet == ERROR_SUCCESS)
{
RegDeleteValue(hKey, _T("DrinkWater"));
//关闭注册表
RegCloseKey(hKey);
//MessageBox(_T("关闭开机启动成功!"), _T("提示"));
}
}
}
| [
"625010179@qq.com"
] | 625010179@qq.com |
0d7338da75d40d85b7fa1226d3519f6b1fa130b1 | 9a149637db59ccd94dfe2bb1139d007708b067fe | /bio_data_5_students_structures.cpp | 07e414de7c12c435b30d6ddada38870f2787762b | [] | no_license | Nishant-Pall/C-practice | 280da609cfc53f32e83e9cf0b221843e03343773 | 2502cb7d04ea611a7847720262eee3ad93186db2 | refs/heads/master | 2021-08-15T21:57:15.511091 | 2020-09-05T16:37:48 | 2020-09-05T16:37:48 | 225,806,107 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,446 | cpp | #include<iostream>
#include<string.h>
using namespace std;
struct bio
{
char name[80];
int roll_no;
char branch[20];
int semester;
float subject_marks[10];
float total_marks;
};
int main()
{
bio student[5];
cout<<"Enter bio data of 5 students:"<<endl;
for(int i=0;i<5;++i)
{
cout<<"Enter bio data of student "<<i+1<<" student:"<<endl;
cout<<"Enter name"<<endl;
cin.getline(student[i].name,80);
cout<<"Enter roll no."<<endl;
cin>>student[i].roll_no;
cout<<"Enter Branch:"<<endl;
cin.getline(student[i].branch,20);
cout<<"Enter semester:"<<endl;
cin>>student[i].semester;
cout<<"Enter marks of five students:"<<endl;
for(int j=0;j<5;j++)
{
cout<<"Enter marks of "<<j+1<<" subject:"<<endl;
cin>>student[i].subject_marks[j];
}
student[i].total_marks =
student[i].subject_marks[0]+
student[i].subject_marks[1]+
student[i].subject_marks[2]+
student[i].subject_marks[3]+
student[i].subject_marks[4];
}
cout<<"Bio-data of students who get more than 400 marks:"<<endl;
for(int i=0;i<5;++i)
{
if((student[i].total_marks)>400)
{
cout<<"BIO-DATA....."<<endl;
cout<<"Name:"<<student[i].name<<endl;
cout<<"Roll no. "<<student[i].roll_no;
cout<<"Branch:"<<student[i].branch;
cout<<"Semester:"<<student[i].semester;
cout<<"The marks of five subjects are:"<<endl;
for(int j=0;j<5;++j)
cout<<student[i].subject_marks[j]<<endl;
cout<<"Total marks:"<<student[i].total_marks;
cout<<endl;
}
}
return 0;
}
| [
"palln6935@gmail.com"
] | palln6935@gmail.com |
faf8543327f859ec504d448d7876e777d51b5bde | ad715f9713dc5c6c570a5ac51a18b11932edf548 | /tensorflow/lite/kernels/internal/reference/legacy_reference_ops.h | 3597a78d65afde8f75b0e95131fcf845fa076598 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | rockzhuang/tensorflow | f1f31bc8edfa402b748c500efb97473c001bac95 | cb40c060b36c6a75edfefbc4e5fc7ee720273e13 | refs/heads/master | 2022-11-08T20:41:36.735747 | 2022-10-21T01:45:52 | 2022-10-21T01:45:52 | 161,580,587 | 27 | 11 | Apache-2.0 | 2019-01-23T11:00:44 | 2018-12-13T03:47:28 | C++ | UTF-8 | C++ | false | false | 108,298 | h | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_LEGACY_REFERENCE_OPS_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_LEGACY_REFERENCE_OPS_H_
#include <stdint.h>
#include <sys/types.h>
#include <algorithm>
#include "public/gemmlowp.h"
#include "tensorflow/lite/kernels/internal/common.h"
#include "tensorflow/lite/kernels/internal/legacy_types.h"
#include "tensorflow/lite/kernels/internal/reference/conv.h"
#include "tensorflow/lite/kernels/internal/reference/depthwiseconv_float.h"
#include "tensorflow/lite/kernels/internal/reference/depthwiseconv_uint8.h"
#include "tensorflow/lite/kernels/internal/reference/reference_ops.h"
#include "tensorflow/lite/kernels/internal/reference/tanh.h"
#include "tensorflow/lite/kernels/internal/types.h"
namespace tflite {
namespace reference_ops {
static constexpr int kDepthwiseReverseShift = -1;
inline void ShapeFromDims(const tflite::Dims<4>& dims, RuntimeShape* shape) {
shape->BuildFrom(
{dims.sizes[3], dims.sizes[2], dims.sizes[1], dims.sizes[0]});
}
inline void DepthwiseConv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height,
int dilation_width_factor, int dilation_height_factor,
int pad_width, int pad_height, int depth_multiplier,
float output_activation_min,
float output_activation_max, float* output_data,
const Dims<4>& output_dims) {
tflite::DepthwiseParams op_params;
// Padding type is ignored, but still set.
op_params.padding_type = PaddingType::kSame;
op_params.padding_values.width = pad_width;
op_params.padding_values.height = pad_height;
op_params.stride_width = stride_width;
op_params.stride_height = stride_height;
op_params.dilation_width_factor = dilation_width_factor;
op_params.dilation_height_factor = dilation_height_factor;
op_params.depth_multiplier = depth_multiplier;
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
DepthwiseConv(op_params, DimsToShape(input_dims), input_data,
DimsToShape(filter_dims), filter_data, DimsToShape(bias_dims),
bias_data, DimsToShape(output_dims), output_data);
}
inline void DepthwiseConv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int depth_multiplier,
float output_activation_min,
float output_activation_max, float* output_data,
const Dims<4>& output_dims) {
DepthwiseConv(input_data, input_dims, filter_data, filter_dims, bias_data,
bias_dims, stride_width, stride_height, 1, 1, pad_width,
pad_height, depth_multiplier, output_activation_min,
output_activation_max, output_data, output_dims);
}
// Legacy, for compatibility with old checked-in code.
template <FusedActivationFunctionType Ac>
void DepthwiseConv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int depth_multiplier, float* output_data,
const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
DepthwiseConv(input_data, input_dims, filter_data, filter_dims, bias_data,
bias_dims, stride_width, stride_height, pad_width, pad_height,
depth_multiplier, output_activation_min, output_activation_max,
output_data, output_dims);
}
// Legacy, for compatibility with old checked-in code.
template <FusedActivationFunctionType Ac>
void DepthwiseConv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims, int stride,
int pad_width, int pad_height, int depth_multiplier,
float* output_data, const Dims<4>& output_dims) {
DepthwiseConv<Ac>(input_data, input_dims, filter_data, filter_dims, bias_data,
bias_dims, stride, stride, pad_width, pad_height,
depth_multiplier, output_data, output_dims);
}
inline void DepthwiseConv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height,
int dilation_width_factor, int dilation_height_factor,
int pad_width, int pad_height, int depth_multiplier,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
tflite::DepthwiseParams op_params;
// Padding type is ignored, but still set.
op_params.padding_type = PaddingType::kSame;
op_params.padding_values.width = pad_width;
op_params.padding_values.height = pad_height;
op_params.stride_width = stride_width;
op_params.stride_height = stride_height;
op_params.dilation_width_factor = dilation_width_factor;
op_params.dilation_height_factor = dilation_height_factor;
op_params.depth_multiplier = depth_multiplier;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
op_params.input_offset = input_offset;
op_params.weights_offset = filter_offset;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.output_shift = kDepthwiseReverseShift * output_shift;
DepthwiseConv(op_params, DimsToShape(input_dims), input_data,
DimsToShape(filter_dims), filter_data, DimsToShape(bias_dims),
bias_data, DimsToShape(output_dims), output_data);
}
inline void DepthwiseConv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int depth_multiplier,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
DepthwiseConv(input_data, input_dims, input_offset, filter_data, filter_dims,
filter_offset, bias_data, bias_dims, stride_width,
stride_height, 1, 1, pad_width, pad_height, depth_multiplier,
output_offset, output_multiplier, output_shift,
output_activation_min, output_activation_max, output_data,
output_dims);
}
// Legacy, for compatibility with old checked-in code.
template <FusedActivationFunctionType Ac>
void DepthwiseConv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int depth_multiplier, int32 output_offset,
int32 output_multiplier, int output_shift,
int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims) {
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
DepthwiseConv(input_data, input_dims, input_offset, filter_data, filter_dims,
filter_offset, bias_data, bias_dims, stride_width,
stride_height, pad_width, pad_height, depth_multiplier,
output_offset, output_multiplier, output_shift,
output_activation_min, output_activation_max, output_data,
output_dims);
}
// Legacy, for compatibility with old checked-in code.
template <FusedActivationFunctionType Ac>
void DepthwiseConv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims, int stride,
int pad_width, int pad_height, int depth_multiplier,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
DepthwiseConv<Ac>(input_data, input_dims, input_offset, filter_data,
filter_dims, filter_offset, bias_data, bias_dims, stride,
stride, pad_width, pad_height, depth_multiplier,
output_offset, output_multiplier, output_shift,
output_activation_min, output_activation_max, output_data,
output_dims);
}
inline void Conv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int dilation_width_factor,
int dilation_height_factor, int pad_width, int pad_height,
float output_activation_min, float output_activation_max,
float* output_data, const Dims<4>& output_dims,
float* im2col_data, const Dims<4>& im2col_dims) {
tflite::ConvParams op_params;
// Padding type is ignored, but still set.
op_params.padding_type = PaddingType::kSame;
op_params.padding_values.width = pad_width;
op_params.padding_values.height = pad_height;
op_params.stride_width = stride_width;
op_params.stride_height = stride_height;
op_params.dilation_width_factor = dilation_width_factor;
op_params.dilation_height_factor = dilation_height_factor;
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
Conv(op_params, DimsToShape(input_dims), input_data, DimsToShape(filter_dims),
filter_data, DimsToShape(bias_dims), bias_data, DimsToShape(output_dims),
output_data, DimsToShape(im2col_dims), im2col_data);
}
template <FusedActivationFunctionType Ac>
void Conv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims, int stride_width,
int stride_height, int dilation_width_factor,
int dilation_height_factor, int pad_width, int pad_height,
float* output_data, const Dims<4>& output_dims, float* im2col_data,
const Dims<4>& im2col_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
Conv(input_data, input_dims, filter_data, filter_dims, bias_data, bias_dims,
stride_width, stride_height, dilation_width_factor,
dilation_height_factor, pad_width, pad_height, output_activation_min,
output_activation_max, output_data, output_dims, im2col_data,
im2col_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void Conv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims, int stride_width,
int stride_height, int pad_width, int pad_height, float* output_data,
const Dims<4>& output_dims, float* im2col_data,
const Dims<4>& im2col_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
Conv(input_data, input_dims, filter_data, filter_dims, bias_data, bias_dims,
stride_width, stride_height, 1, 1, pad_width, pad_height,
output_activation_min, output_activation_max, output_data, output_dims,
im2col_data, im2col_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void Conv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims, int stride,
int pad_width, int pad_height, float* output_data,
const Dims<4>& output_dims, float* im2col_data,
const Dims<4>& im2col_dims) {
Conv<Ac>(input_data, input_dims, filter_data, filter_dims, bias_data,
bias_dims, stride, stride, 1, 1, pad_width, pad_height, output_data,
output_dims, im2col_data, im2col_dims);
}
inline void Conv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int dilation_width_factor,
int dilation_height_factor, int pad_width, int pad_height,
int32 output_offset, int32 output_multiplier, int output_shift,
int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims,
uint8* im2col_data, const Dims<4>& im2col_dims,
gemmlowp::GemmContext* gemmlowp_context) {
tflite::ConvParams op_params;
// Padding type is ignored, but still set.
op_params.padding_type = PaddingType::kSame;
op_params.padding_values.width = pad_width;
op_params.padding_values.height = pad_height;
op_params.stride_width = stride_width;
op_params.stride_height = stride_height;
op_params.dilation_width_factor = dilation_width_factor;
op_params.dilation_height_factor = dilation_height_factor;
op_params.input_offset = input_offset;
op_params.weights_offset = filter_offset;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.output_shift = kReverseShift * output_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
Conv(op_params, DimsToShape(input_dims), input_data, DimsToShape(filter_dims),
filter_data, DimsToShape(bias_dims), bias_data, DimsToShape(output_dims),
output_data, DimsToShape(im2col_dims), im2col_data, gemmlowp_context);
}
inline void Conv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims, uint8* im2col_data,
const Dims<4>& im2col_dims,
gemmlowp::GemmContext* gemmlowp_context) {
Conv(input_data, input_dims, input_offset, filter_data, filter_dims,
filter_offset, bias_data, bias_dims, stride_width, stride_height, 1, 1,
pad_width, pad_height, output_offset, output_multiplier, output_shift,
output_activation_min, output_activation_max, output_data, output_dims,
im2col_data, im2col_dims, gemmlowp_context);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
inline void Conv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims, uint8* im2col_data,
const Dims<4>& im2col_dims,
gemmlowp::GemmContext* gemmlowp_context) {
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
Conv(input_data, input_dims, input_offset, filter_data, filter_dims,
filter_offset, bias_data, bias_dims, stride_width, stride_height,
pad_width, pad_height, output_offset, output_multiplier, output_shift,
output_activation_min, output_activation_max, output_data, output_dims,
im2col_data, im2col_dims, gemmlowp_context);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void Conv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims, int stride,
int pad_width, int pad_height, int32 output_offset,
int32 output_multiplier, int output_shift,
int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims, uint8* im2col_data,
const Dims<4>& im2col_dims, gemmlowp::GemmContext* gemmlowp_context) {
Conv<Ac>(input_data, input_dims, input_offset, filter_data, filter_dims,
filter_offset, bias_data, bias_dims, stride, stride, pad_width,
pad_height, output_offset, output_multiplier, output_shift,
output_activation_min, output_activation_max, output_data,
output_dims, im2col_data, im2col_dims, gemmlowp_context);
}
inline void TransposeConv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, float* output_data,
const Dims<4>& output_dims, float* im2col_data,
const Dims<4>& im2col_dims) {
tflite::ConvParams op_params;
// Padding type is ignored, but still set.
op_params.padding_type = PaddingType::kSame;
op_params.padding_values.width = pad_width;
op_params.padding_values.height = pad_height;
op_params.stride_width = stride_width;
op_params.stride_height = stride_height;
TransposeConv(op_params, DimsToShape(input_dims), input_data,
DimsToShape(filter_dims), filter_data,
/*bias_shape*/ RuntimeShape(), /*bias*/ nullptr,
DimsToShape(output_dims), output_data, DimsToShape(im2col_dims),
im2col_data);
}
inline void TransposeConv(
const ConvParams& params, const RuntimeShape& input_shape,
const float* input_data, const RuntimeShape& filter_shape,
const float* filter_data, const RuntimeShape& output_shape,
float* output_data, const RuntimeShape& im2col_shape, float* im2col_data) {
TransposeConv(params, input_shape, input_data, filter_shape, filter_data,
/*bias_shape*/ RuntimeShape(), /*bias*/ nullptr, output_shape,
output_data, im2col_shape, im2col_data);
}
inline void FullyConnected(const float* input_data, const Dims<4>& input_dims,
const float* weights_data,
const Dims<4>& weights_dims, const float* bias_data,
const Dims<4>& bias_dims,
float output_activation_min,
float output_activation_max, float* output_data,
const Dims<4>& output_dims) {
tflite::FullyConnectedParams op_params;
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
FullyConnected(op_params, DimsToShape(input_dims), input_data,
DimsToShape(weights_dims), weights_data,
DimsToShape(bias_dims), bias_data, DimsToShape(output_dims),
output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void FullyConnected(const float* input_data, const Dims<4>& input_dims,
const float* weights_data, const Dims<4>& weights_dims,
const float* bias_data, const Dims<4>& bias_dims,
float* output_data, const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
FullyConnected(input_data, input_dims, weights_data, weights_dims, bias_data,
bias_dims, output_activation_min, output_activation_max,
output_data, output_dims);
}
inline void FullyConnected(
const FullyConnectedParams& params, const RuntimeShape& input_shape,
const uint8* input_data, const RuntimeShape& filter_shape,
const uint8* filter_data, const RuntimeShape& bias_shape,
const int32* bias_data, const RuntimeShape& output_shape,
uint8* output_data, gemmlowp::GemmContext*) {
FullyConnected(params, input_shape, input_data, filter_shape, filter_data,
bias_shape, bias_data, output_shape, output_data);
}
inline void FullyConnected(
const FullyConnectedParams& params, const RuntimeShape& input_shape,
const uint8* input_data, const RuntimeShape& filter_shape,
const uint8* filter_data, const RuntimeShape& bias_shape,
const int32* bias_data, const RuntimeShape& output_shape,
int16* output_data, gemmlowp::GemmContext*) {
FullyConnected(params, input_shape, input_data, filter_shape, filter_data,
bias_shape, bias_data, output_shape, output_data);
}
inline void FullyConnected(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims,
gemmlowp::GemmContext* gemmlowp_context) {
tflite::FullyConnectedParams op_params;
op_params.input_offset = input_offset;
op_params.weights_offset = filter_offset;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.output_shift = kReverseShift * output_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
FullyConnected(op_params, DimsToShape(input_dims), input_data,
DimsToShape(filter_dims), filter_data, DimsToShape(bias_dims),
bias_data, DimsToShape(output_dims), output_data,
gemmlowp_context);
}
inline void FullyConnected(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, int16* output_data,
const Dims<4>& output_dims,
gemmlowp::GemmContext* gemmlowp_context) {
tflite::FullyConnectedParams op_params;
op_params.input_offset = input_offset;
op_params.weights_offset = filter_offset;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.output_shift = kReverseShift * output_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
FullyConnected(op_params, DimsToShape(input_dims), input_data,
DimsToShape(filter_dims), filter_data, DimsToShape(bias_dims),
bias_data, DimsToShape(output_dims), output_data,
gemmlowp_context);
}
inline void ShuffledFullyConnected(
const FullyConnectedParams& params, const RuntimeShape& input_shape,
const uint8* input_data, const RuntimeShape& weights_shape,
const uint8* shuffled_weights_data, const RuntimeShape& bias_shape,
const int32* bias_data, const RuntimeShape& output_shape,
int16* output_data, uint8* shuffled_input_workspace_data,
gemmlowp::GemmContext*) {
ShuffledFullyConnected(params, input_shape, input_data, weights_shape,
shuffled_weights_data, bias_shape, bias_data,
output_shape, output_data,
shuffled_input_workspace_data);
}
inline void ShuffledFullyConnected(
const uint8* input_data, const Dims<4>& input_dims,
const uint8* shuffled_weights_data, const Dims<4>& weights_dims,
const int32* bias_data, const Dims<4>& bias_dims, int32 output_multiplier,
int output_shift, int32 output_activation_min, int32 output_activation_max,
int16* output_data, const Dims<4>& output_dims,
uint8* shuffled_input_workspace_data,
gemmlowp::GemmContext* gemmlowp_context) {
tflite::FullyConnectedParams op_params;
op_params.output_multiplier = output_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.output_shift = kReverseShift * output_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
ShuffledFullyConnected(op_params, DimsToShape(input_dims), input_data,
DimsToShape(weights_dims), shuffled_weights_data,
DimsToShape(bias_dims), bias_data,
DimsToShape(output_dims), output_data,
shuffled_input_workspace_data, gemmlowp_context);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void FullyConnected(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims,
gemmlowp::GemmContext* gemmlowp_context) {
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
FullyConnected(input_data, input_dims, input_offset, filter_data, filter_dims,
filter_offset, bias_data, bias_dims, output_offset,
output_multiplier, output_shift, output_activation_min,
output_activation_max, output_data, output_dims,
gemmlowp_context);
}
inline void LstmCell(const float* input_data, const Dims<4>& input_dims,
const float* prev_activ_data,
const Dims<4>& prev_activ_dims, const float* weights_data,
const Dims<4>& weights_dims, const float* bias_data,
const Dims<4>& bias_dims, const float* prev_state_data,
const Dims<4>& prev_state_dims, float* output_state_data,
const Dims<4>& output_state_dims, float* output_activ_data,
const Dims<4>& output_activ_dims, float* concat_temp_data,
const Dims<4>& concat_temp_dims, float* activ_temp_data,
const Dims<4>& activ_temp_dims) {
tflite::LstmCellParams op_params;
// Float LSTM cell does not need parameters to be set: leave untouched.
LstmCell(op_params, DimsToShape(input_dims), input_data,
DimsToShape(prev_activ_dims), prev_activ_data,
DimsToShape(weights_dims), weights_data, DimsToShape(bias_dims),
bias_data, DimsToShape(prev_state_dims), prev_state_data,
DimsToShape(output_state_dims), output_state_data,
DimsToShape(output_activ_dims), output_activ_data,
DimsToShape(concat_temp_dims), concat_temp_data,
DimsToShape(activ_temp_dims), activ_temp_data);
}
template <int StateIntegerBits>
void LstmCell(const uint8* input_data_uint8, const Dims<4>& input_dims,
const uint8* prev_activ_data_uint8,
const Dims<4>& prev_activ_dims, const uint8* weights_data_uint8,
const Dims<4>& weights_dims, const int32* bias_data_int32,
const Dims<4>& bias_dims, const int16* prev_state_data_int16,
const Dims<4>& prev_state_dims, int16* output_state_data_int16,
const Dims<4>& output_state_dims, uint8* output_activ_data_uint8,
const Dims<4>& output_activ_dims, uint8* concat_temp_data_uint8,
const Dims<4>& concat_temp_dims, int16* activ_temp_data_int16,
const Dims<4>& activ_temp_dims, int32 weights_zero_point,
int32 accum_multiplier, int accum_shift,
gemmlowp::GemmContext* gemmlowp_context) {
tflite::LstmCellParams op_params;
op_params.weights_zero_point = weights_zero_point;
op_params.accum_multiplier = accum_multiplier;
op_params.accum_shift = accum_shift;
LstmCell<StateIntegerBits>(
op_params, DimsToShape(input_dims), input_data_uint8,
DimsToShape(prev_activ_dims), prev_activ_data_uint8,
DimsToShape(weights_dims), weights_data_uint8, DimsToShape(bias_dims),
bias_data_int32, DimsToShape(prev_state_dims), prev_state_data_int16,
DimsToShape(output_state_dims), output_state_data_int16,
DimsToShape(output_activ_dims), output_activ_data_uint8,
DimsToShape(concat_temp_dims), concat_temp_data_uint8,
DimsToShape(activ_temp_dims), activ_temp_data_int16, gemmlowp_context);
}
template <typename T>
void BroadcastDiv(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T output_activation_min, T output_activation_max,
T* output_data, const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
SetActivationParams(output_activation_min, output_activation_max, &op_params);
BroadcastDivSlow(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
inline void Div(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T output_activation_min, T output_activation_max,
T* output_data, const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
SetActivationParams(output_activation_min, output_activation_max, &op_params);
Div(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
template <FusedActivationFunctionType Ac, typename Scalar>
inline void Concatenation(int concat_dim, const Scalar* const* input_data,
const Dims<4>* const* input_dims, int inputs_count,
Scalar* output_data, const Dims<4>& output_dims) {
// For now we don't have a model with a Concatenation with fused activation.
TFLITE_DCHECK_EQ(Ac, FusedActivationFunctionType::kNone);
std::vector<RuntimeShape> input_shapes(inputs_count);
std::vector<const RuntimeShape*> input_shapes_indirect(inputs_count);
for (int i = 0; i < inputs_count; ++i) {
ShapeFromDims(*input_dims[i], &input_shapes[i]);
input_shapes_indirect[i] = &input_shapes[i];
}
tflite::ConcatenationParams op_params;
op_params.axis = 3 - concat_dim;
op_params.inputs_count = inputs_count;
Concatenation(op_params, input_shapes_indirect.data(), input_data,
DimsToShape(output_dims), output_data);
}
inline void Concatenation(int concat_dim, const uint8* const* input_data,
const Dims<4>* const* input_dims,
const int32* input_zeropoint,
const float* input_scale, int inputs_count,
uint8* output_data, const Dims<4>& output_dims,
const int32 output_zeropoint,
const float output_scale) {
std::vector<RuntimeShape> input_shapes(inputs_count);
std::vector<const RuntimeShape*> input_shapes_indirect(inputs_count);
for (int i = 0; i < inputs_count; ++i) {
ShapeFromDims(*input_dims[i], &input_shapes[i]);
input_shapes_indirect[i] = &input_shapes[i];
}
tflite::ConcatenationParams op_params;
op_params.axis = 3 - concat_dim;
op_params.input_zeropoint = input_zeropoint;
op_params.input_scale = input_scale;
op_params.inputs_count = inputs_count;
op_params.output_zeropoint = output_zeropoint;
op_params.output_scale = output_scale;
ConcatenationWithScaling(op_params, input_shapes_indirect.data(), input_data,
DimsToShape(output_dims), output_data);
}
template <FusedActivationFunctionType Ac, typename Scalar>
void DepthConcatenation(const Scalar* const* input_data,
const Dims<4>* const* input_dims, int inputs_count,
Scalar* output_data, const Dims<4>& output_dims) {
// For now we don't have a model with a Concatenation with fused activation.
TFLITE_DCHECK_EQ(Ac, FusedActivationFunctionType::kNone);
std::vector<RuntimeShape> input_shapes(inputs_count);
std::vector<const RuntimeShape*> input_shapes_indirect(inputs_count);
for (int i = 0; i < inputs_count; ++i) {
ShapeFromDims(*input_dims[i], &input_shapes[i]);
input_shapes_indirect[i] = &input_shapes[i];
}
tflite::ConcatenationParams op_params;
op_params.inputs_count = inputs_count;
DepthConcatenation(op_params, input_shapes_indirect.data(), input_data,
DimsToShape(output_dims), output_data);
}
template <typename Scalar>
void TensorFlowSplit(const Scalar* input_data, const Dims<4>& input_dims,
int axis, int outputs_count, Scalar* const* output_data,
const Dims<4>* const* output_dims) {
std::vector<RuntimeShape> output_shapes(outputs_count);
std::vector<const RuntimeShape*> output_shapes_indirect(outputs_count);
for (int i = 0; i < outputs_count; ++i) {
ShapeFromDims(*output_dims[i], &output_shapes[i]);
output_shapes_indirect[i] = &output_shapes[i];
}
tflite::SplitParams op_params;
op_params.axis = 3 - axis;
op_params.num_split = outputs_count;
Split(op_params, DimsToShape(input_dims), input_data,
output_shapes_indirect.data(), output_data);
}
template <FusedActivationFunctionType Ac, typename Scalar>
void TensorFlowSplit(const Scalar* input_data, const Dims<4>& input_dims,
int outputs_count, Scalar* const* output_data,
const Dims<4>* const* output_dims) {
TFLITE_DCHECK_GE(outputs_count, 1);
for (int i = 0; i < outputs_count; i++) {
/* batches = */ MatchingArraySize(*output_dims[i], 3, input_dims, 3);
/* height = */ MatchingArraySize(*output_dims[i], 2, input_dims, 2);
/* width = */ MatchingArraySize(*output_dims[i], 1, input_dims, 1);
}
// For now we don't have a model with a Split with fused activation.
TFLITE_DCHECK_EQ(Ac, FusedActivationFunctionType::kNone);
TensorFlowSplit(input_data, input_dims, /*axis=*/0, outputs_count,
output_data, output_dims);
}
inline void Softmax(const float* input_data, const RuntimeShape& input_shape,
float beta, float* output_data,
const RuntimeShape& output_shape) {
SoftmaxParams params;
params.beta = beta;
Softmax(params, input_shape, input_data, output_shape, output_data);
}
inline void Softmax(const uint8* input_data, const RuntimeShape& input_shape,
int32 input_beta_multiplier, int32 input_beta_left_shift,
int diff_min, uint8* output_data,
const RuntimeShape& output_shape) {
SoftmaxParams params;
params.input_multiplier = input_beta_multiplier;
params.input_left_shift = input_beta_left_shift;
params.diff_min = diff_min;
Softmax(params, input_shape, input_data, output_shape, output_data);
}
inline void LogSoftmax(const float* input_data, const RuntimeShape& input_shape,
float* output_data, const RuntimeShape& output_shape) {
SoftmaxParams params;
// No params currently used for float LogSoftmax.
LogSoftmax(params, input_shape, input_data, output_shape, output_data);
}
inline void LogSoftmax(const uint8* input_data, const RuntimeShape& input_shape,
int32 input_multiplier, int32 input_left_shift,
int32 reverse_scaling_divisor,
int32 reverse_scaling_right_shift, int diff_min,
uint8* output_data, const RuntimeShape& output_shape) {
SoftmaxParams params;
params.input_multiplier = input_multiplier;
params.input_left_shift = input_left_shift;
params.reverse_scaling_divisor = reverse_scaling_divisor;
params.reverse_scaling_right_shift = reverse_scaling_right_shift;
params.diff_min = diff_min;
LogSoftmax(params, input_shape, input_data, output_shape, output_data);
}
inline void Logistic(const LogisticParams& params,
const RuntimeShape& input_shape, const uint8* input_data,
const RuntimeShape& output_shape, uint8* output_data) {
const int32 input_zero_point = params.input_zero_point;
const int32 input_range_radius = params.input_range_radius;
const int32 input_multiplier = params.input_multiplier;
const int input_left_shift = params.input_left_shift;
const int flat_size = MatchingFlatSize(input_shape, output_shape);
for (int i = 0; i < flat_size; i++) {
const uint8 input_val_u8 = input_data[i];
const int32 input_val_centered =
static_cast<int32>(input_val_u8) - input_zero_point;
uint8 output_val;
if (input_val_centered <= -input_range_radius) {
output_val = 0;
} else if (input_val_centered >= input_range_radius) {
output_val = 255;
} else {
const int32 input_val_rescaled =
MultiplyByQuantizedMultiplierGreaterThanOne(
input_val_centered, input_multiplier, input_left_shift);
using FixedPoint4 = gemmlowp::FixedPoint<int32, 4>;
using FixedPoint0 = gemmlowp::FixedPoint<int32, 0>;
const FixedPoint4 input_val_f4 = FixedPoint4::FromRaw(input_val_rescaled);
const FixedPoint0 output_val_f0 = gemmlowp::logistic(input_val_f4);
// Convert from Q0.31 to Q23.8.
using gemmlowp::RoundingDivideByPOT;
int32 output_val_s32 = RoundingDivideByPOT(output_val_f0.raw(), 23);
if (output_val_s32 == 256) {
output_val_s32 = 255;
}
// Reinterpret as U0.8.
TFLITE_DCHECK_GE(output_val_s32, 0);
TFLITE_DCHECK_LE(output_val_s32, 255);
output_val = static_cast<uint8>(output_val_s32);
}
output_data[i] = output_val;
}
}
inline void Logistic(const uint8* input_data, const RuntimeShape& input_shape,
int32 input_zero_point, int32 input_range_radius,
int32 input_multiplier, int input_left_shift,
uint8* output_data, const RuntimeShape& output_shape) {
LogisticParams params;
params.input_zero_point = input_zero_point;
params.input_range_radius = input_range_radius;
params.input_multiplier = input_multiplier;
params.input_left_shift = input_left_shift;
Logistic(params, input_shape, input_data, output_shape, output_data);
}
inline void Logistic(const RuntimeShape& input_shape, const int16* input_data,
const RuntimeShape& output_shape, int16* output_data) {
LogisticParams params;
// No params currently needed by int16 Logistic.
Logistic(params, input_shape, input_data, output_shape, output_data);
}
inline void Tanh(const uint8* input_data, const RuntimeShape& input_shape,
int32 input_zero_point, int32 input_range_radius,
int32 input_multiplier, int input_left_shift,
uint8* output_data, const RuntimeShape& output_shape) {
TanhParams params;
params.input_zero_point = input_zero_point;
params.input_range_radius = input_range_radius;
params.input_multiplier = input_multiplier;
params.input_left_shift = input_left_shift;
Tanh(params, input_shape, input_data, output_shape, output_data);
}
inline void Tanh(const int16* input_data, const RuntimeShape& input_shape,
int input_left_shift, int16* output_data,
const RuntimeShape& output_shape) {
TanhParams params;
params.input_left_shift = input_left_shift;
Tanh(params, input_shape, input_data, output_shape, output_data);
}
inline void Dequantize(const uint8* input_data, const Dims<4>& input_dims,
int32 zero_point, double scale, float* output_data,
const Dims<4>& output_dims) {
tflite::DequantizationParams op_params;
op_params.zero_point = zero_point;
op_params.scale = scale;
Dequantize(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
inline void FakeQuant(const float* input_data, const Dims<4>& input_dims,
float rmin, float rmax, int num_bits, float* output_data,
const Dims<4>& output_dims) {
tflite::FakeQuantParams op_params;
op_params.num_bits = num_bits;
op_params.minmax.min = rmin;
op_params.minmax.max = rmax;
FakeQuant(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
inline void Gather(const T* input_data, const Dims<4>& input_dims,
int input_rank, const int32* coords_data,
const Dims<4>& coords_dims, T* output_data,
const Dims<4>& output_dims) {
tflite::GatherParams op_params;
op_params.axis = 4 - input_rank;
op_params.batch_dims = 0;
Gather(op_params, DimsToShape(input_dims), input_data,
DimsToShape(coords_dims), coords_data, DimsToShape(output_dims),
output_data);
}
inline uint32 LegacyReverseBits32(uint32 n) {
n = ((n >> 1) & 0x55555555) | ((n & 0x55555555) << 1);
n = ((n >> 2) & 0x33333333) | ((n & 0x33333333) << 2);
n = ((n >> 4) & 0x0F0F0F0F) | ((n & 0x0F0F0F0F) << 4);
return (((n & 0xFF) << 24) | ((n & 0xFF00) << 8) | ((n & 0xFF0000) >> 8) |
((n & 0xFF000000) >> 24));
}
inline void StridedSliceReverseIndices(tflite::StridedSliceParams* p) {
TFLITE_CHECK_EQ(p->start_indices_count, p->stop_indices_count);
TFLITE_CHECK_EQ(p->stop_indices_count, p->strides_count);
std::reverse(p->start_indices, p->start_indices + p->start_indices_count);
std::reverse(p->stop_indices, p->stop_indices + p->stop_indices_count);
std::reverse(p->strides, p->strides + p->strides_count);
p->begin_mask = LegacyReverseBits32(static_cast<uint32>(p->begin_mask)) >>
(32 - p->start_indices_count);
p->ellipsis_mask =
LegacyReverseBits32(static_cast<uint32>(p->ellipsis_mask)) >>
(32 - p->start_indices_count);
p->end_mask = LegacyReverseBits32(static_cast<uint32>(p->end_mask)) >>
(32 - p->start_indices_count);
p->new_axis_mask =
LegacyReverseBits32(static_cast<uint32>(p->new_axis_mask)) >>
(32 - p->start_indices_count);
p->shrink_axis_mask =
LegacyReverseBits32(static_cast<uint32>(p->shrink_axis_mask)) >>
(32 - p->start_indices_count);
}
template <typename T>
inline void StridedSlice(const T* input_data, const Dims<4>& input_dims,
int begin_mask, int end_mask, int shrink_axis_mask,
const std::vector<int>& start_indices,
const std::vector<int>& stop_indices,
const std::vector<int>& strides, T* output_data,
const Dims<4>& output_dims) {
TFLITE_DCHECK_EQ(start_indices.size(), 4);
auto op_params = strided_slice::BuildStridedSliceParams(
begin_mask, end_mask, shrink_axis_mask, start_indices, stop_indices,
strides);
StridedSliceReverseIndices(&op_params);
StridedSlice(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
inline void Mean(const T* input_data, const Dims<4>& input_dims,
const std::vector<int>& reduction_indices, T* output_data,
const Dims<4>& output_dims) {
tflite::MeanParams op_params;
op_params.axis_count = reduction_indices.size();
for (int i = 0; i < op_params.axis_count; ++i) {
op_params.axis[i] = reduction_indices[op_params.axis_count - 1 - i];
}
Mean(op_params, DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
template <typename T>
void Transpose(const T* input, const Dims<4>& input_dims, T* output,
const Dims<4>& output_dims, const int* permuted_axes) {
TransposeParams params;
params.perm_count = 4;
for (int i = 0; i < 4; ++i) {
params.perm[i] = 3 - permuted_axes[3 - i];
}
Transpose(params, DimsToShape(input_dims), input, DimsToShape(output_dims),
output);
}
template <typename T, ComparisonFn<T> F>
inline void Comparison(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
bool* output_data, const Dims<4>& output_dims) {
ComparisonParams op_params;
// No parameters needed.
ComparisonImpl<T, F>(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
template <typename T, ComparisonFn<int32> F>
inline void Comparison(int left_shift, const T* input1_data,
const Dims<4>& input1_dims, int32 input1_offset,
int32 input1_multiplier, int input1_shift,
const T* input2_data, const Dims<4>& input2_dims,
int32 input2_offset, int32 input2_multiplier,
int input2_shift, bool* output_data,
const Dims<4>& output_dims) {
tflite::ComparisonParams op_params;
op_params.left_shift = left_shift;
op_params.input1_offset = input1_offset;
op_params.input1_multiplier = input1_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.input1_shift = kReverseShift * input1_shift;
op_params.input2_offset = input2_offset;
op_params.input2_multiplier = input2_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.input2_shift = kReverseShift * input2_shift;
ComparisonWithScaling<T, F>(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
template <typename T, ComparisonFn<T> F>
inline void BroadcastComparison(const T* input1_data,
const Dims<4>& input1_dims,
const T* input2_data,
const Dims<4>& input2_dims, bool* output_data,
const Dims<4>& output_dims) {
ComparisonParams op_params;
// No parameters needed.
BroadcastComparison4DSlowImpl<T, F>(op_params, DimsToShape(input1_dims),
input1_data, DimsToShape(input2_dims),
input2_data, DimsToShape(output_dims),
output_data);
}
template <typename T, ComparisonFn<int32> F>
inline void BroadcastComparison(int left_shift, const T* input1_data,
const Dims<4>& input1_dims, int32 input1_offset,
int32 input1_multiplier, int input1_shift,
const T* input2_data,
const Dims<4>& input2_dims, int32 input2_offset,
int32 input2_multiplier, int input2_shift,
bool* output_data, const Dims<4>& output_dims) {
ComparisonParams op_params;
op_params.left_shift = left_shift;
op_params.input1_offset = input1_offset;
op_params.input1_multiplier = input1_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.input1_shift = kReverseShift * input1_shift;
op_params.input2_offset = input2_offset;
op_params.input2_multiplier = input2_multiplier;
// Legacy ops used mixed left and right shifts. Now all are +ve-means-left.
op_params.input2_shift = kReverseShift * input2_shift;
BroadcastComparison4DSlowWithScaling<T, F>(
op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
#define TFLITE_LEGACY_COMPARISON_OP(name) \
template <typename T> \
inline void name(const T* input1_data, const Dims<4>& input1_dims, \
const T* input2_data, const Dims<4>& input2_dims, \
bool* output_data, const Dims<4>& output_dims) { \
ruy::profiler::ScopeLabel label(#name); \
Comparison<T, name##Fn>(input1_data, input1_dims, input2_data, \
input2_dims, output_data, output_dims); \
} \
template <typename T> \
inline void name( \
int left_shift, const T* input1_data, const Dims<4>& input1_dims, \
int32 input1_offset, int32 input1_multiplier, int input1_shift, \
const T* input2_data, const Dims<4>& input2_dims, int32 input2_offset, \
int32 input2_multiplier, int input2_shift, bool* output_data, \
const Dims<4>& output_dims) { \
ruy::profiler::ScopeLabel label(#name "/8bit"); \
Comparison<T, name##Fn>(left_shift, input1_data, input1_dims, \
input1_offset, input1_multiplier, input1_shift, \
input2_data, input2_dims, input2_offset, \
input2_multiplier, input2_shift, output_data, \
output_dims); \
} \
template <typename T> \
inline void Broadcast##name( \
const T* input1_data, const Dims<4>& input1_dims, const T* input2_data, \
const Dims<4>& input2_dims, bool* output_data, \
const Dims<4>& output_dims) { \
ruy::profiler::ScopeLabel label("Broadcast" #name); \
BroadcastComparison<T, name##Fn>(input1_data, input1_dims, input2_data, \
input2_dims, output_data, output_dims); \
} \
template <typename T> \
inline void Broadcast##name( \
int left_shift, const T* input1_data, const Dims<4>& input1_dims, \
int32 input1_offset, int32 input1_multiplier, int input1_shift, \
const T* input2_data, const Dims<4>& input2_dims, int32 input2_offset, \
int32 input2_multiplier, int input2_shift, bool* output_data, \
const Dims<4>& output_dims) { \
ruy::profiler::ScopeLabel label("Broadcast" #name "/8bit"); \
BroadcastComparison<T, name##Fn>(left_shift, input1_data, input1_dims, \
input1_offset, input1_multiplier, \
input1_shift, input2_data, input2_dims, \
input2_offset, input2_multiplier, \
input2_shift, output_data, output_dims); \
}
TFLITE_LEGACY_COMPARISON_OP(Equal);
TFLITE_LEGACY_COMPARISON_OP(NotEqual);
TFLITE_LEGACY_COMPARISON_OP(Greater);
TFLITE_LEGACY_COMPARISON_OP(GreaterEqual);
TFLITE_LEGACY_COMPARISON_OP(Less);
TFLITE_LEGACY_COMPARISON_OP(LessEqual);
#undef TFLITE_LEGACY_COMPARISON_OP
template <typename D, typename T>
inline void Select(const D* input_condition_data,
const Dims<4>& input_condition_dims, const T* input_x_data,
const Dims<4>& input_x_dims, const T* input_y_data,
const Dims<4>& input_y_dims, T* output_data,
const Dims<4>& output_dims) {
Select(DimsToShape(input_condition_dims), input_condition_data,
DimsToShape(input_x_dims), input_x_data, DimsToShape(input_y_dims),
input_y_data, DimsToShape(output_dims), output_data);
}
template <typename D, typename T>
inline void RankOneSelect(const D* input_condition_data,
const Dims<4>& input_condition_dims,
const T* input_x_data, const Dims<4>& input_x_dims,
const T* input_y_data, const Dims<4>& input_y_dims,
T* output_data, const Dims<4>& output_dims) {
RankOneSelect(DimsToShape(input_condition_dims), input_condition_data,
DimsToShape(input_x_dims), input_x_data,
DimsToShape(input_y_dims), input_y_data,
DimsToShape(output_dims), output_data);
}
template <typename T, typename TI>
inline void SparseToDense(const std::vector<std::vector<TI>>& indices,
const T* values, T default_value, T* output_data,
const Dims<4>& output_dims, bool value_is_scalar) {
SparseToDense(indices, values, default_value, value_is_scalar,
DimsToShape(output_dims), output_data);
}
template <typename Scalar>
void Pack(int dim, const Scalar* const* input_data,
const Dims<4>* const* input_dims, int inputs_count,
Scalar* output_data, const Dims<4>& output_dims) {
std::vector<RuntimeShape> input_shapes(inputs_count);
std::vector<const RuntimeShape*> input_shapes_indirect(inputs_count);
for (int i = 0; i < inputs_count; ++i) {
ShapeFromDims(*input_dims[i], &input_shapes[i]);
input_shapes_indirect[i] = &input_shapes[i];
}
tflite::PackParams op_params;
op_params.axis = 3 - dim;
op_params.inputs_count = inputs_count;
Pack(op_params, input_shapes_indirect.data(), input_data,
DimsToShape(output_dims), output_data);
}
template <typename Scalar>
void Unpack(int axis, const Scalar* input_data, const Dims<4>& input_dims,
int dimensions, int outputs_count, Scalar* const* output_datas,
const Dims<4>& output_dims) {
tflite::UnpackParams op_params;
op_params.axis = 3 - axis;
op_params.num_split = outputs_count;
Unpack(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_datas);
}
template <typename Scalar>
void Pack(int dim, const Scalar* const* input_data,
const Dims<4>* const* input_dims, const int32* input_zeropoint,
const float* input_scale, int inputs_count, Scalar* output_data,
const Dims<4>& output_dims, const int32 output_zeropoint,
const float output_scale) {
std::vector<RuntimeShape> input_shapes(inputs_count);
std::vector<const RuntimeShape*> input_shapes_indirect(inputs_count);
for (int i = 0; i < inputs_count; ++i) {
ShapeFromDims(*input_dims[i], &input_shapes[i]);
input_shapes_indirect[i] = &input_shapes[i];
}
tflite::PackParams op_params;
op_params.axis = 3 - dim;
op_params.input_zeropoint = input_zeropoint;
op_params.input_scale = input_scale;
op_params.inputs_count = inputs_count;
op_params.output_zeropoint = output_zeropoint;
op_params.output_scale = output_scale;
PackWithScaling(op_params, input_shapes_indirect.data(), input_data,
DimsToShape(output_dims), output_data);
}
template <FusedActivationFunctionType Ac>
void L2Normalization(const float* input_data, const RuntimeShape& input_shape,
float* output_data, const RuntimeShape& output_shape) {
static_assert(Ac == FusedActivationFunctionType::kNone, "");
tflite::L2NormalizationParams op_params;
// No params need to be set for float.
L2Normalization(op_params, input_shape, input_data, output_shape,
output_data);
}
inline void L2Normalization(const uint8* input_data,
const RuntimeShape& input_shape,
int32 input_zero_point, uint8* output_data,
const RuntimeShape& output_shape) {
tflite::L2NormalizationParams op_params;
op_params.input_zero_point = input_zero_point;
L2Normalization(op_params, input_shape, input_data, output_shape,
output_data);
}
template <FusedActivationFunctionType Ac>
void L2Normalization(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
L2Normalization<Ac>(input_data, DimsToShape(input_dims), output_data,
DimsToShape(output_dims));
}
inline void L2Normalization(const uint8* input_data, const Dims<4>& input_dims,
int32 input_zero_point, uint8* output_data,
const Dims<4>& output_dims) {
L2Normalization(input_data, DimsToShape(input_dims), input_zero_point,
output_data, DimsToShape(output_dims));
}
inline void Relu(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
Relu(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
inline void Relu1(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
Relu1(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
inline void Relu6(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
Relu6(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
inline void ReluX(uint8 min_value, uint8 max_value, const uint8* input_data,
const RuntimeShape& input_shape, uint8* output_data,
const RuntimeShape& output_shape) {
tflite::ActivationParams params;
params.quantized_activation_max = max_value;
params.quantized_activation_min = min_value;
ReluX(params, input_shape, input_data, output_shape, output_data);
}
template <FusedActivationFunctionType Ac>
inline void Add(int left_shift, const uint8* input1_data,
const Dims<4>& input1_dims, int32 input1_offset,
int32 input1_multiplier, int input1_shift,
const uint8* input2_data, const Dims<4>& input2_dims,
int32 input2_offset, int32 input2_multiplier, int input2_shift,
int32 output_offset, int32 output_multiplier, int output_shift,
int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims) {
constexpr int kReverseShift = -1;
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
TFLITE_DCHECK_LE(output_activation_min, output_activation_max);
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
tflite::ArithmeticParams op_params;
op_params.left_shift = left_shift;
op_params.input1_offset = input1_offset;
op_params.input1_multiplier = input1_multiplier;
op_params.input1_shift = kReverseShift * input1_shift;
op_params.input2_offset = input2_offset;
op_params.input2_multiplier = input2_multiplier;
op_params.input2_shift = kReverseShift * input2_shift;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
op_params.output_shift = kReverseShift * output_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
Add(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
template <FusedActivationFunctionType Ac>
void Add(const int32* input1_data, const Dims<4>& input1_dims,
const int32* input2_data, const Dims<4>& input2_dims,
int32* output_data, const Dims<4>& output_dims) {
ruy::profiler::ScopeLabel label("Add/int32");
TFLITE_DCHECK(Ac == FusedActivationFunctionType::kNone);
tflite::ArithmeticParams op_params;
op_params.quantized_activation_min = std::numeric_limits<int32>::min();
op_params.quantized_activation_max = std::numeric_limits<int32>::max();
Add(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
template <FusedActivationFunctionType Ac>
inline void BroadcastAdd(int left_shift, const uint8* input1_data,
const Dims<4>& input1_dims, int32 input1_offset,
int32 input1_multiplier, int input1_shift,
const uint8* input2_data, const Dims<4>& input2_dims,
int32 input2_offset, int32 input2_multiplier,
int input2_shift, int32 output_offset,
int32 output_multiplier, int output_shift,
int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
constexpr int kReverseShift = -1;
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
TFLITE_DCHECK_LE(output_activation_min, output_activation_max);
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
tflite::ArithmeticParams op_params;
op_params.left_shift = left_shift;
op_params.input1_offset = input1_offset;
op_params.input1_multiplier = input1_multiplier;
op_params.input1_shift = kReverseShift * input1_shift;
op_params.input2_offset = input2_offset;
op_params.input2_multiplier = input2_multiplier;
op_params.input2_shift = kReverseShift * input2_shift;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
op_params.output_shift = kReverseShift * output_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
BroadcastAdd4DSlow(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
template <FusedActivationFunctionType Ac>
void Add(const float* input1_data, const Dims<4>& input1_dims,
const float* input2_data, const Dims<4>& input2_dims,
float* output_data, const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
tflite::ArithmeticParams op_params;
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
Add(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
template <typename T>
void BroadcastAdd(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T output_activation_min, T output_activation_max,
T* output_data, const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
BroadcastAdd4DSlow(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
template <FusedActivationFunctionType Ac>
inline void BroadcastAddFivefold(
int y0, int y1, int y2, int y3, int y4, int left_shift,
const uint8* input1_data, const Dims<4>& input1_dims, int32 input1_offset,
int32 input1_multiplier, int input1_shift, const uint8* input2_data,
const Dims<4>& input2_dims, int32 input2_offset, int32 input2_multiplier,
int input2_shift, int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims) {
constexpr int kReverseShift = -1;
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
TFLITE_DCHECK_LE(output_activation_min, output_activation_max);
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
tflite::ArithmeticParams op_params;
op_params.broadcast_category =
tflite::BroadcastableOpCategory::kFirstInputBroadcastsFast;
op_params.left_shift = left_shift;
op_params.input1_offset = input1_offset;
op_params.input1_multiplier = input1_multiplier;
op_params.input1_shift = kReverseShift * input1_shift;
op_params.input2_offset = input2_offset;
op_params.input2_multiplier = input2_multiplier;
op_params.input2_shift = kReverseShift * input2_shift;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
op_params.output_shift = kReverseShift * output_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
op_params.broadcast_shape[4] = y0;
op_params.broadcast_shape[3] = y1;
op_params.broadcast_shape[2] = y2;
op_params.broadcast_shape[1] = y3;
op_params.broadcast_shape[0] = y4;
BroadcastAddFivefold(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac, typename T>
void BroadcastAdd(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T* output_data, const Dims<4>& output_dims) {
T output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
BroadcastAdd(input1_data, input1_dims, input2_data, input2_dims,
output_activation_min, output_activation_max, output_data,
output_dims);
}
template <FusedActivationFunctionType Ac>
inline void Add(const int16* input1_data, const Dims<4>& input1_dims,
int input1_shift, const int16* input2_data,
const Dims<4>& input2_dims, int input2_shift,
int16 output_activation_min, int16 output_activation_max,
int16* output_data, const Dims<4>& output_dims) {
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
TFLITE_DCHECK_LE(output_activation_min, output_activation_max);
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, -32768);
TFLITE_DCHECK_EQ(output_activation_max, 32767);
}
tflite::ArithmeticParams op_params;
op_params.input1_shift = kReverseShift * input1_shift;
op_params.input2_shift = kReverseShift * input2_shift;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
Add(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
inline void Sub(const float* input1_data, const Dims<4>& input1_dims,
const float* input2_data, const Dims<4>& input2_dims,
float* output_data, const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(FusedActivationFunctionType::kNone,
&output_activation_min, &output_activation_max);
tflite::ArithmeticParams op_params;
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
Sub(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
template <typename T>
void Sub(const T* input1_data, const Dims<4>& input1_dims, const T* input2_data,
const Dims<4>& input2_dims, T* output_data,
const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
op_params.quantized_activation_min = std::numeric_limits<T>::min();
op_params.quantized_activation_max = std::numeric_limits<T>::max();
Sub(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
inline bool AveragePool(const float* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int kwidth, int kheight,
float output_activation_min,
float output_activation_max, float* output_data,
const Dims<4>& output_dims) {
tflite::PoolParams params;
params.stride_height = stride_height;
params.stride_width = stride_width;
params.filter_height = kheight;
params.filter_width = kwidth;
params.padding_values.height = pad_height;
params.padding_values.width = pad_width;
params.float_activation_min = output_activation_min;
params.float_activation_max = output_activation_max;
return AveragePool(params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
// Transitional version that will be moved shortly to legacy_reference_ops, as
// part of RuntimeShape revisions.
inline void BroadcastMul4DSlow(const uint8* input1_data,
const Dims<4>& input1_dims, int32 input1_offset,
const uint8* input2_data,
const Dims<4>& input2_dims, int32 input2_offset,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
SetActivationParams(output_activation_min, output_activation_max, &op_params);
op_params.input1_offset = input1_offset;
op_params.input2_offset = input2_offset;
op_params.output_offset = output_offset;
op_params.output_multiplier = output_multiplier;
op_params.output_shift = output_shift;
BroadcastMul4DSlow(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
inline void BroadcastMul(const uint8* input1_data, const Dims<4>& input1_dims,
int32 input1_offset, const uint8* input2_data,
const Dims<4>& input2_dims, int32 input2_offset,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
BroadcastMul4DSlow(
input1_data, input1_dims, input1_offset, input2_data, input2_dims,
input2_offset, output_offset, output_multiplier,
//
kReverseShift * output_shift,
//
output_activation_min, output_activation_max, output_data, output_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
inline void BroadcastMul(const uint8* input1_data, const Dims<4>& input1_dims,
int32 input1_offset, const uint8* input2_data,
const Dims<4>& input2_dims, int32 input2_offset,
int32 output_offset, int32 output_multiplier,
int output_shift, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
BroadcastMul(input1_data, input1_dims, input1_offset, input2_data,
input2_dims, input2_offset, output_offset, output_multiplier,
output_shift, output_activation_min, output_activation_max,
output_data, output_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
bool AveragePool(const float* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int kwidth, int kheight, float* output_data,
const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
return AveragePool(input_data, input_dims, stride_width, stride_height,
pad_width, pad_height, kwidth, kheight,
output_activation_min, output_activation_max, output_data,
output_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
bool AveragePool(const float* input_data, const Dims<4>& input_dims, int stride,
int pad_width, int pad_height, int filter_width,
int filter_height, float* output_data,
const Dims<4>& output_dims) {
return AveragePool<Ac>(input_data, input_dims, stride, stride, pad_width,
pad_height, filter_width, filter_height, output_data,
output_dims);
}
inline bool AveragePool(const uint8* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int filter_width, int filter_height,
int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
tflite::PoolParams params;
params.stride_height = stride_height;
params.stride_width = stride_width;
params.filter_height = filter_height;
params.filter_width = filter_width;
params.padding_values.height = pad_height;
params.padding_values.width = pad_width;
params.quantized_activation_min = output_activation_min;
params.quantized_activation_max = output_activation_max;
return AveragePool(params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
bool AveragePool(const uint8* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int filter_width, int filter_height,
int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims) {
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
return AveragePool(input_data, input_dims, stride_width, stride_height,
pad_width, pad_height, filter_width, filter_height,
output_activation_min, output_activation_max, output_data,
output_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
bool AveragePool(const uint8* input_data, const Dims<4>& input_dims, int stride,
int pad_width, int pad_height, int filter_width,
int filter_height, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
return AveragePool<Ac>(input_data, input_dims, stride, stride, pad_width,
pad_height, filter_width, filter_height,
output_activation_min, output_activation_max,
output_data, output_dims);
}
inline void MaxPool(const float* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int kwidth, int kheight,
float output_activation_min, float output_activation_max,
float* output_data, const Dims<4>& output_dims) {
tflite::PoolParams params;
params.stride_height = stride_height;
params.stride_width = stride_width;
params.filter_height = kheight;
params.filter_width = kwidth;
params.padding_values.height = pad_height;
params.padding_values.width = pad_width;
params.float_activation_min = output_activation_min;
params.float_activation_max = output_activation_max;
MaxPool(params, DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void MaxPool(const float* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width, int pad_height,
int kwidth, int kheight, float* output_data,
const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
MaxPool(input_data, input_dims, stride_width, stride_height, pad_width,
pad_height, kwidth, kheight, output_activation_min,
output_activation_max, output_data, output_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void MaxPool(const float* input_data, const Dims<4>& input_dims, int stride,
int pad_width, int pad_height, int filter_width, int filter_height,
float* output_data, const Dims<4>& output_dims) {
MaxPool<Ac>(input_data, input_dims, stride, stride, pad_width, pad_height,
filter_width, filter_height, output_data, output_dims);
}
inline void MaxPool(const uint8* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int filter_width, int filter_height,
int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims) {
PoolParams params;
params.stride_height = stride_height;
params.stride_width = stride_width;
params.filter_height = filter_height;
params.filter_width = filter_width;
params.padding_values.height = pad_height;
params.padding_values.width = pad_width;
params.quantized_activation_min = output_activation_min;
params.quantized_activation_max = output_activation_max;
MaxPool(params, DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void MaxPool(const uint8* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width, int pad_height,
int filter_width, int filter_height, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
static_assert(Ac == FusedActivationFunctionType::kNone ||
Ac == FusedActivationFunctionType::kRelu ||
Ac == FusedActivationFunctionType::kRelu6 ||
Ac == FusedActivationFunctionType::kRelu1,
"");
if (Ac == FusedActivationFunctionType::kNone) {
TFLITE_DCHECK_EQ(output_activation_min, 0);
TFLITE_DCHECK_EQ(output_activation_max, 255);
}
MaxPool(input_data, input_dims, stride_width, stride_height, pad_width,
pad_height, filter_width, filter_height, output_activation_min,
output_activation_max, output_data, output_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void MaxPool(const uint8* input_data, const Dims<4>& input_dims, int stride,
int pad_width, int pad_height, int filter_width, int filter_height,
int32 output_activation_min, int32 output_activation_max,
uint8* output_data, const Dims<4>& output_dims) {
MaxPool<Ac>(input_data, input_dims, stride, stride, pad_width, pad_height,
filter_width, filter_height, output_activation_min,
output_activation_max, output_data, output_dims);
}
inline void L2Pool(const float* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int filter_width, int filter_height,
float output_activation_min, float output_activation_max,
float* output_data, const Dims<4>& output_dims) {
PoolParams params;
params.stride_height = stride_height;
params.stride_width = stride_width;
params.filter_height = filter_height;
params.filter_width = filter_width;
params.padding_values.height = pad_height;
params.padding_values.width = pad_width;
params.float_activation_min = output_activation_min;
params.float_activation_max = output_activation_max;
L2Pool(params, DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void L2Pool(const float* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width, int pad_height,
int filter_width, int filter_height, float* output_data,
const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
L2Pool(input_data, input_dims, stride_width, stride_height, pad_width,
pad_height, filter_width, filter_height, output_activation_min,
output_activation_max, output_data, output_dims);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void L2Pool(const float* input_data, const Dims<4>& input_dims, int stride,
int pad_width, int pad_height, int filter_width, int filter_height,
float* output_data, const Dims<4>& output_dims) {
L2Pool<Ac>(input_data, input_dims, stride, stride, pad_width, pad_height,
filter_width, filter_height, output_data, output_dims);
}
inline void Softmax(const float* input_data, const Dims<4>& input_dims,
float beta, float* output_data,
const Dims<4>& output_dims) {
Softmax(input_data, DimsToShape(input_dims), beta, output_data,
DimsToShape(output_dims));
}
inline void Softmax(const uint8* input_data, const Dims<4>& input_dims,
int32 input_beta_multiplier, int32 input_beta_left_shift,
int diff_min, uint8* output_data,
const Dims<4>& output_dims) {
Softmax(input_data, DimsToShape(input_dims), input_beta_multiplier,
input_beta_left_shift, diff_min, output_data,
DimsToShape(output_dims));
}
inline void LogSoftmax(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
LogSoftmax(input_data, DimsToShape(input_dims), output_data,
DimsToShape(output_dims));
}
inline void LogSoftmax(const uint8* input_data, const Dims<4>& input_dims,
int32 input_multiplier, int32 input_left_shift,
int32 reverse_scaling_divisor,
int32 reverse_scaling_right_shift, int diff_min,
uint8* output_data, const Dims<4>& output_dims) {
LogSoftmax(input_data, DimsToShape(input_dims), input_multiplier,
input_left_shift, reverse_scaling_divisor,
reverse_scaling_right_shift, diff_min, output_data,
DimsToShape(output_dims));
}
inline void Logistic(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
Logistic(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
inline void Logistic(const uint8* input_data, const Dims<4>& input_dims,
int32 input_zero_point, int32 input_range_radius,
int32 input_multiplier, int input_left_shift,
uint8* output_data, const Dims<4>& output_dims) {
Logistic(input_data, DimsToShape(input_dims), input_zero_point,
input_range_radius, input_multiplier, input_left_shift, output_data,
DimsToShape(output_dims));
}
inline void Logistic(const int16* input_data, const Dims<4>& input_dims,
int16* output_data, const Dims<4>& output_dims) {
Logistic(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
inline void Tanh(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
Tanh(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
inline void Tanh(const uint8* input_data, const Dims<4>& input_dims,
int32 input_zero_point, int32 input_range_radius,
int32 input_multiplier, int input_left_shift,
uint8* output_data, const Dims<4>& output_dims) {
Tanh(input_data, DimsToShape(input_dims), input_zero_point,
input_range_radius, input_multiplier, input_left_shift, output_data,
DimsToShape(output_dims));
}
inline void Tanh(const int16* input_data, const Dims<4>& input_dims,
int input_left_shift, int16* output_data,
const Dims<4>& output_dims) {
Tanh(input_data, DimsToShape(input_dims), input_left_shift, output_data,
DimsToShape(output_dims));
}
template <typename T>
inline void DepthToSpace(const T* input_data, const Dims<4>& input_dims,
int block_size, T* output_data,
const Dims<4>& output_dims) {
tflite::DepthToSpaceParams op_params;
op_params.block_size = block_size;
DepthToSpace(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
inline void SpaceToDepth(const T* input_data, const Dims<4>& input_dims,
int block_size, T* output_data,
const Dims<4>& output_dims) {
tflite::SpaceToDepthParams op_params;
op_params.block_size = block_size;
SpaceToDepth(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
inline void Mul(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T output_activation_min, T output_activation_max,
T* output_data, const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
SetActivationParams(output_activation_min, output_activation_max, &op_params);
Mul(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac>
void Mul(const float* input1_data, const Dims<4>& input1_dims,
const float* input2_data, const Dims<4>& input2_dims,
float* output_data, const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
tflite::ArithmeticParams op_params;
SetActivationParams(output_activation_min, output_activation_max, &op_params);
Mul(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
template <typename T>
void BroadcastMul(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T output_activation_min, T output_activation_max,
T* output_data, const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
SetActivationParams(output_activation_min, output_activation_max, &op_params);
BroadcastMul4DSlow(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
// legacy, for compatibility with old checked-in code
template <FusedActivationFunctionType Ac, typename T>
void BroadcastMul(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T* output_data, const Dims<4>& output_dims) {
T output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
tflite::ArithmeticParams op_params;
SetActivationParams(output_activation_min, output_activation_max, &op_params);
BroadcastMul4DSlow(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
inline void Mul(const int16* input1_data, const Dims<4>& input1_dims,
const int16* input2_data, const Dims<4>& input2_dims,
int16* output_data, const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
// No params in this version.
Mul(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
inline void Mul(const int16* input1_data, const Dims<4>& input1_dims,
const int16* input2_data, const Dims<4>& input2_dims,
int32 output_offset, int32 output_activation_min,
int32 output_activation_max, uint8* output_data,
const Dims<4>& output_dims) {
tflite::ArithmeticParams op_params;
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
op_params.output_offset = output_offset;
Mul(op_params, DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data, DimsToShape(output_dims),
output_data);
}
inline void LocalResponseNormalization(const float* input_data,
const Dims<4>& input_dims, int range,
float bias, float alpha, float beta,
float* output_data,
const Dims<4>& output_dims) {
tflite::LocalResponseNormalizationParams op_params;
op_params.range = range;
op_params.bias = bias;
op_params.alpha = alpha;
op_params.beta = beta;
LocalResponseNormalization(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
template <typename SrcT, typename DstT>
void Cast(const SrcT* input_data, const Dims<4>& input_dims, DstT* output_data,
const Dims<4>& output_dims) {
Cast(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
inline void Floor(const float* input_data, const Dims<4>& input_dims,
float* output_data, const Dims<4>& output_dims) {
Floor(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
}
template <typename T>
inline void ResizeBilinear(const T* input_data, const Dims<4>& input_dims,
const int32* output_size_data,
const Dims<4>& output_size_dims, T* output_data,
const Dims<4>& output_dims, bool align_corners) {
tflite::ResizeBilinearParams op_params;
op_params.align_corners = align_corners;
op_params.half_pixel_centers = false;
ResizeBilinear(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_size_dims), output_size_data,
DimsToShape(output_dims), output_data);
}
// legacy, for compatibility with old checked-in code
inline void ResizeBilinear(const float* input_data, const Dims<4>& input_dims,
const int32* output_size_data,
const Dims<4>& output_size_dims, float* output_data,
const Dims<4>& output_dims) {
ResizeBilinear<float>(input_data, input_dims, output_size_data,
output_size_dims, output_data, output_dims,
/*align_corners=*/false);
}
inline void ResizeBilinear(const uint8* input_data, const Dims<4>& input_dims,
const int32* output_size_data,
const Dims<4>& output_size_dims, uint8* output_data,
const Dims<4>& output_dims) {
ResizeBilinear<uint8>(input_data, input_dims, output_size_data,
output_size_dims, output_data, output_dims,
/*align_corners=*/false);
}
template <typename T>
inline void SpaceToBatchND(const T* input_data, const Dims<4>& input_dims,
const int32* block_shape_data,
const Dims<4>& block_shape_dims,
const int32* paddings_data,
const Dims<4>& paddings_dims, T* output_data,
const Dims<4>& output_dims,
const int32_t pad_value) {
tflite::SpaceToBatchParams op_params;
op_params.output_offset = pad_value;
SpaceToBatchND(op_params, DimsToShape(input_dims), input_data,
DimsToShape(block_shape_dims), block_shape_data,
DimsToShape(paddings_dims), paddings_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
inline void SpaceToBatchND(const T* input_data, const Dims<4>& input_dims,
const int32* block_shape_data,
const Dims<4>& block_shape_dims,
const int32* paddings_data,
const Dims<4>& paddings_dims, T* output_data,
const Dims<4>& output_dims) {
tflite::SpaceToBatchParams op_params;
op_params.output_offset = 0;
SpaceToBatchND(op_params, DimsToShape(input_dims), input_data,
DimsToShape(block_shape_dims), block_shape_data,
DimsToShape(paddings_dims), paddings_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
inline void BatchToSpaceND(const T* input_data, const Dims<4>& input_dims,
const int32* block_shape_data,
const Dims<4>& block_shape_dims,
const int32* crops_data, const Dims<4>& crops_dims,
T* output_data, const Dims<4>& output_dims) {
BatchToSpaceND(DimsToShape(input_dims), input_data,
DimsToShape(block_shape_dims), block_shape_data,
DimsToShape(crops_dims), crops_data, DimsToShape(output_dims),
output_data);
}
// Legacy signature, function covered both Pad and PadV2.
template <typename T>
inline void PadV2(const T* input_data, const Dims<4>& input_dims,
const std::vector<int>& left_paddings,
const std::vector<int>& right_paddings, T* output_data,
const Dims<4>& output_dims, const T pad_value) {
TFLITE_DCHECK_EQ(left_paddings.size(), 4);
TFLITE_DCHECK_EQ(right_paddings.size(), 4);
tflite::PadParams op_params;
op_params.left_padding_count = 4;
op_params.right_padding_count = 4;
for (int i = 0; i < 4; ++i) {
op_params.left_padding[i] = left_paddings[3 - i];
op_params.right_padding[i] = right_paddings[3 - i];
}
// SetFloatOrInt(pad_value, &op_params.pad_value);
const T pad_value_copy = pad_value;
Pad(op_params, DimsToShape(input_dims), input_data, &pad_value_copy,
DimsToShape(output_dims), output_data);
}
// Old Pad that calls legacy PadV2.
template <typename T>
inline void Pad(const T* input_data, const Dims<4>& input_dims,
const std::vector<int>& left_paddings,
const std::vector<int>& right_paddings, T* output_data,
const Dims<4>& output_dims, const int32_t pad_value) {
const T converted_pad_value = static_cast<T>(pad_value);
PadV2<T>(input_data, input_dims, left_paddings, right_paddings, output_data,
output_dims, converted_pad_value);
}
// Old Pad that only padded with 0.
template <typename T>
inline void Pad(const T* input_data, const Dims<4>& input_dims,
const std::vector<int>& left_paddings,
const std::vector<int>& right_paddings, T* output_data,
const Dims<4>& output_dims) {
const T pad_value = static_cast<T>(0);
PadV2<T>(input_data, input_dims, left_paddings, right_paddings, output_data,
output_dims, pad_value);
}
template <typename T>
void TensorFlowMinimum(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, T* output_data,
const Dims<4>& output_dims) {
Minimum(DimsToShape(input1_dims), input1_data, input2_data,
DimsToShape(output_dims), output_data);
}
template <typename T>
void TensorFlowMaximum(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, T* output_data,
const Dims<4>& output_dims) {
Maximum(DimsToShape(input1_dims), input1_data, input2_data,
DimsToShape(output_dims), output_data);
}
template <typename T, typename Op>
void TensorFlowMaximumMinimum(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T* output_data, const Dims<4>& output_dims,
Op op) {
MaximumMinimumBroadcastSlow(DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data, op);
}
template <typename T1, typename T2, typename T3>
void ArgMax(const T3* axis, const T1* input_data,
const tflite::Dims<4>& input_dims, T2* output_data,
const tflite::Dims<4>& output_dims) {
// Assumes the input always has 4 dimensions, and therefore,
// output always has three dimensions.
auto output_shape = RuntimeShape(
{output_dims.sizes[2], output_dims.sizes[1], output_dims.sizes[0]});
// Another way to interpret this is that output_dims.sizes[4] is always 1.
TFLITE_DCHECK_EQ(output_shape.FlatSize(),
DimsToShape(output_dims).FlatSize());
// Legacy path only supported this.
TFLITE_DCHECK_EQ(axis[0], 3);
ArgMinMax(DimsToShape(input_dims), input_data, axis, output_shape,
output_data, std::greater<T1>());
}
template <typename T1, typename T2, typename T3, typename Cmp>
void ArgMinMax(const T3* axis, const T1* input_data, const Dims<4>& input_dims,
T2* output_data, const Dims<4>& output_dims, const Cmp& cmp) {
ArgMinMax(axis, DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data, cmp);
}
template <typename T>
inline void Pow(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T* output_data, const Dims<4>& output_dims) {
Pow(DimsToShape(input1_dims), input1_data, DimsToShape(input2_dims),
input2_data, DimsToShape(output_dims), output_data);
}
template <typename T>
inline void BroadcastPow(const T* input1_data, const Dims<4>& input1_dims,
const T* input2_data, const Dims<4>& input2_dims,
T* output_data, const Dims<4>& output_dims) {
BroadcastPow4DSlow(DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data);
}
// R: Result type. T1: Input 1 type. T2: Input 2 type.
template <typename R, typename T1, typename T2>
inline void BroadcastBinaryFunction(const T1* input1_data,
const Dims<4>& input1_dims,
const T2* input2_data,
const Dims<4>& input2_dims, R* output_data,
const Dims<4>& output_dims,
R (*func)(T1, T2)) {
BroadcastBinaryFunction(DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data, func);
}
// R: Result type. T1: Input 1 type. T2: Input 2 type.
template <typename R, typename T1, typename T2>
inline void BinaryFunction(const T1* input1_data, const Dims<4>& input1_dims,
const T2* input2_data, const Dims<4>& input2_dims,
R* output_data, const Dims<4>& output_dims,
R (*func)(T1, T2)) {
BinaryFunction(DimsToShape(input1_dims), input1_data,
DimsToShape(input2_dims), input2_data,
DimsToShape(output_dims), output_data, func);
}
template <typename T>
inline void Slice(const T* input_data, const Dims<4>& input_dims,
const std::vector<int>& begin, const std::vector<int>& size,
T* output_data, const Dims<4>& output_dims) {
tflite::SliceParams op_params;
op_params.begin_count = 4;
op_params.size_count = 4;
for (int i = 0; i < 4; ++i) {
op_params.begin[i] = begin[3 - i];
op_params.size[i] = size[3 - i];
}
Slice(op_params, DimsToShape(input_dims), input_data,
DimsToShape(output_dims), output_data);
}
} // namespace reference_ops
} // namespace tflite
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_LEGACY_REFERENCE_OPS_H_
| [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
0274c9c5ab94eb4f5772f3d94faacf8cc4c0bc93 | 09d896b9d10729392aadd20d8463d622842d1be8 | /Practical.cpp | 27d0d749240d2435df39dccf263c094085591f1b | [] | no_license | KaranManral/Basic_CPP_Programs | 72144d6055a7c74e9551b88c70702ecfe1803cdd | 0d7dc12a813efd882ca8ecf56bc0c9d480e72056 | refs/heads/main | 2023-08-13T12:16:19.082460 | 2021-10-19T07:36:04 | 2021-10-19T07:36:04 | 418,812,748 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,143 | cpp | /* Name:Karan Singh Manral
RollNo. 5755
Date 09/03/2021
Ques-WAP to Calculate Sum of First n Prime Numbers using functions.
*/
#include <iostream>
#include <iomanip>
using namespace std;
bool checkPrime(int n) //Function to check if prime
{
int ctr=0;
for(int i=1;i<=n/2;i++)
{
if(n%i==0) //Checking for divisibility
ctr++; //Increasing counter if divisible..
}
if(ctr==1)
return true;
else
return false;
}
int sumPrime(int n) //Function to Calculate sum of first n Prime Numbers
{
int sum=0,c=0;
for(int i=1;c!=n;i++) //Loop running till sum of n prime numbers is calculated
{
if(checkPrime(i))
{
sum+=i; //Calculating Sum
c++; //Increasing count
}
}
return sum; //Returning sum
}
int main()
{
int n;
cout<<"Enter the value of n"<<endl;
cin>>n; //Taking input value of n
cout<<"Sum of First n Prime Numbers is:"<<sumPrime(n)<<endl; //Printing Required Result
return 1;
}//main | [
"noreply@github.com"
] | KaranManral.noreply@github.com |
63846d5c1b40793df544b6d3b8976b846f5568c0 | 7888f2f75d277c64bfc71009ec0eb32bc45a1681 | /Arquivos_Curso_Arduino/arduino_aula_55/Aula_55/Btn.h | d7511389e1a13fb9e0957d3c596c0de7cfb2b9ea | [
"MIT"
] | permissive | maledicente/cursos | bba06a0d09037fd8cae69927c996805d513ddb25 | 00ace48da7e48b04485e4ca97b3ca9ba5f33a283 | refs/heads/master | 2023-08-12T03:01:02.799974 | 2021-10-11T14:29:35 | 2021-10-11T14:29:35 | 273,795,405 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,031 | h | class Btn{
public:
int *pino;
bool btnclicado;
bool btnliberado;
int ultimoEstadoBtn=LOW;
unsigned long tempoPrimeiroAcionamento=0;
unsigned long tempoDebounce=50;
typedef void (funcao)(void);
//typedef retorno (nome_função)(Parâmetros de entrada);
Btn(int p){
btnclicado=false;
btnliberado=false;
this->pino=p;
}
void clique(funcao *f){
//Rotina Debounce
int leitura=digitalRead(*pino);
if(leitura!=ultimoEstadoBtn){
tempoPrimeiroAcionamento=millis();
}
if((millis()-tempoPrimeiroAcionamento)>tempoDebounce){
//Debounce tratato, comandos que serão executados no acionamento do botão
if(digitalRead(*pino)){
btnclicado=true;
btnliberado=false;
}else{
btnliberado=true;
}
if((btnclicado)and(btnliberado)){
btnclicado=false;
btnliberado=false;
f();
}
}
ultimoEstadoBtn=leitura;
}
};
| [
"luizpaulonievola@ymail.com"
] | luizpaulonievola@ymail.com |
2b1030f2adaffa712f841d67a7f3d8cb4e91c74e | 2d2c69acda9154755be0a22b9ec1b710789a5bf0 | /CodeChef/October Challenge/ReplaceForX.cpp | 7711a6777efc849b2b0eace72179e269942a8bfa | [] | no_license | Kalit31/cp-playground | 2f74282a29222a308c022115e1a733ed2ed8dd6f | 572b543403498ffa12e80236a245bd7fb71249dd | refs/heads/master | 2023-06-26T21:50:26.676082 | 2021-07-31T08:45:15 | 2021-07-31T08:45:15 | 228,023,746 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,315 | cpp | #include <bits/stdc++.h>
#define ll long long int
#define deb(x) cout << #x << " " << x << endl;
#define fast std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define endl "\n"
using namespace std;
// never use endl, it is much slower than "\n"
// dont mess up with LONG_LONG_MAX/LONG_MAX/INT_MAX
void solve(vector<ll> A, ll N, ll X, ll p, ll k)
{
sort(A.begin(), A.end());
ll operations = 0;
if (A[p] == X)
{
cout << operations << endl;
return;
}
if (N == 1)
{
cout << 1 << endl;
return;
}
if (p == k)
{
if (X > A[p])
{
int i = p;
while (i < N)
{
if (A[i] >= X)
{
break;
}
operations++;
i++;
}
}
else
{
int i = p;
while (i >= 0)
{
if (A[i] <= X)
{
break;
}
operations++;
i--;
}
}
}
else if (p < k)
{
if (A[p] < X)
{
cout << "-1" << endl;
return;
}
ll i = p;
while (i >= 0)
{
if (A[i] <= X)
{
break;
}
operations++;
i--;
}
}
else
{
if (A[p] > X)
{
cout << "-1" << endl;
return;
}
ll i = p;
while (i < N)
{
if (A[i] >= X)
{
break;
}
operations++;
i++;
}
}
cout << operations << endl;
return;
}
int main()
{
fast;
#ifndef ONLINE_JUDGE
freopen("/home/kalit/Desktop/Data Structures-Algo-Competitive/src/codeforces/input.txt", "r", stdin);
freopen("/home/kalit/Desktop/Data Structures-Algo-Competitive/src/codeforces/output.txt", "w", stdout);
#endif
int T;
cin >> T;
while (T--)
{
ll N, X, p, k;
cin >> N >> X >> p >> k;
vector<ll> A(N);
for (int i = 0; i < N; i++)
{
cin >> A[i];
}
solve(A, N, X, p - 1, k - 1);
}
return 0;
} | [
"inanikalit31@gmail.com"
] | inanikalit31@gmail.com |
f244fd2860391f0c9980bc7f65e39dcfa02bbb53 | f7f31db1e48966c0658c09ead4c5ccd0d0fd7510 | /12.4/stack.h | c0c40eacc5263f174f8cbf3d106d8b1e319e1f6b | [] | no_license | shadimsaleh/C-Plus-Plus-Primer-Plus-Homework | b113d5527162fcbd6e568bd032706a8c38f6f11d | 104acd78a353e7a351591e8d6b376f47a8c8db71 | refs/heads/master | 2021-01-20T11:48:10.620433 | 2017-03-01T13:14:59 | 2017-03-01T13:14:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 689 | h | // stack.h -- class declaration for the stack ADT
typedef unsigned long Item;
class Stack
{
private:
enum { MAX = 10 }; // constant specific to class
Item *pitems_; // holds stack items
int size_; // number of elements in stack
int top_; // index for top stack item
public:
Stack(int n = MAX); // create stack with n elements
Stack(const Stack &st);
~Stack();
bool IsEmpty() const;
bool IsFull() const;
// push() returns false if stack already is full, true otherwise
bool Push(const Item &item); // add item to stack
// pop() returns false if stack already is empty, true otherwise
bool Pop(Item &item); // pop top into item
Stack & operator=(const Stack &st);
}; | [
"mengfanqi0828@163.com"
] | mengfanqi0828@163.com |
a7836607b5819358e36b67aaa46f5ca2ecfc4988 | 1af49694004c6fbc31deada5618dae37255ce978 | /chromeos/components/sensors/fake_sensor_service.h | 1a2b6f0e524b0ceed5d0ac436486743712be5689 | [
"BSD-3-Clause"
] | permissive | sadrulhc/chromium | 59682b173a00269ed036eee5ebfa317ba3a770cc | a4b950c23db47a0fdd63549cccf9ac8acd8e2c41 | refs/heads/master | 2023-02-02T07:59:20.295144 | 2020-12-01T21:32:32 | 2020-12-01T21:32:32 | 317,678,056 | 3 | 0 | BSD-3-Clause | 2020-12-01T21:56:26 | 2020-12-01T21:56:25 | null | UTF-8 | C++ | false | false | 2,257 | h | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_COMPONENTS_SENSORS_FAKE_SENSOR_SERVICE_H_
#define CHROMEOS_COMPONENTS_SENSORS_FAKE_SENSOR_SERVICE_H_
#include <map>
#include <set>
#include <vector>
#include "base/sequence_checker.h"
#include "chromeos/components/sensors/fake_sensor_device.h"
#include "chromeos/components/sensors/mojom/sensor.mojom.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote_set.h"
namespace chromeos {
namespace sensors {
class FakeSensorService final : public mojom::SensorService {
public:
FakeSensorService();
FakeSensorService(const FakeSensorService&) = delete;
FakeSensorService& operator=(const FakeSensorService&) = delete;
~FakeSensorService() override;
bool is_bound();
void Bind(mojo::PendingReceiver<mojom::SensorService> pending_receiver);
void OnServiceDisconnect();
void SetDevice(int32_t iio_device_id,
std::set<mojom::DeviceType> types,
std::unique_ptr<FakeSensorDevice> sensor_device);
// Implementation of mojom::SensorService.
void GetDeviceIds(mojom::DeviceType type,
GetDeviceIdsCallback callback) override;
void GetAllDeviceIds(GetAllDeviceIdsCallback callback) override;
void GetDevice(
int32_t iio_device_id,
mojo::PendingReceiver<mojom::SensorDevice> device_request) override;
void RegisterNewDevicesObserver(
mojo::PendingRemote<mojom::SensorServiceNewDevicesObserver> observer)
override;
private:
struct DeviceData {
DeviceData();
DeviceData(DeviceData&&);
DeviceData& operator=(DeviceData&&);
~DeviceData();
std::set<mojom::DeviceType> types;
std::unique_ptr<FakeSensorDevice> sensor_device;
};
// First is the iio_device_id, second is the device's data.
std::map<int32_t, DeviceData> devices_;
mojo::Receiver<mojom::SensorService> receiver_{this};
mojo::RemoteSet<mojom::SensorServiceNewDevicesObserver> observers_;
SEQUENCE_CHECKER(sequence_checker_);
};
} // namespace sensors
} // namespace chromeos
#endif // CHROMEOS_COMPONENTS_SENSORS_FAKE_SENSOR_SERVICE_H_
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
bf8f4138084c6eb5cd34f95f36578aa8a32ed077 | 01c298cb45df74f8d61ae39cbe80121a4e88b4ea | /TextFile.h | ba9ee1aed05317018787d64a1455cbb37fb7e56c | [] | no_license | knied/LD30 | b76080ea4ff6bc7f80bc997762c3757aa0352ce3 | 61fdba506fe9df2202e417d09b8309df68270730 | refs/heads/master | 2021-01-20T12:00:53.069619 | 2014-08-25T23:23:50 | 2014-08-25T23:23:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 591 | h | //
// TextFile.h
// LD30Xcode
//
// Created by Kristof Niederholtmeyer on 22.08.14.
// Copyright (c) 2014 Kristof Niederholtmeyer. All rights reserved.
//
#ifndef __LD30Xcode__TextFile__
#define __LD30Xcode__TextFile__
#include <iostream>
#include <fstream>
#include <streambuf>
class TextFile {
std::ifstream _file;
public:
TextFile(std::string const& filename);
~TextFile();
std::string next_line();
std::string content();
void jump_to_top();
bool end_of_file();
bool is_open() const;
};
#endif /* defined(__LD30Xcode__TextFile__) */
| [
"kristof.niederholtmeyer@rwth-aachen.de"
] | kristof.niederholtmeyer@rwth-aachen.de |
150bba9f7c68e2fe2dbe81faedd223ffdd6e52d6 | 53b47be6a13c99c278e7281bbb3d9bc842e37d03 | /CheckTemplates/checktemplates.h | abcf3966a701b8b2928869e1bba5b64b2b466d51 | [] | no_license | hcjjy/CheckTempaltes | 762798442ee2df93cad3a26e49c188c69198e7bd | 021d294382fcb6a97b37c77bbadb363d4919ba5c | refs/heads/master | 2021-01-10T11:37:02.247423 | 2015-12-03T02:14:35 | 2015-12-03T02:14:35 | 47,300,977 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,365 | h | #pragma once
#include <QtGui/QDialog>
#include <QDomElement>
#include "MyWidget.h"
#include <QtGui/QTreeWidgetItem>
class QPushButton;
class MyTreeWidget;
class QTreeWidgetItem;
class Video;
class BlackFrame;
class ColorFrame;
class Audio;
class Silence;
class PeakLevel;
class StereoCorrelation;
class StereoInvertPhase;
class StereoSamePhase;
class QXmlStreamWriter;
class QStackedWidget;
class CheckTemplates :
public QDialog
{
Q_OBJECT
public:
CheckTemplates(QWidget * parent = NULL);
virtual ~CheckTemplates(void);
public slots:
void save();
void saveAs();
void cancel();
void showItem();
void showItem(QTreeWidgetItem* item, int column);
protected:
virtual void resizeEvent(QResizeEvent *event);
private:
bool domReadXml(const QString &fileName,QMap<QString ,QTreeWidgetItem* > &nameToPtr);
void domReadElement(QDomElement element,QMap<QString ,QTreeWidgetItem* > &nameToPtr);
bool domWriteXml(const QString &fileName);
void domWriteElement(QDomDocument &doc,QDomElement xmlElement,
QTreeWidgetItem *item);
QTreeWidgetItem* addTreeWidgetItem(QTreeWidgetItem *parent,QString itemName,
MyWidget *widget,QString tagName,QMap<QString ,QTreeWidgetItem* > &nameToPtr);
private:
MyTreeWidget *m_pTreeWidget;
QPushButton *m_pSaveButton;
QPushButton *m_pSaveAsButton;
QPushButton *m_pCancelButton;
QStackedWidget *m_pStackedWidget;
};
| [
"heqinghui1@163.com"
] | heqinghui1@163.com |
a39bdd27bae7f61c14cecbcb1fe47e20e5350767 | 6b89c9bd317f6164a8e7ce3309731db0a6f60a88 | /generatedEFGcode.h | ad43f09da5f86863cbd58cb7c4ecf2bb5c84019c | [
"MIT"
] | permissive | amit112amit/minperimeter | 3de5cf4f0597e5c118eca93b482e55368457175b | d9b8afd66a463ece18a2a0847c954e8c1a61c846 | refs/heads/master | 2022-10-26T10:41:11.616654 | 2020-06-16T11:54:24 | 2020-06-16T11:54:24 | 272,694,784 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,686 | h | #ifndef __GENERATEDEFG_CODE_H__
#define __GENERATEDEFG_CODE_H__
#include <tuple>
#include "settings.h"
typedef std::tuple<scalar, scalar, scalar> tuple3;
struct EFGFunc{
tuple3 operator()(const scalar r, const scalar t, const scalar a, const scalar b){
/* Function generated by `generatecode.py` */
//############## Sub-expressions ##############
scalar x0 = math::sin(t);
scalar x1 = math::cos(t);
scalar x2 = r*x1;
scalar x3 = PI*(a + x2);
scalar x4 = r*x0;
scalar x5 = PI*(b + x4);
scalar x6 = math::sin(x3)*math::sin(x5);
scalar x7 = x0*x6;
scalar x8 = math::cos(x3)*math::cos(x5);
scalar x9 = x1*x8;
scalar x10 = PI*(5*a + 5*x2);
scalar x11 = PI*(5*b + 5*x4);
scalar x12 = math::cos(x10)*math::cos(x11);
scalar x13 = 0.36036036036036034*x0;
scalar x14 = math::sin(x10)*math::sin(x11);
scalar x15 = 0.36036036036036034*x1;
scalar x16 = PI*PI;
scalar x17 = 0.30802500000000005*x16;
scalar x18 = x0*x0 + x1*x1;
scalar x19 = 0.20000000000000001*x0;
scalar x20 = 0.20000000000000001*x1;
scalar x21 = x0*x8;
scalar x22 = x1*x6;
//############## Final Expressions ##############
scalar E = x17*math::pow(-x12*x13 + x14*x15 + x7 - x9, 2) + x18;
scalar F = -r*x16*(-x12*x19 + x14*x20 + 0.55500000000000005*x7 - 0.55500000000000005*x9)*(x12*x20 + x14*x19 - 0.55500000000000005*x21 - 0.55500000000000005*x22);
scalar G = r*r*(x17*math::pow(x12*x15 + x13*x14 - x21 - x22, 2) + x18);
return {E, F, G};
}
};
#endif //__GENERATEDEFG_CODE_H__
| [
"amit112amit@gmail.com"
] | amit112amit@gmail.com |
74e156c84b13d5b6a17d0613d584876801da581b | 31d00495b6fa63bfdcaeea68e6ec38e1ec4158b0 | /src/lfant/Material.h | abadc305e3cc9e5564bae6c453ab4dda0c5dc270 | [
"Apache-2.0"
] | permissive | loafofpiecrust/lfant | c6e663a3e61afc33bd30112285b2e88177cba419 | a38826e325a50dffb5d030d71abcd58de59e8389 | refs/heads/master | 2021-01-23T14:52:29.782769 | 2014-12-19T18:56:42 | 2014-12-19T18:56:42 | 8,059,823 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 912 | h | /*
* Copyright (C) 2013-2014, by loafofpiecrust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License in the accompanying LICENSE file or at
* http://www.apache.org/licenses/LICENSE-2.0
*/
#pragma once
#include <lfant/stdafx.h>
// Internal
#include <lfant/Texture.h>
#include <lfant/Shader.h>
#include <lfant/Object.h>
// External
namespace lfant
{
/** @addtogroup Game
* @{
*/
/** @addtogroup Rendering
* @{
*/
/**
*
*/
class Material : public Object
{
public:
Material();
virtual void Serialize(Properties *prop);
// Path and name for the texture file.
std::shared_ptr<Texture> texture;
// uint32 textureUnif;
std::shared_ptr<Shader> shader;
vec2 tiling { 1, 1 };
vec2 offset { 0, 0 };
u8vec4 color { 255, 255, 255, 255 };
// bool loaded = false;
};
/// @}
/// @}
}
| [
"taylorsnead@gmail.com"
] | taylorsnead@gmail.com |
65589947767f6908ca6d3d7f5b3596ee642c0127 | d0fb46aecc3b69983e7f6244331a81dff42d9595 | /imagerecog/src/model/RecognizeSceneResult.cc | 58ee18c606962c7b96af411e6d1eb858b9a21854 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-cpp-sdk | 3d8d051d44ad00753a429817dd03957614c0c66a | e862bd03c844bcb7ccaa90571bceaa2802c7f135 | refs/heads/master | 2023-08-29T11:54:00.525102 | 2023-08-29T03:32:48 | 2023-08-29T03:32:48 | 115,379,460 | 104 | 82 | NOASSERTION | 2023-09-14T06:13:33 | 2017-12-26T02:53:27 | C++ | UTF-8 | C++ | false | false | 1,715 | cc | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imagerecog/model/RecognizeSceneResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imagerecog;
using namespace AlibabaCloud::Imagerecog::Model;
RecognizeSceneResult::RecognizeSceneResult() :
ServiceResult()
{}
RecognizeSceneResult::RecognizeSceneResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeSceneResult::~RecognizeSceneResult()
{}
void RecognizeSceneResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allTagsNode = dataNode["Tags"]["Tag"];
for (auto dataNodeTagsTag : allTagsNode)
{
Data::Tag tagObject;
if(!dataNodeTagsTag["Value"].isNull())
tagObject.value = dataNodeTagsTag["Value"].asString();
if(!dataNodeTagsTag["Confidence"].isNull())
tagObject.confidence = std::stof(dataNodeTagsTag["Confidence"].asString());
data_.tags.push_back(tagObject);
}
}
RecognizeSceneResult::Data RecognizeSceneResult::getData()const
{
return data_;
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
083fa794b4a6ddf024bcf7b8d1eb5df0432db868 | a3c4333a4422e62c9f3e3a5443515dc0d507f78a | /src/common/thread.h | 19e245e0d0110586aa96ca9393d712178f9f6fbf | [] | no_license | swinsey/cello | 8a208e500f759602bd2c216c7f5d5bdc8bf94554 | 746b6f65ebc55e77f1ff07b2396af42c169ee6dd | refs/heads/master | 2021-05-11T03:43:33.470504 | 2015-04-10T07:14:36 | 2015-04-10T07:14:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,280 | h | #ifndef SRC_COMMON_THREAD_H
#define SRC_COMMON_THREAD_H
#include <pthread.h>
#include <tr1/memory>
#include <tr1/functional>
using std::tr1::function;
using std::tr1::placeholders::_1;
using std::tr1::placeholders::_2;
namespace cello {
class Thread {
public:
typedef function<void()> ThreadFunc;
public:
Thread(): m_entry(NULL),
m_context(NULL),
m_param(0),
m_is_running(false) {}
Thread(ThreadFunc entry, void* context = NULL, unsigned long long param = 0):
m_entry(entry),
m_context(context),
m_param(param),
m_is_running(false) {}
virtual ~Thread() {}
//void Init(ThreadFunc entry, void* context = NULL, unsigned long long param = 0);
void DoStart();
bool Start();
bool Join();
bool IsRunning() {
return m_is_running;
}
void Terminate();
private:
static void* Entry(void* in_thread);
private:
pthread_t m_id;
ThreadFunc m_entry;
void* m_context;
unsigned long long m_param;
bool m_is_running;
};
}
#endif
| [
"cj.magina@gmail.com"
] | cj.magina@gmail.com |
5c938d154f919cfe13844cdaceda5a49f399c82f | c910880ce3fb48b9cc038859841f0452fb205afe | /proc21/task21.cpp | 099feb68b00564ad23a00041bc835a19691d39b7 | [] | no_license | AlexVolkov0404/series_proc_minmax | 02d1ed4d3463af74cf6e34a56f66b864abffd5ab | e036ad6766040e833d0a6d46a18860b6b4226356 | refs/heads/master | 2023-08-20T07:55:15.495350 | 2021-09-30T17:14:44 | 2021-09-30T17:14:44 | 411,020,099 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 595 | cpp | // proc21.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
using namespace std;
int SumRange(int a, int b) {
if (b > a) {
int s = 0;
for (int i = a; i <= b; i++) {
s = s + i;
}
return s;
}
else {
return 0;
}
}
int main()
{
int a, b,res;
cout << "enter A: ";
cin >> a;
cout << "enter B: ";
cin >> b;
res = SumRange(a, b);
cout << "your sum: " << res;
}
| [
"Sasha@ACER"
] | Sasha@ACER |
ac4ab5981de81480c0008e723f0030ceedbcbd5e | 64181888ec0edfcff8d399b5e35be4a7cf45dfc4 | /tek3/CPP/CPP_zia_2019/sources/tools/Thread.hpp | a084ada69b191078a9ec2d6d790bc1a281fc80c5 | [] | no_license | simonmeyerrr/epitech_projects | b0ac36262ca0699df87613bb10bb00d3bcb6e46a | 6c49a54703da9697c9d292b665542e107b02b3d0 | refs/heads/master | 2023-03-05T23:43:33.959441 | 2021-02-19T15:10:47 | 2021-02-19T15:10:47 | 331,681,418 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 3,071 | hpp | #ifndef THREAD_HPP_
#define THREAD_HPP_
#include <thread>
#include <future>
#include <memory>
#include <exception>
////////////////////////////////////////////////////////////////////////////////
template<typename R = void, bool B = true> class Thread : public std::thread {
public:
Thread() noexcept : std::thread::thread(), p{}, f{}, r{}, b{!B} {
}
Thread(std::thread &&t) noexcept : std::thread::thread{std::move(t)}, b{!B} {
}
template<typename T = R, typename F, typename ...A, class = typename std::enable_if<!std::is_same<void, T>::value>::type> explicit Thread(F &&f, A &&...a) : std::thread::thread{}, p{}, f{p.get_future()}, r{}, b{!B} {
*this = std::move(std::thread{f, std::forward<A>(a)..., std::move(p)});
}
template<typename T = R, class = typename std::enable_if<std::is_same<void, T>::value>::type, typename F, typename ...A> explicit Thread(F &&f, A &&...a) : std::thread::thread{f, std::forward<A>(a)...}, p{}, f{}, r{}, b{false} {
}
Thread(const thread &) noexcept = delete;
~Thread() noexcept {
}
using std::thread::thread;
template<typename T = R> typename std::enable_if<!std::is_same<void, T>::value && !B && std::is_copy_constructible<R>::value, T>::type get() const {
return *r;
}
template<typename T = R> typename std::enable_if<!std::is_same<void, T>::value && B && std::is_copy_constructible<R>::value, T>::type get() const {
if (!b)
throw "Thread :: get :: Did not end and get was called with safety on";
return *r;
}
template<typename T = R> typename std::enable_if<!std::is_same<void, T>::value && !B && !std::is_copy_constructible<R>::value, T>::type get() const {
return std::move(*r);
}
template<typename T = R> typename std::enable_if<!std::is_same<void, T>::value && B && !std::is_copy_constructible<R>::value, T>::type get() const {
if (!b)
throw "Thread :: get :: Did not end and get was called with safety on";
return std::move(*r);
}
template<typename T = R> typename std::enable_if<std::is_same<void, T>::value, void>::type get() const noexcept = delete;
template<typename T = R> typename std::enable_if<!std::is_same<void, T>::value && !B>::type join() {
std::thread::join();
r = std::make_shared<R>(f.get());
}
template<typename T = R> typename std::enable_if<!std::is_same<void, T>::value && B>::type join() {
std::thread::join();
r = std::make_shared<R>(f.get());
b = true;
}
template<typename T = R> typename std::enable_if<std::is_same<void, T>::value>::type join() {
std::thread::join();
}
std::future<R> &&detach() {
std::thread::detach();
return std::move(f);
}
Thread &operator=(std::thread &&t) noexcept {
std::thread::operator=(std::move(t));
return *this;
}
Thread &operator=(Thread &t) noexcept {
return *this = std::forward<std::thread &&>(t);
}
private:
std::promise<R> p;
std::future<R> f;
std::shared_ptr<R> r;
bool b;
};
////////////////////////////////////////////////////////////////////////////////
#endif
| [
"simonmeyerrr@gmail.com"
] | simonmeyerrr@gmail.com |
67cc95edf003330254346740f81335357df5f717 | 7ed83918fbdcc2f9946d5fe216f63b2ab9a224d4 | /src/pmemkv.h | 8b4a78ec2bdc24d21bc80d14c0cffd95deeec27f | [] | no_license | cs-qyzhang/ComboTree | dfd027a22706234308daae0af1005cb93dbd1115 | 47a4126975930a1255dd69308c6e332a01c29aea | refs/heads/master | 2023-02-18T02:32:20.892743 | 2021-01-19T08:12:27 | 2021-01-19T08:12:27 | 283,805,834 | 0 | 3 | null | 2021-01-19T08:12:28 | 2020-07-30T15:04:20 | C++ | UTF-8 | C++ | false | false | 2,073 | h | #pragma once
#include <cassert>
#include <cstdlib>
#include <libpmemkv.hpp>
#include <vector>
#include <atomic>
#include <mutex>
#include <algorithm>
#include <vector>
namespace combotree {
using pmem::kv::status;
using pmem::kv::string_view;
namespace {
const uint64_t SIZE = 512 * 1024UL * 1024UL;
} // anonymous namespace
class PmemKV {
public:
explicit PmemKV(std::string path, size_t size = SIZE,
std::string engine = "cmap", bool force_create = true);
bool Put(uint64_t key, uint64_t value);
bool Update(uint64_t key, uint64_t value);
bool Get(uint64_t key, uint64_t& value) const;
bool Delete(uint64_t key);
size_t Scan(uint64_t min_key, uint64_t max_key, uint64_t max_size,
void (*callback)(uint64_t,uint64_t,void*), void* arg) const;
size_t Scan(uint64_t min_key, uint64_t max_key, uint64_t max_size,
std::vector<std::pair<uint64_t,uint64_t>>& kv) const;
size_t Size() const {
ReadRef_();
if (!read_valid_.load(std::memory_order_acquire))
return -1;
size_t size;
[[maybe_unused]] auto s = db_->count_all(size);
assert(s == status::OK);
ReadUnRef_();
return size;
}
bool NoWriteRef() const { return write_ref_.load() == 0; }
bool NoReadRef() const { return read_ref_.load() == 0; }
static void SetWriteValid() {
write_valid_.store(true, std::memory_order_release);
}
static void SetWriteUnvalid() {
write_valid_.store(false, std::memory_order_release);
}
static void SetReadValid() {
read_valid_.store(true, std::memory_order_release);
}
static void SetReadUnvalid() {
read_valid_.store(false, std::memory_order_release);
}
private:
pmem::kv::db* db_;
mutable std::atomic<int> write_ref_;
mutable std::atomic<int> read_ref_;
static std::atomic<bool> write_valid_;
static std::atomic<bool> read_valid_;
void WriteRef_() const { write_ref_++; }
void WriteUnRef_() const { write_ref_--; }
void ReadRef_() const { read_ref_++; }
void ReadUnRef_() const { read_ref_--; }
};
} // namespace combotree | [
"cs.qyzhang@qq.com"
] | cs.qyzhang@qq.com |
11c6aba412d8df0c977fe87316e8eba3e68dc523 | 7d8397e232e6a74fc36d6ef4641b81150fb528b7 | /include/parser/ParseTokenCollection.h | 0f173fbd9173b253fcae70324542a30a2b232ed6 | [] | no_license | suppertails66/clapton | 1137badd9103ec672221a7cf51cbfde99fb50feb | 0c97455e7259d2d9e821187fc8e24fcada75267f | refs/heads/master | 2021-01-13T03:34:20.745947 | 2017-01-08T18:33:15 | 2017-01-08T18:33:15 | 77,308,501 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 192 | h | #ifndef PARSETOKENCOLLECTION_H
#define PARSETOKENCOLLECTION_H
#include <vector>
namespace Lonely {
class ParseToken;
typedef std::vector<ParseToken*> ParseTokenCollection;
};
#endif
| [
"suppertails66@gmail.com"
] | suppertails66@gmail.com |
561303b1e894e879bbce85bc4bb645b37cbaaff8 | 9030ce2789a58888904d0c50c21591632eddffd7 | /SDK/ARKSurvivalEvolved_DmgType_Melee_ElementTree_functions.cpp | c41eb377f44dc758e5a72b5d937e99215e4a1274 | [
"MIT"
] | permissive | 2bite/ARK-SDK | 8ce93f504b2e3bd4f8e7ced184980b13f127b7bf | ce1f4906ccf82ed38518558c0163c4f92f5f7b14 | refs/heads/master | 2022-09-19T06:28:20.076298 | 2022-09-03T17:21:00 | 2022-09-03T17:21:00 | 232,411,353 | 14 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 386 | cpp | // ARKSurvivalEvolved (332.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_DmgType_Melee_ElementTree_parameters.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"sergey.2bite@gmail.com"
] | sergey.2bite@gmail.com |
576d852439d858473fa6ac14d02d4fe1c2e85add | dd5081784f0cd4280e9e0ad1a16334944c58cea6 | /src/Support_functions.ino | 770edab4ebc17cff7f3055e41f7e396f99e84bb1 | [
"MIT"
] | permissive | ffcadenas/freeds | ec587b7ac426b715027efc14beebbc66c1320190 | 13bcec2f0540944d9b80a4fec2c7ea04c55c33c4 | refs/heads/master | 2021-03-02T15:38:13.805831 | 2020-03-01T16:44:05 | 2020-03-01T16:44:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,706 | ino | char *dtostrfd(double number, unsigned char prec, char *s)
{
if ((isnan(number)) || (isinf(number)))
{ // Fix for JSON output (https://stackoverflow.com/questions/1423081/json-left-out-infinity-and-nan-json-status-in-ecmascript)
strcpy(s, "null");
return s;
}
else
{
return dtostrf(number, 1, prec, s);
}
}
void changeScreen(void)
{
if (digitalRead(0) == LOW)
{
if (ButtonState == false && (millis() - lastDebounceTime) > debounceDelay)
{
ButtonState = true;
lastDebounceTime = millis();
}
if (((millis() - lastDebounceTime) > 2000) && ButtonLongPress == false)
{
ButtonLongPress = true;
workingMode++;
if (workingMode > 2)
{
workingMode = 0;
}
switch (workingMode)
{
case 0: // AUTO
config.P01_on = true;
config.pwm_man = false;
break;
case 1: // MANUAL
config.P01_on = true;
config.pwm_man = true;
break;
case 2: // OFF
config.P01_on = false;
config.pwm_man = false;
break;
}
saveEEPROM();
}
if ((millis() - lastDebounceTime) > 10000)
{
defaultValues();
restartFunction();
}
}
else
{
if (ButtonState == true)
{
if (ButtonLongPress == true)
{
ButtonLongPress = false;
ButtonState = false;
}
else
{
ButtonState = false;
temporizadorOledAutoOff = millis();
if (config.oledAutoOff && !config.oledPower) {
config.oledPower = true;
turnOffOled();
} else {
screen++;
if (screen > MAX_SCREENS)
{
screen = 0;
}
}
}
}
}
}
void turnOffOled(void)
{
display.clear();
config.oledPower ? display.displayOn() : display.displayOff();
}
void restartFunction(void)
{
saveEEPROM();
if (!firstInit)
{
down_pwm(false);
}
INFOLN("RESTARTING IN 3 SEC !!!!");
uint8_t tcont = 4;
while (tcont-- > 0)
{
INFO(".." + (String)tcont);
delay(1000);
}
ESP.restart();
}
void saveEEPROM(void)
{
EEPROM.put(0, config);
EEPROM.commit();
INFOLN("DATA SAVED!!!!");
}
void remote_api()
{
DEBUGLN("\r\nremote_api()");
if ((String)config.remote_api != "" && config.wifi)
{
String buf = "http://" + (String)config.remote_api;
buf.replace("%pv1c%", String(inverter.pv1c));
buf.replace("%pv2c%", String(inverter.pv2c));
buf.replace("%pv1v%", String(inverter.pv1v));
buf.replace("%pv2v%", String(inverter.pv2v));
buf.replace("%gridv%", String(inverter.gridv));
buf.replace("%wsolar%", String(inverter.wsolar));
buf.replace("%wtoday%", String(inverter.wtoday));
buf.replace("%wgrid%", String(inverter.wgrid));
buf.replace("%pw1%", String(inverter.pw1));
buf.replace("%pw2%", String(inverter.pw2));
buf.replace("%wtogrid%", String(inverter.wtogrid));
DEBUGLN("REMOTE API REQUEST: " + buf);
char bufferdata[buf.length() + 1];
buf.toCharArray(bufferdata, (buf.length() + 1));
http.begin(bufferdata);
httpcode = http.GET();
DEBUGLN("HTTPCODE ERROR: " + (String)httpcode);
if (httpcode < 0 || httpcode == 404)
numeroErrorConexionRemoteApi++;
if (httpcode == HTTP_CODE_OK)
{
numeroErrorConexionRemoteApi = 0;
errorRemoteApi = false;
}
http.end();
}
}
///////////////////////// TIME FUNCTIONS from https://hackaday.io/project/7008-fly-wars-a-hackers-solution-to-world-hunger/log/25043-updated-uptime-counter /////////////////
//************************ Uptime Code - Makes a count of the total up time since last start ****************//
void calc_uptime()
{
//** Making Note of an expected rollover *****//
if (millis() >= 3000000000)
{
uptime.HighMillis = 1;
}
//** Making note of actual rollover **//
if (millis() <= 100000 && uptime.HighMillis == 1)
{
uptime.Rollover++;
uptime.HighMillis = 0;
}
long secsUp = millis() / 1000;
uptime.Second = secsUp % 60;
uptime.Minute = (secsUp / 60) % 60;
uptime.Hour = (secsUp / (60 * 60)) % 24;
uptime.Day = (uptime.Rollover * 50) + (secsUp / (60 * 60 * 24)); //First portion takes care of a rollover [around 50 days]
};
//******************* Prints the uptime to serial window **********************//
String print_Uptime()
{
return "Uptime: " + String(uptime.Day) + " Días " + String(uptime.Hour) + " Horas " + String(uptime.Minute) + " Minutos " + String(uptime.Second) + " Segundos";
};
String print_Uptime_Oled()
{
char tmp[33];
sprintf(tmp, "UPTIME: %li días %02d:%02d:%02d", uptime.Day, uptime.Hour, uptime.Minute, uptime.Second);
return tmp;
}; | [
"pablozg@gmail.com"
] | pablozg@gmail.com |
ad8443957de9dae6ca56e32b44ff8937e6945fb8 | 8f53b76f56185dfac28aa6dc050e683215dff06d | /VentaBoletosTeatro/VentaBoletosTeatro/NodoCola.cpp | ccac3c4cde19d0a3ee7a77e3de4628ae55ae325c | [] | no_license | Rafa1390/ProyectoTeatroED | d8877acfc26c74c32d766f7b24b7459dd77f8572 | c60728b936028d8877ab9931d51a274436b95d77 | refs/heads/master | 2020-05-02T10:26:55.319769 | 2019-04-09T01:16:13 | 2019-04-09T01:16:13 | 177,897,151 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 329 | cpp | #include "pch.h"
#include "NodoCola.h"
NodoCola::NodoCola() {
}
NodoCola::NodoCola(string x) {
cliente = x;
sig = NULL;
}
void NodoCola::SetCliente(string x) {
cliente = x;
}
string NodoCola::GetCliente() {
return cliente;
}
void NodoCola::SetSig(NodoCola *x) {
sig = x;
}
NodoCola *NodoCola::GetSig() {
return sig;
} | [
"rafab1390@gmail.com"
] | rafab1390@gmail.com |
cdb49b7ea5d9b8f71cffcb5117a15d325d545c9a | cea7881cf4c539c3e27f8645a0e562846f8a0044 | /solutions/Arrays.cc | a544f67764ace173daa87fd9708df5937c4689c0 | [] | no_license | dianaliu/oop | 41e5aa8b2a9183a9ac32e8e729ff5100867bd420 | fe6dc17062db90dbacc3d356b86887f896177de7 | refs/heads/master | 2021-01-03T13:19:33.204082 | 2011-12-19T09:02:52 | 2011-12-19T09:02:52 | 2,583,615 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,129 | cc | #include <iostream>
#include "ptr.h"
#include "java_lang.h"
namespace java {
namespace lang {
// Forward declaration of datalayout and vt
struct __Demo;
struct __Demo_VT;
typedef __rt::Ptr<__Demo> Demo;
// The data layout for Demo
struct __Demo {
__Demo_VT* __vptr;
// Constructor
__Demo();
// Destructor
static void __delete(__Demo*);
static int32_t hashCode(Demo);
static bool equals(Demo, Object);
static Class getClass(Demo);
static String toString(Demo);
static String retS(String);
static int32_t retI(int32_t);
static __Demo_VT __vtable;
static Class __class();
};
// The vtable layout for Demo
struct __Demo_VT {
Class __isa;
void (*__delete)(__Demo*);
int32_t (*hashCode)(Demo);
bool (*equals)(Demo, Object);
Class (*getClass)(Demo);
String (*toString)(Demo);
String (*retS)(String);
int32_t (*retI)(int32_t);
__Demo_VT():
__isa(__Object::__class()),
__delete((void(*)(__Demo*))&__Object::__delete),
hashCode((int32_t(*)(Demo))&__Object::hashCode),
equals((bool(*)(Demo, Object))&__Object::equals),
getClass((Class(*)(Demo))&__Object::getClass),
toString((String(*)(Demo))&__Object::toString),
retS((String(*)(String))&__Demo::retS),
retI((int32_t(*)(int32_t))&__Demo::retI) {
}
};
// Empty constructors for class and vt
__Demo::__Demo() : __vptr(&__vtable) {
}
__Demo_VT __Demo::__vtable;
// Internal accessor for java.lang.Demo's class.
Class __Demo::__class() {
static Class k =
new __Class(__rt::literal("java.lang.Demo"), __Object::__class());
return k;
}
}
}
namespace __rt {
// Template specialization for array of Demo
template<>
java::lang::Class Array <java::lang::Demo>::__class() {
static java::lang::Class k =
new java::lang::__Class(literal("[Ljava.lang.Demo;"),
Array<java::lang::Object>::__class(),
java::lang::__Demo::__class());
return k;
}
}
// ------------ begin CC file --------------
// #include <iostream>
// #include "java_lang.h"
using namespace java::lang;
String __Demo::retS (String s) {
return s;
}
int32_t __Demo::retI (int32_t i) {
return i + 2;
}
int32_t main() {
Demo d = new __Demo();
String s = __rt::literal("soo");
__rt::checkNotNull(d);
__rt::checkNotNull(s);
std::cout
<< __rt::literal("d.retS(s) = ") << d->__vptr->retS(s)
<< std::endl;
__rt::checkNotNull(d);
std::cout
<< __rt::literal("d.retI(4) = ") << d->__vptr->retI(4)
<< std::endl;
__rt::checkNotNull(d);
__rt::checkNotNull(s);
std::cout
<< __rt::literal("d.retS(s).toString() = ") << d->__vptr->retS(s)->__vptr->toString(d->__vptr->retS(s))
<< std::endl;
Object o = d;
__rt::checkNotNull(o);
std::cout
<< __rt::literal("o class = ") << o->__vptr->getClass(o)->__vptr->toString(o->__vptr->getClass(o))
<< std::endl;
__rt::Ptr<__rt::Array<String> > ss = new __rt::Array<String>(2);
__rt::Ptr<__rt::Array<Object> > oo = new __rt::Array<Object>(2);
__rt::Ptr<__rt::Array<int32_t> > ii = new __rt::Array<int32_t>(2);
(*ss)[0] = __rt::literal("zero");
__rt::checkNotNull(s);
__rt::checkStore(ss,s);
(*ss)[1] = s;
for (int32_t i = 0; i < 2; i++) {
std::cout
<< __rt::literal("ss = ") << (*ss)[i]
<< std::endl;
}
std::cout
<< __rt::literal("ss[1] = ") << (*ss)[1]
<< std::endl;
__rt::checkNotNull(s);
std::cout
<< __rt::literal("A string s = ") << s
<< std::endl;
// Arrays must be
__rt::Ptr<__rt::Array<Demo> > dd = new __rt::Array<Demo>(2);
(*dd)[0] = new __Demo();
(*dd)[1] = new __Demo();
bool f = false;
for (int32_t i = 0; i < 2; i++) {
std::cout
<< __rt::literal("dd[] = ") << (*dd)[i]->__vptr->getClass((*dd)[i])->__vptr->toString((*dd)[i]->__vptr->getClass((*dd)[i]))
<< std::endl;
}
}
| [
"dianaliu@nyu.edu"
] | dianaliu@nyu.edu |
db8dfcadae6fb2d27a83ad55993f7bf494c5d069 | 55d560fe6678a3edc9232ef14de8fafd7b7ece12 | /libs/sort/test/float_sort_test.cpp | afbdcc204557384a269e84f5815e2228feb8c782 | [
"BSL-1.0"
] | permissive | stardog-union/boost | ec3abeeef1b45389228df031bf25b470d3d123c5 | caa4a540db892caa92e5346e0094c63dea51cbfb | refs/heads/stardog/develop | 2021-06-25T02:15:10.697006 | 2020-11-17T19:50:35 | 2020-11-17T19:50:35 | 148,681,713 | 0 | 0 | BSL-1.0 | 2020-11-17T19:50:36 | 2018-09-13T18:38:54 | C++ | UTF-8 | C++ | false | false | 5,295 | cpp | // Boost Sort library float_sort_test.cpp file -----------------------------//
// Copyright Steven Ross 2014. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/sort for library home page.
#include <boost/sort/spreadsort/spreadsort.hpp>
// Include unit test framework
#include <boost/test/included/test_exec_monitor.hpp>
#include <boost/test/test_tools.hpp>
#include <vector>
using namespace std;
using namespace boost::sort::spreadsort;
//Casting to an integer before bitshifting
struct rightshift {
int operator()(const float &x, const unsigned offset) const {
return float_mem_cast<float, int>(x) >> offset;
}
};
struct rightshift_64 {
boost::int64_t operator()(const double &x, const boost::uint64_t offset) const
{
return float_mem_cast<double, boost::int64_t>(x) >> offset;
}
};
boost::int32_t
rand_32(bool sign = true) {
boost::int32_t result = rand() | (rand()<< 16);
if (rand() % 2)
result |= 1 << 15;
//Adding the sign bit
if (sign && (rand() % 2))
result *= -1;
return result;
}
static const unsigned input_count = 1000000;
// Helper class to run tests across all float_sort interface variants.
template<class FloatType, class RightShift>
void test_vector(vector<FloatType> base_vec, RightShift shifter) {
vector<FloatType> sorted_vec = base_vec;
vector<FloatType> test_vec = base_vec;
std::sort(sorted_vec.begin(), sorted_vec.end());
//Testing boost::sort::spreadsort version
test_vec = base_vec;
boost::sort::spreadsort::spreadsort(test_vec.begin(), test_vec.end());
BOOST_CHECK(test_vec == sorted_vec);
//One functor
test_vec = base_vec;
float_sort(test_vec.begin(), test_vec.end(), shifter);
BOOST_CHECK(test_vec == sorted_vec);
//Both functors
test_vec = base_vec;
float_sort(test_vec.begin(), test_vec.end(), shifter, less<FloatType>());
BOOST_CHECK(test_vec == sorted_vec);
}
void float_test()
{
// Prepare inputs
vector<float> base_vec;
//Generating semirandom numbers that will work for basic testing
for (unsigned u = 0; u < input_count; ++u) {
float val = float(rand_32());
//As std::sort gives arbitrary results for NaNs and 0.0 vs. -0.0, treat all
//those as just 0.0 for testing
if (!(val < 0.0) && !(0.0 < val))
base_vec.push_back(0.0);
else
base_vec.push_back(val);
}
test_vector(base_vec, rightshift());
// Trying both positive and negative sorted and reverse sorted data.
base_vec.clear();
for (int i = 0; i < (int)input_count; ++i) base_vec.push_back(-i);
test_vector(base_vec, rightshift());
base_vec.clear();
for (int i = 0; i < (int)input_count; ++i) base_vec.push_back(i - input_count);
test_vector(base_vec, rightshift());
base_vec.clear();
for (int i = 0; i < (int)input_count; ++i) base_vec.push_back(input_count - i);
test_vector(base_vec, rightshift());
base_vec.clear();
for (size_t i = 0; i < input_count; ++i) base_vec.push_back(i);
test_vector(base_vec, rightshift());
base_vec.clear();
for (size_t i = 0; i < input_count; ++i) base_vec.push_back(i);
for (size_t i = 0; i < input_count; i += 2) base_vec[i] *= -1;
test_vector(base_vec, rightshift());
}
void double_test() {
vector<double> base_vec;
for (unsigned u = 0; u < input_count; ++u) {
double val = double
((((boost::int64_t)rand_32()) << ((8 * sizeof(int)) -1)) + rand_32(false));
//As std::sort gives arbitrary results for NaNs and 0.0 vs. -0.0,
//treat all those as just 0.0 for testing
if (!(val < 0.0) && !(0.0 < val))
base_vec.push_back(0.0);
else
base_vec.push_back(val);
}
test_vector(base_vec, rightshift_64());
// Trying both positive and negative sorted and reverse sorted data.
base_vec.clear();
for (int i = 0; i < (int)input_count; ++i) base_vec.push_back(-i);
test_vector(base_vec, rightshift_64());
base_vec.clear();
for (int i = 0; i < (int)input_count; ++i) base_vec.push_back(i - input_count);
test_vector(base_vec, rightshift_64());
base_vec.clear();
for (int i = 0; i < (int)input_count; ++i) base_vec.push_back(input_count - i);
test_vector(base_vec, rightshift_64());
base_vec.clear();
for (size_t i = 0; i < input_count; ++i) base_vec.push_back(i);
test_vector(base_vec, rightshift_64());
base_vec.clear();
for (size_t i = 0; i < input_count; ++i) base_vec.push_back(i);
for (size_t i = 0; i < input_count; i += 2) base_vec[i] *= -1;
test_vector(base_vec, rightshift_64());
}
// Verify that 0 and 1 elements work correctly.
void corner_test() {
vector<float> test_vec;
boost::sort::spreadsort::spreadsort(test_vec.begin(), test_vec.end());
const float test_value = -0.0;
test_vec.push_back(test_value);
boost::sort::spreadsort::spreadsort(test_vec.begin(), test_vec.end());
BOOST_CHECK(test_vec.size() == 1);
BOOST_CHECK(test_vec[0] == test_value);
}
// test main
int test_main( int, char*[] )
{
srand(1);
float_test();
double_test();
corner_test();
return 0;
}
| [
"james.pack@stardog.com"
] | james.pack@stardog.com |
86cef78de3705361ea745c1b70222c421854f53b | beec3a87e80ef1e8e9c3f792f542327456d92781 | /13-07-2013/problemC/10511.cpp | f33e233e687276156511c7402178ce371122bfff | [
"MIT"
] | permissive | rprata/alphabet-soup | dd5c6b195b28d75fec3ec813e5eb422b3a0f00a5 | e927b6acd076d184db47f1b0709cf13f864554ef | refs/heads/master | 2020-05-04T14:20:07.849513 | 2020-04-21T16:32:45 | 2020-04-21T16:32:45 | 6,921,796 | 2 | 1 | null | 2020-04-21T16:32:48 | 2012-11-29T13:39:54 | C++ | UTF-8 | C++ | false | false | 444 | cpp | #include <cstdlib>
#include <cstring>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int T;
string s, aux;
stringstream ss;
int main (void)
{
cin >> T;
for (int i = 0; i < T; i++)
{
getline(cin, s); //limpa o caracter enter
while (getline(cin, s))
{
//generate MA
if (s.empty())
break;
ss.clear();
ss.str(s);
while (ss >> aux)
{
}
cout << endl;
}
}
return 0;
} | [
"renancprata@gmail.com"
] | renancprata@gmail.com |
12f68af6802a43a6e6c6e8b6c956c01ed9116fbb | 61a62af6e831f3003892abf4f73bb1aa4d74d1c7 | /15-295/S22/Contest 03/D.cpp | 5e43ff8de5ca392ad1b51beedf2d3473f74c78f9 | [] | no_license | amsraman/Competitive_Programming | 7e420e5d029e8adfbe7edf845db77f96bd1ae80d | 6f869a1e1716f56b081769d7f36ffa23ae82e356 | refs/heads/master | 2023-03-17T00:20:19.866063 | 2023-03-11T00:24:29 | 2023-03-11T00:24:29 | 173,763,104 | 16 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,693 | cpp | #include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
int n, a[100000], pre[100001][2];
vector<pair<int, int>> ans;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> n;
for(int i = 0; i < n; i++) {
cin >> a[i];
pre[i + 1][a[i] - 1] = 1;
}
for(int i = 0; i < n; i++) {
pre[i + 1][0] += pre[i][0];
pre[i + 1][1] += pre[i][1];
}
for(int i = 1; i <= n; i++) {
int wins[2] = {0, 0}, cur = 0;
while(cur < n) {
if(pre[n][0] < pre[cur][0] + i && pre[n][1] < pre[cur][1] + i) {
break;
}
int lb1 = cur + 1, ub1 = n, lb2 = cur + 1, ub2 = n;
while(lb1 < ub1) {
int mid = (lb1 + ub1) / 2;
if(pre[mid][0] >= pre[cur][0] + i) {
ub1 = mid;
} else {
lb1 = mid + 1;
}
}
while(lb2 < ub2) {
int mid = (lb2 + ub2) / 2;
if(pre[mid][1] >= pre[cur][1] + i) {
ub2 = mid;
} else {
lb2 = mid + 1;
}
}
if(ub1 <= ub2 && pre[ub1][0] == pre[cur][0] + i) {
++wins[0];
} else {
++wins[1];
}
cur = min(ub1, ub2);
}
int lst = a[n - 1] - 1;
if(cur == n && wins[lst] > wins[lst ^ 1]) {
ans.push_back({wins[lst], i});
}
}
sort(ans.begin(), ans.end());
cout << ans.size() << '\n';
for(pair<int, int> a: ans) {
cout << a.f << " " << a.s << '\n';
}
} | [
"adisundar02@gmail.com"
] | adisundar02@gmail.com |
5bb8489528c1f23cfcd3271705ca5da5f3b483ff | 71cd34c2c7664ecfca3676346cae0441e5291a1c | /RT/RT/Headers/SmartPtrs.h | fcc2ec9899602f917a4bbedf4b94a917120e45bd | [
"MIT"
] | permissive | heyx3/heyx3RT | 3c5cd8f01853367fb23c178ab84171c599330f9e | 4dd476a33e658bc19fde239f2c6e22bdcd598e27 | refs/heads/master | 2020-05-21T23:55:15.785369 | 2018-01-20T00:18:22 | 2018-01-20T00:18:22 | 57,820,694 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,876 | h | #pragma once
#include "Main.hpp"
#include <utility>
#include <memory>
#pragma warning(disable: 4251)
namespace RT
{
template<typename T>
class RT_API UniquePtr
{
public:
UniquePtr(T* _ptr = nullptr) { ptr.reset(_ptr); }
UniquePtr(UniquePtr<T>&& moveFrom) { *this = std::move(moveFrom); }
UniquePtr& operator=(UniquePtr&& moveFrom)
{
ptr.reset(moveFrom.Release());
return *this;
}
UniquePtr(const UniquePtr<T>& cpy) = delete;
UniquePtr<T>& operator=(const UniquePtr<T>& cpy) = delete;
T& operator*() { return *ptr; }
T* operator->() { return ptr.get(); }
const T& operator*() const { return *ptr; }
const T* operator->() const { return ptr.get(); }
T* Get() { return ptr.get(); }
const T* Get() const { return ptr.get(); }
T* Release() { return ptr.release(); }
void Reset(T* newPtr = nullptr) { ptr.reset(newPtr); }
private:
std::unique_ptr<T> ptr;
};
template<typename T>
class RT_API SharedPtr
{
public:
SharedPtr(T* _ptr = nullptr) { ptr.reset(_ptr); }
T& operator*() { return *ptr; }
T* operator->() { return ptr.get(); }
const T& operator*() const { return *ptr; }
const T* operator->() const { return ptr.get(); }
T* Get() { return ptr.get(); }
const T* Get() const { return ptr.get(); }
void Reset(T* newPtr = nullptr) { ptr.reset(newPtr); }
bool operator==(const SharedPtr<T>& other) const { return ptr.get() == other.ptr.get(); }
private:
std::shared_ptr<T> ptr;
};
#define EXPORT_UNIQUEPTR(ptrType) template class RT_API UniquePtr<ptrType>;
#define EXPORT_SHAREDPTR(ptrType) template class RT_API SharedPtr<ptrType>;
}
#pragma warning(default: 4251) | [
"manning.w@husky.neu.edu"
] | manning.w@husky.neu.edu |
a4eaf27d43230a9d4d5352ff8938d2faf6a4a407 | 818a455863c41d65ae9b91104bb6842ef7bfac2b | /DamageIndicator.cpp | 7c04c04f19ac4c5f16422a613342ee48da10a9c8 | [] | no_license | IBANNED/hoodhokage | 080c6a1eed7c7828e4bf52900932ab341bd4e5fd | d103c31823a506e318e5df432dbaf413818f89c5 | refs/heads/master | 2020-09-11T16:15:55.478832 | 2019-11-16T16:04:50 | 2019-11-16T16:04:50 | 222,122,107 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 952 | cpp | #include "DamageIndicator.h"
#include "Hacks.h"
#include "Interfaces.h"
#include "RenderManager.h"
DamageIndicators damage_indicators;
void DamageIndicators::paint() {
auto m_local = hackManager.pLocal();
float current_time = m_local->GetTickBase() * Interfaces::Globals->interval_per_tick;
for (int i = 0; i < data.size(); i++) {
if (data[i].flEraseTime < current_time) {
data.erase(data.begin() + i);
continue;
}
if (!data[i].bInitialized) {
data[i].Position = data[i].Player->GetHeadPos();
data[i].bInitialized = true;
}
if (current_time - data[i].flLastUpdate > 0.0001f) {
data[i].Position.z -= (0.1f * (current_time - data[i].flEraseTime));
data[i].flLastUpdate = current_time;
}
Vector screen_pos;
if (Render::TransformScreen(data[i].Position, screen_pos)) {
Render::Text2(screen_pos.x, screen_pos.y, std::to_string(data[i].iDamage).c_str(), Render::Fonts::LBY2, Color(0, 255, 0, 255));
}
}
} | [
"noreply@github.com"
] | IBANNED.noreply@github.com |
9073ea1a04e5fdf56e11e7597e683cc747eeb16c | 600df3590cce1fe49b9a96e9ca5b5242884a2a70 | /remoting/host/local_input_monitor_win.cc | ac6525e3851c5398b04b38020311c8d49f32ced2 | [
"BSD-3-Clause"
] | permissive | metux/chromium-suckless | efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a | 72a05af97787001756bae2511b7985e61498c965 | refs/heads/orig | 2022-12-04T23:53:58.681218 | 2017-04-30T10:59:06 | 2017-04-30T23:35:58 | 89,884,931 | 5 | 3 | BSD-3-Clause | 2022-11-23T20:52:53 | 2017-05-01T00:09:08 | null | UTF-8 | C++ | false | false | 8,043 | cc | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/host/local_input_monitor.h"
#include <stdint.h>
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/threading/non_thread_safe.h"
#include "base/win/message_window.h"
#include "remoting/host/client_session_control.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
namespace remoting {
namespace {
// From the HID Usage Tables specification.
const USHORT kGenericDesktopPage = 1;
const USHORT kMouseUsage = 2;
class LocalInputMonitorWin : public base::NonThreadSafe,
public LocalInputMonitor {
public:
LocalInputMonitorWin(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control);
~LocalInputMonitorWin() override;
private:
// The actual implementation resides in LocalInputMonitorWin::Core class.
class Core : public base::RefCountedThreadSafe<Core> {
public:
Core(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control);
void Start();
void Stop();
private:
friend class base::RefCountedThreadSafe<Core>;
virtual ~Core();
void StartOnUiThread();
void StopOnUiThread();
// Handles WM_INPUT messages.
LRESULT OnInput(HRAWINPUT input_handle);
// Handles messages received by |window_|.
bool HandleMessage(UINT message,
WPARAM wparam,
LPARAM lparam,
LRESULT* result);
// Task runner on which public methods of this class must be called.
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_;
// Task runner on which |window_| is created.
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
// Used to receive raw input.
std::unique_ptr<base::win::MessageWindow> window_;
// Points to the object receiving mouse event notifications.
base::WeakPtr<ClientSessionControl> client_session_control_;
DISALLOW_COPY_AND_ASSIGN(Core);
};
scoped_refptr<Core> core_;
DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorWin);
};
LocalInputMonitorWin::LocalInputMonitorWin(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control)
: core_(new Core(caller_task_runner,
ui_task_runner,
client_session_control)) {
core_->Start();
}
LocalInputMonitorWin::~LocalInputMonitorWin() {
core_->Stop();
}
LocalInputMonitorWin::Core::Core(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control)
: caller_task_runner_(caller_task_runner),
ui_task_runner_(ui_task_runner),
client_session_control_(client_session_control) {
DCHECK(client_session_control_);
}
void LocalInputMonitorWin::Core::Start() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
ui_task_runner_->PostTask(FROM_HERE,
base::Bind(&Core::StartOnUiThread, this));
}
void LocalInputMonitorWin::Core::Stop() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
ui_task_runner_->PostTask(FROM_HERE, base::Bind(&Core::StopOnUiThread, this));
}
LocalInputMonitorWin::Core::~Core() {
DCHECK(!window_);
}
void LocalInputMonitorWin::Core::StartOnUiThread() {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
window_.reset(new base::win::MessageWindow());
if (!window_->Create(base::Bind(&Core::HandleMessage,
base::Unretained(this)))) {
PLOG(ERROR) << "Failed to create the raw input window";
window_.reset();
// If the local input cannot be monitored, the remote user can take over
// the session. Disconnect the session now to prevent this.
caller_task_runner_->PostTask(
FROM_HERE, base::Bind(&ClientSessionControl::DisconnectSession,
client_session_control_, protocol::OK));
}
}
void LocalInputMonitorWin::Core::StopOnUiThread() {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
// Stop receiving raw mouse input.
if (window_) {
RAWINPUTDEVICE device = {0};
device.dwFlags = RIDEV_REMOVE;
device.usUsagePage = kGenericDesktopPage;
device.usUsage = kMouseUsage;
device.hwndTarget = nullptr;
// The error is harmless, ignore it.
RegisterRawInputDevices(&device, 1, sizeof(device));
}
window_.reset();
}
LRESULT LocalInputMonitorWin::Core::OnInput(HRAWINPUT input_handle) {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
// Get the size of the input record.
UINT size = 0;
UINT result = GetRawInputData(input_handle,
RID_INPUT,
nullptr,
&size,
sizeof(RAWINPUTHEADER));
if (result == static_cast<UINT>(-1)) {
PLOG(ERROR) << "GetRawInputData() failed";
return 0;
}
// Retrieve the input record itself.
std::unique_ptr<uint8_t[]> buffer(new uint8_t[size]);
RAWINPUT* input = reinterpret_cast<RAWINPUT*>(buffer.get());
result = GetRawInputData(input_handle,
RID_INPUT,
buffer.get(),
&size,
sizeof(RAWINPUTHEADER));
if (result == static_cast<UINT>(-1)) {
PLOG(ERROR) << "GetRawInputData() failed";
return 0;
}
// Notify the observer about mouse events generated locally. Remote (injected)
// mouse events do not specify a device handle (based on observed behavior).
if (input->header.dwType == RIM_TYPEMOUSE &&
input->header.hDevice != nullptr) {
POINT position;
if (!GetCursorPos(&position)) {
position.x = 0;
position.y = 0;
}
caller_task_runner_->PostTask(
FROM_HERE, base::Bind(&ClientSessionControl::OnLocalMouseMoved,
client_session_control_,
webrtc::DesktopVector(position.x, position.y)));
}
return DefRawInputProc(&input, 1, sizeof(RAWINPUTHEADER));
}
bool LocalInputMonitorWin::Core::HandleMessage(
UINT message, WPARAM wparam, LPARAM lparam, LRESULT* result) {
switch (message) {
case WM_CREATE: {
// Register to receive raw mouse input.
RAWINPUTDEVICE device = {0};
device.dwFlags = RIDEV_INPUTSINK;
device.usUsagePage = kGenericDesktopPage;
device.usUsage = kMouseUsage;
device.hwndTarget = window_->hwnd();
if (RegisterRawInputDevices(&device, 1, sizeof(device))) {
*result = 0;
} else {
PLOG(ERROR) << "RegisterRawInputDevices() failed";
*result = -1;
}
return true;
}
case WM_INPUT:
*result = OnInput(reinterpret_cast<HRAWINPUT>(lparam));
return true;
default:
return false;
}
}
} // namespace
std::unique_ptr<LocalInputMonitor> LocalInputMonitor::Create(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control) {
return base::WrapUnique(new LocalInputMonitorWin(
caller_task_runner, ui_task_runner, client_session_control));
}
} // namespace remoting
| [
"enrico.weigelt@gr13.net"
] | enrico.weigelt@gr13.net |
55b397d53241234607d2487d7a3df7751cd72264 | c9cf0586ace11aa32fa67606d237a130a06364ee | /circular-cylinder-2-40/21.15/phi | 5a28495e48cb2c9f9d8ec75d74a635775e13ded8 | [] | no_license | jezvonek/CFD-Final-Project | c74cfa21f22545c27d97d85cf30eb6dc8c824dc1 | 7c9a7fb032d74f20888effa0a0b75b212bf899f4 | refs/heads/master | 2022-07-05T14:43:52.967657 | 2020-05-14T03:40:56 | 2020-05-14T03:40:56 | 262,370,756 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 195,265 | /*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6.0
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "21.15";
object phi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
internalField nonuniform List<scalar>
18940
(
0.000523657
-0.472477
0.471953
0.00187646
-0.449925
0.448572
0.00364266
-0.434234
0.432468
0.00554886
-0.420483
0.418577
0.00744961
-0.407358
0.405457
0.00927334
-0.394188
0.392364
0.0109941
-0.380908
0.379187
0.0126127
-0.367716
0.366097
0.0141433
-0.354841
0.35331
0.015604
-0.342457
0.340996
0.017012
-0.330671
0.329263
0.0183818
-0.319533
0.318164
0.0197239
-0.30905
0.307708
0.0210458
-0.299202
0.29788
0.0223531
-0.289957
0.28865
0.0236503
-0.281279
0.279981
0.0249428
-0.273123
0.27183
0.0262369
-0.265433
0.264139
0.0275388
-0.258129
0.256827
-0.251091
0.249775
0.0288545
0.000564613
-0.473042
0.00191827
-0.451278
0.00366873
-0.435984
0.00555144
-0.422366
0.00742095
-0.409227
0.00920838
-0.395976
0.0108908
-0.38259
0.0124713
-0.369296
0.0139649
-0.356334
0.0153903
-0.343882
0.016765
-0.332046
0.0181032
-0.320872
0.0194152
-0.310362
0.020708
-0.300495
0.0219866
-0.291236
0.0232551
-0.282547
0.0245185
-0.274386
0.0257831
-0.266698
0.027056
-0.259402
-0.252379
0.0283444
0.000601264
-0.473643
0.00195361
-0.452631
0.00368428
-0.437715
0.00553872
-0.42422
0.00737355
-0.411062
0.00912188
-0.397724
0.0107634
-0.384232
0.012303
-0.370836
0.0137571
-0.357788
0.015145
-0.34527
0.0164843
-0.333385
0.0177889
-0.322176
0.019069
-0.311642
0.020331
-0.301757
0.0215793
-0.292484
0.0228176
-0.283785
0.0240504
-0.275619
0.025284
-0.267932
0.0265264
-0.260644
-0.253639
0.0277862
0.00061345
-0.474256
0.00196968
-0.453987
0.00368397
-0.439429
0.0055088
-0.426045
0.00730629
-0.41286
0.00901288
-0.39943
0.0106108
-0.38583
0.0121072
-0.372332
0.0135196
-0.359201
0.0148679
-0.346618
0.0161698
-0.334687
0.0174391
-0.323446
0.0186856
-0.312888
0.0199154
-0.302986
0.0211322
-0.293701
0.0223394
-0.284993
0.0235409
-0.27682
0.0247432
-0.269134
0.0259549
-0.261856
-0.254871
0.027187
0.00062469
-0.474881
0.00197751
-0.45534
0.00367156
-0.441123
0.00546359
-0.427837
0.00722055
-0.414617
0.00888247
-0.401092
0.0104343
-0.387381
0.0118849
-0.373783
0.0132533
-0.360569
0.0145598
-0.347925
0.0158223
-0.33595
0.0170545
-0.324678
0.0182659
-0.3141
0.0194621
-0.304183
0.0206466
-0.294886
0.021822
-0.286168
0.0229921
-0.27799
0.0241633
-0.270305
0.0253451
-0.263037
-0.256077
0.0265509
0.000628771
-0.47551
0.00197433
-0.456685
0.00364573
-0.442795
0.00540255
-0.429594
0.00711626
-0.41633
0.00873074
-0.402707
0.0102338
-0.388884
0.0116362
-0.375186
0.0129582
-0.361891
0.0142207
-0.349187
0.0154418
-0.337171
0.016635
-0.325871
0.0178097
-0.315274
0.0189711
-0.305344
0.0201223
-0.296037
0.0212655
-0.287311
0.0224042
-0.279129
0.0235447
-0.271446
0.0246978
-0.264191
-0.257258
0.0258791
0.000630966
-0.476141
0.00196453
-0.458019
0.00360903
-0.444439
0.00532718
-0.431312
0.00699454
-0.417998
0.00855865
-0.404271
0.0100101
-0.390336
0.0113618
-0.376537
0.0126348
-0.363164
0.0138509
-0.350403
0.0150283
-0.338348
0.0161805
-0.327023
0.0173165
-0.31641
0.0184417
-0.306469
0.0195585
-0.297154
0.020669
-0.288422
0.0217763
-0.280236
0.0228868
-0.272556
0.0240121
-0.265316
-0.258417
0.0251707
0.000629527
-0.47677
0.00194736
-0.459337
0.00356156
-0.446053
0.00523792
-0.432988
0.00685596
-0.419616
0.00836683
-0.405782
0.00976392
-0.391733
0.011062
-0.377835
0.0122834
-0.364386
0.0134505
-0.35157
0.0145815
-0.339479
0.0156901
-0.328132
0.0167853
-0.317506
0.0178722
-0.307556
0.0189533
-0.298235
0.0200301
-0.289499
0.0211057
-0.281312
0.0221864
-0.273637
0.0232849
-0.266414
-0.259554
0.0244221
0.000625849
-0.477396
0.00192446
-0.460635
0.00350482
-0.447634
0.00513611
-0.43462
0.00670176
-0.421182
0.00815642
-0.407237
0.00949623
-0.393073
0.0107378
-0.379077
0.0119047
-0.365552
0.0130196
-0.352685
0.0141012
-0.340561
0.0151631
-0.329194
0.0162145
-0.318557
0.0172604
-0.308602
0.0183033
-0.299278
0.0193448
-0.29054
0.0203875
-0.282355
0.021438
-0.274687
0.02251
-0.267486
-0.260671
0.0236269
0.00061965
-0.478016
0.00189602
-0.461912
0.0034395
-0.449177
0.00502277
-0.436203
0.00653312
-0.422692
0.00792867
-0.408632
0.00920822
-0.394352
0.0103902
-0.380259
0.0114992
-0.366661
0.0125585
-0.353745
0.013587
-0.341589
0.0145985
-0.330205
0.0156022
-0.319561
0.0166033
-0.309603
0.0176045
-0.300279
0.0186075
-0.291543
0.0196149
-0.283362
0.0206333
-0.275706
0.0216775
-0.268531
-0.261767
0.022774
0.000611596
-0.478627
0.00186314
-0.463163
0.00336701
-0.450681
0.00489951
-0.437735
0.00635178
-0.424144
0.00768534
-0.409966
0.00890157
-0.395569
0.0100207
-0.381378
0.0110682
-0.367709
0.0120679
-0.354744
0.013039
-0.34256
0.0139954
-0.331162
0.0149465
-0.320512
0.015898
-0.310555
0.0168527
-0.301234
0.0178124
-0.292503
0.01878
-0.284329
0.0197623
-0.276688
0.0207752
-0.269544
-0.262841
0.0218494
0.000602081
-0.47923
0.00182674
-0.464388
0.00328872
-0.452143
0.0047681
-0.439215
0.00615979
-0.425536
0.00742863
-0.411234
0.00857853
-0.396718
0.00963128
-0.382431
0.0106133
-0.368691
0.0115489
-0.35568
0.0124574
-0.343469
0.013353
-0.332058
0.0142455
-0.321404
0.0151409
-0.31145
0.0160427
-0.302136
0.0169531
-0.293413
0.0178749
-0.285251
0.0188155
-0.277629
0.019792
-0.27052
-0.263887
0.0208379
0.000591998
-0.479822
0.0017884
-0.465584
0.00320662
-0.453561
0.00463086
-0.440639
0.00595976
-0.426865
0.00716139
-0.412436
0.00824211
-0.397799
0.00922516
-0.383414
0.0101376
-0.369603
0.011004
-0.356546
0.0118438
-0.344309
0.0126714
-0.332885
0.013497
-0.32223
0.0143277
-0.312281
0.0151678
-0.302976
0.0160204
-0.294266
0.0168892
-0.28612
0.0177818
-0.278521
0.0187156
-0.271454
-0.264894
0.0197225
0.000582477
-0.480404
0.00174998
-0.466752
0.00312291
-0.454934
0.00449035
-0.442006
0.00575464
-0.428129
0.00688702
-0.413568
0.00789613
-0.398808
0.00880645
-0.384324
0.00964552
-0.370443
0.0104377
-0.357338
0.0112023
-0.345073
0.0119535
-0.333636
0.0127019
-0.322978
0.0134554
-0.313034
0.0142198
-0.30374
0.0150004
-0.295046
0.0158029
-0.286923
0.0166362
-0.279355
0.0175169
-0.272335
-0.265854
0.0184767
0.000575019
-0.480979
0.00171351
-0.46789
0.00303986
-0.456261
0.00434932
-0.443316
0.00554791
-0.429328
0.00660966
-0.41463
0.0075453
-0.399744
0.00838038
-0.385159
0.00914265
-0.371205
0.00985616
-0.358052
0.0105396
-0.345757
0.0112066
-0.334303
0.0118671
-0.323639
0.0125291
-0.313696
0.013199
-0.30441
0.0138842
-0.295731
0.0145934
-0.287632
0.0153388
-0.2801
0.0161428
-0.273139
-0.266772
0.0170614
0.000571053
-0.48155
0.00168057
-0.469
0.00295974
-0.45754
0.00421108
-0.444567
0.00534383
-0.43046
0.00633444
-0.415621
0.00719551
-0.400605
0.00795345
-0.385917
0.00863599
-0.371887
0.00926657
-0.358683
0.00986314
-0.346353
0.0104387
-0.334879
0.0110025
-0.324203
0.0115614
-0.314255
0.0121208
-0.304969
0.0126862
-0.296297
0.0132663
-0.288212
0.0138786
-0.280712
0.0145641
-0.273824
-0.267634
0.0154259
0.00057169
-0.482122
0.00165334
-0.470081
0.00288649
-0.458773
0.0040805
-0.445761
0.00514781
-0.431528
0.00606747
-0.41654
0.0068539
-0.401391
0.00753408
-0.386597
0.00813506
-0.372488
0.00867897
-0.359226
0.00918229
-0.346856
0.00965699
-0.335354
0.0101121
-0.324658
0.010555
-0.314698
0.0109912
-0.305406
0.0114247
-0.29673
0.0118598
-0.288647
0.0123109
-0.281163
0.0128247
-0.274338
-0.268271
0.0134621
0.000579966
-0.482702
0.00163906
-0.47114
0.00282799
-0.459962
0.00396398
-0.446897
0.0049654
-0.432529
0.00581485
-0.41739
0.00652833
-0.402105
0.00713278
-0.387202
0.00765375
-0.373009
0.00811074
-0.359683
0.00851676
-0.347263
0.00888008
-0.335717
0.00920674
-0.324985
0.0095034
-0.314994
0.0097797
-0.305682
0.0100487
-0.296999
0.0103232
-0.288922
0.0106068
-0.281447
0.0108865
-0.274618
-0.268376
0.0109907
0.000610593
-0.483312
0.00165347
-0.472183
0.00279281
-0.461101
0.00386572
-0.44797
0.0048
-0.433463
0.00558127
-0.418171
0.0062261
-0.40275
0.00676073
-0.387736
0.00720891
-0.373457
0.00758696
-0.360061
0.00790298
-0.347579
0.00815797
-0.335972
0.00834794
-0.325174
0.00846739
-0.315114
0.00851488
-0.305729
0.00849971
-0.296984
0.00844572
-0.288868
0.00838669
-0.281388
0.00834623
-0.274577
-0.268288
0.00825857
0.000703776
-0.484016
0.00170254
-0.473182
0.00277609
-0.462175
0.00378281
-0.448977
0.00465205
-0.434333
0.00536997
-0.418889
0.00595312
-0.403333
0.00642724
-0.38821
0.00681493
-0.373845
0.00713058
-0.360377
0.00737914
-0.347827
0.00755624
-0.336149
0.00764813
-0.325266
0.00763057
-0.315096
0.00746587
-0.305565
0.00709798
-0.296616
0.00645686
-0.288226
0.00552865
-0.28046
0.00463345
-0.273682
-0.269319
0.00566391
0.492245
0.000549739
-0.492795
0.491751
0.000494527
0.491277
0.000473799
0.490813
0.000464341
0.490354
0.00045806
0.489901
0.000453224
0.489452
0.00044959
0.489005
0.000446746
0.488561
0.000444187
0.488119
0.000441663
0.48768
0.000438892
0.487244
0.000436106
0.486811
0.000432835
0.486381
0.000430137
0.485955
0.000425979
0.485531
0.000423744
0.485117
0.000414589
0.484707
0.00040925
0.48434
0.000367916
0.000323495
0.488087
0.00114659
-0.488684
0.487444
0.00113682
0.486778
0.00114022
0.486088
0.00115445
0.485375
0.00117144
0.48464
0.00118729
0.483888
0.00120163
0.483121
0.00121453
0.482339
0.00122574
0.481546
0.00123513
0.480742
0.00124253
0.47993
0.00124841
0.47911
0.00125259
0.478284
0.00125638
0.477451
0.00125822
0.476615
0.00126041
0.475773
0.0012565
0.47493
0.00125223
0.474068
0.00122962
0.0012096
0.477274
0.00155613
-0.477683
0.476795
0.00161548
0.476262
0.00167358
0.475681
0.00173462
0.475058
0.00179532
0.474393
0.00185199
0.473691
0.00190366
0.472955
0.00195046
0.472188
0.00199249
0.471393
0.0020299
0.470573
0.00206283
0.46973
0.00209197
0.468864
0.00211766
0.467979
0.00214155
0.467075
0.00216298
0.466151
0.00218357
0.465206
0.00220215
0.464236
0.0022222
0.463227
0.0022389
0.00226142
0.461455
0.00174076
-0.46164
0.4612
0.00187098
0.460879
0.00199367
0.460502
0.00211184
0.460072
0.00222518
0.459593
0.00233153
0.459067
0.00242987
0.458497
0.00252017
0.457887
0.00260262
0.457239
0.00267759
0.456556
0.00274548
0.455841
0.00280724
0.455095
0.00286389
0.45432
0.00291676
0.453516
0.00296712
0.452681
0.00301776
0.451814
0.00306902
0.450912
0.00312449
0.449967
0.00318416
0.00325145
0.443677
0.00174446
-0.443681
0.443607
0.00194173
0.443472
0.00212822
0.443279
0.00230515
0.443031
0.0024731
0.442731
0.00263115
0.442382
0.00277853
0.441988
0.00291507
0.441549
0.00304089
0.44107
0.00315644
0.440554
0.00326232
0.440001
0.00335972
0.439415
0.00345028
0.438796
0.00353567
0.438145
0.00361816
0.437461
0.00370177
0.436741
0.00378869
0.435983
0.00388235
0.435182
0.00398543
0.00410074
0.425625
0.00163338
-0.425514
0.425675
0.0018923
0.425665
0.00213833
0.425598
0.00237155
0.425479
0.00259246
0.425309
0.00280068
0.425092
0.00299569
0.42483
0.00317717
0.424526
0.00334517
0.424182
0.00350008
0.423802
0.00364269
0.423387
0.00377448
0.42294
0.00389694
0.422463
0.00401297
0.421955
0.00412631
0.421416
0.00424068
0.420844
0.00436035
0.420236
0.00449033
0.419587
0.00463504
0.00479846
0.408274
0.00146666
-0.408107
0.408384
0.00178218
0.408439
0.00208309
0.408442
0.00236885
0.408395
0.00263959
0.4083
0.00289499
0.408161
0.0031346
0.407981
0.003358
0.407761
0.00356509
0.407505
0.00375613
0.407215
0.00393198
0.406896
0.00409427
0.406548
0.00424471
0.406174
0.00438674
0.405775
0.00452523
0.405351
0.00466504
0.404899
0.0048119
0.404417
0.00497291
0.403897
0.00515462
0.00536257
0.392095
0.00128643
-0.391914
0.392222
0.00165445
0.392299
0.00200629
0.392327
0.00234099
0.392308
0.00265828
0.392246
0.0029577
0.392142
0.00323872
0.391999
0.00350074
0.39182
0.00374347
0.39161
0.00396697
0.391369
0.0041721
0.391104
0.00435988
0.390816
0.00453292
0.390507
0.00469539
0.39018
0.00485207
0.389836
0.00500951
0.389472
0.00517585
0.389084
0.00536026
0.388667
0.00557204
0.00581905
0.377214
0.00111793
-0.377046
0.377333
0.00153541
0.377404
0.00193516
0.377429
0.0023159
0.377411
0.00267703
0.377351
0.00301785
0.377252
0.00333763
0.377117
0.00363549
0.376949
0.00391088
0.376753
0.00416345
0.376531
0.00439396
0.376288
0.00460295
0.376028
0.0047932
0.375754
0.00496912
0.37547
0.0051365
0.375176
0.00530294
0.374873
0.00547929
0.374555
0.00567762
0.374217
0.00591084
0.00619045
0.363572
0.000973587
-0.363428
0.363669
0.0014384
0.36372
0.00188394
0.363727
0.00230866
0.363693
0.00271171
0.363618
0.00309204
0.363507
0.00344872
0.363362
0.00378041
0.363187
0.00408633
0.362985
0.00436544
0.362761
0.00461801
0.36252
0.00484416
0.362266
0.00504708
0.362005
0.00522978
0.361742
0.00539974
0.361479
0.00556554
0.361218
0.00574112
0.360953
0.00594202
0.360678
0.00618629
0.00649105
0.351032
0.000857599
-0.350916
0.351102
0.00136834
0.351128
0.00185828
0.351111
0.00232566
0.351053
0.00276941
0.350957
0.0031881
0.350825
0.0035806
0.35066
0.00394492
0.350467
0.00428009
0.350248
0.004584
0.350009
0.00485665
0.349757
0.00509675
0.349496
0.00530805
0.349234
0.00549121
0.348978
0.00565607
0.348733
0.00581031
0.348501
0.00597297
0.348281
0.00616258
0.348062
0.00640514
0.00672605
0.339443
0.000769574
-0.339355
0.339486
0.00132534
0.339485
0.00185885
0.339443
0.00236812
0.33936
0.00285193
0.33924
0.00330843
0.339084
0.00373634
0.338896
0.00413283
0.338679
0.00449683
0.338439
0.00482466
0.338179
0.0051166
0.337907
0.00536813
0.337631
0.00558483
0.337359
0.0057625
0.3371
0.00591512
0.336865
0.00604529
0.336656
0.00618167
0.336477
0.00634206
0.336315
0.00656702
0.00689218
0.328666
0.000707022
-0.328603
0.328684
0.0013073
0.328659
0.0018839
0.328592
0.00243466
0.328486
0.0029583
0.328342
0.00345252
0.328162
0.00391598
0.32795
0.00434479
0.327709
0.00473813
0.327444
0.00508965
0.327159
0.00540104
0.326864
0.0056629
0.326566
0.00588369
0.326278
0.00604984
0.326009
0.00618472
0.325778
0.00627596
0.325587
0.00637219
0.325451
0.00647827
0.325352
0.00666626
0.00697784
0.318585
0.00066691
-0.318545
0.318581
0.00131142
0.318534
0.00193086
0.318445
0.00252296
0.318317
0.00308646
0.318151
0.00361866
0.317949
0.00411822
0.317714
0.00458001
0.317448
0.00500376
0.317158
0.00537976
0.316847
0.00571213
0.316526
0.00598368
0.3162
0.00620946
0.315892
0.00635863
0.315603
0.00647303
0.315372
0.0065071
0.315193
0.00655115
0.315106
0.00656505
0.315079
0.00669384
0.00696039
0.309107
0.000646563
-0.309087
0.309083
0.00133518
0.309017
0.00199731
0.308909
0.00263072
0.308761
0.00323426
0.308575
0.0038049
0.308352
0.00434139
0.308095
0.00483718
0.307806
0.00529297
0.30749
0.00569499
0.307152
0.00605091
0.306803
0.00633265
0.306445
0.00656697
0.306109
0.0066942
0.305793
0.00678985
0.305556
0.00674381
0.305377
0.00673008
0.305349
0.00659328
0.305401
0.00664202
0.00679631
0.300158
0.000644183
-0.300155
0.300116
0.00137685
0.300032
0.00208153
0.299906
0.00275619
0.299741
0.00340001
0.299536
0.00400962
0.299293
0.00458399
0.299015
0.00511509
0.298704
0.00560472
0.298364
0.00603468
0.297997
0.00641795
0.297618
0.00671168
0.297224
0.00696044
0.296856
0.00706245
0.296499
0.00714713
0.29625
0.0069925
0.296054
0.00692637
0.296097
0.00654979
0.296222
0.00651772
0.00640164
0.291675
0.000659032
-0.29169
0.291616
0.00143567
0.291515
0.0021826
0.291373
0.00289829
0.291191
0.00358248
0.290969
0.00423147
0.290708
0.00484456
0.290411
0.00541216
0.290078
0.00593754
0.289715
0.00639775
0.289321
0.0068121
0.288912
0.0071209
0.28848
0.00739231
0.288073
0.00746907
0.287662
0.00755817
0.28739
0.00726426
0.287154
0.00716294
0.287297
0.00640624
0.287458
0.00635718
0.0056332
0.283605
0.000691098
-0.283637
0.283529
0.00151132
0.283412
0.00229975
0.283254
0.00305581
0.283057
0.00377999
0.28282
0.00446827
0.282544
0.00512034
0.282231
0.00572513
0.281881
0.00628756
0.281499
0.00677978
0.281083
0.00722856
0.280647
0.00755627
0.280181
0.00785896
0.279735
0.00791528
0.279261
0.00803195
0.278945
0.00757962
0.278631
0.00747786
0.278921
0.00611596
0.279102
0.0061756
0.00427574
0.275891
0.000740596
-0.275941
0.2758
0.00160295
0.275669
0.00243092
0.275499
0.00322544
0.275291
0.00398798
0.275045
0.00471412
0.274761
0.00540403
0.274442
0.00604505
0.274085
0.00664437
0.273696
0.00716881
0.273271
0.00765355
0.272824
0.00800321
0.272339
0.00834397
0.271865
0.00838871
0.271339
0.00855845
0.270958
0.00796021
0.270503
0.00793331
0.270886
0.00573286
0.271236
0.00582529
0.00182999
0.268475
-0.268544
0.000809672
0.268368
0.00171031
0.268225
0.00257346
0.268048
0.003402
0.267838
0.00419863
0.267593
0.00495847
0.267315
0.0056823
0.267005
0.00635555
0.266661
0.00698821
0.266287
0.00754235
0.26588
0.00806101
0.26545
0.00843323
0.26498
0.00881374
0.26451
0.00885868
0.263972
0.00909624
0.263526
0.00840632
0.262905
0.00855471
0.262978
0.00565924
0.26334
0.00546374
-0.00414857
0.496671
0.000117478
-0.496788
0.496626
4.44885e-05
0.496593
3.36721e-05
0.496548
4.46495e-05
0.496485
6.28982e-05
0.4964
8.52647e-05
0.496289
0.000110864
0.49615
0.000138493
0.495984
0.000166817
0.495789
0.000194846
0.495567
0.000221767
0.49532
0.00024726
0.495049
0.000270637
0.494757
0.000292234
0.494446
0.000310525
0.494119
0.00032737
0.493782
0.000337196
0.493435
0.000346329
0.493105
0.000330843
0.000309606
0.489582
-0.000424332
-0.48904
0.490045
-0.000418488
0.490458
-0.000379441
0.490816
-0.000312749
0.491112
-0.000233703
0.491347
-0.000149609
0.49152
-6.22996e-05
0.491632
2.71071e-05
0.491681
0.000116978
0.491671
0.000205751
0.4916
0.000292065
0.491472
0.000375192
0.491289
0.000454099
0.491052
0.000528731
0.490766
0.000597342
0.490432
0.000660709
0.490055
0.000714226
0.489641
0.000760401
0.489184
0.000788305
0.000809657
0.47282
-0.00143945
-0.471805
0.473739
-0.00133791
0.47458
-0.00121969
0.475347
-0.00107961
0.476038
-0.000925381
0.476653
-0.000764542
0.477191
-0.00060053
0.477654
-0.000435011
0.47804
-0.00026968
0.478352
-0.000106238
0.478591
5.3692e-05
0.478757
0.000209047
0.478852
0.000358619
0.478879
0.000501892
0.478839
0.000637352
0.478735
0.000764871
0.478567
0.000881837
0.478338
0.000989205
0.478043
0.00108381
0.00116938
0.451861
-0.00272665
-0.450574
0.453064
-0.00254046
0.454185
-0.00234036
0.455229
-0.00212353
0.456196
-0.00189317
0.457087
-0.00165487
0.457899
-0.00141269
0.458633
-0.00116909
0.459289
-0.000926099
0.459869
-0.000685582
0.460372
-0.000449308
0.460799
-0.000218606
0.461153
5.22355e-06
0.461433
0.00022139
0.461642
0.000428643
0.46178
0.000626502
0.461849
0.00081357
0.461848
0.000989935
0.461777
0.00115447
0.00130695
0.430777
-0.00414438
-0.429359
0.432121
-0.00388445
0.433389
-0.00360853
0.434583
-0.00331722
0.435703
-0.00301281
0.436747
-0.00269959
0.437716
-0.0023817
0.43861
-0.00206234
0.439428
-0.00174402
0.440171
-0.00142881
0.44084
-0.00111861
0.441436
-0.000814873
0.44196
-0.000518897
0.442413
-0.000231592
0.442796
4.60078e-05
0.443109
0.000313285
0.443354
0.000569332
0.44353
0.00081367
0.443639
0.00104577
0.00126451
0.411106
-0.00560355
-0.409647
0.412499
-0.00527734
0.413822
-0.00493119
0.415073
-0.00456818
0.416252
-0.00419152
0.417358
-0.00380551
0.41839
-0.00341456
0.419351
-0.0030224
0.420239
-0.00263198
0.421055
-0.00224565
0.421802
-0.00186532
0.42248
-0.00149248
0.423089
-0.00112835
0.423631
-0.000773829
0.424107
-0.00042978
0.424517
-9.68584e-05
0.424862
0.000224227
0.425143
0.000532815
0.42536
0.000828637
0.00111057
0.393334
-0.00705511
-0.391882
0.394723
-0.00666654
0.396045
-0.00625297
0.397296
-0.00581957
0.398476
-0.00537134
0.399584
-0.00491356
0.400621
-0.00445121
0.401587
-0.00398849
0.402483
-0.00352871
0.403312
-0.0030744
0.404074
-0.00262747
0.404771
-0.00218932
0.405404
-0.001761
0.405973
-0.00134331
0.406481
-0.000936963
0.406926
-0.000542538
0.407311
-0.000160618
0.407636
0.000208141
0.407901
0.000563529
0.000904434
0.377446
-0.00847744
-0.376023
0.378807
-0.00802769
0.380101
-0.00754688
0.381324
-0.00704247
0.382474
-0.00652192
0.383553
-0.00599211
0.38456
-0.00545885
0.385499
-0.00492675
0.386369
-0.00439941
0.387174
-0.00387947
0.387916
-0.00336871
0.388595
-0.00286833
0.389213
-0.00237915
0.389771
-0.00190175
0.390271
-0.00143664
0.390713
-0.000984289
0.391097
-0.000545141
0.391425
-0.000119834
0.391697
0.000291394
0.000687383
0.363207
-0.00986585
-0.361819
0.364533
-0.00935405
0.36579
-0.00880387
0.366974
-0.00822585
0.368083
-0.00763074
0.369118
-0.00702749
0.370082
-0.00642274
0.370977
-0.00582153
0.371805
-0.00522768
0.372569
-0.00464376
0.373272
-0.00407131
0.373915
-0.00351116
0.374499
-0.00296378
0.375027
-0.00242945
0.375499
-0.00190841
0.375915
-0.00140097
0.376278
-0.000907453
0.376586
-0.000428479
0.376842
3.56598e-05
0.000483738
0.350331
-0.0112249
-0.348972
0.351626
-0.0106484
0.352846
-0.0100244
0.353989
-0.00936815
0.355053
-0.00869492
0.356041
-0.00801584
0.356957
-0.00733828
0.357803
-0.00666766
0.358583
-0.00600792
0.359301
-0.00536135
0.359958
-0.00472899
0.360558
-0.00411115
0.361102
-0.00350781
0.361592
-0.00291885
0.362028
-0.00234418
0.36241
-0.00178389
0.362741
-0.00123822
0.36302
-0.000707736
0.363249
-0.000192838
0.000305184
0.338562
-0.0125637
-0.337223
0.339831
-0.0119179
0.34102
-0.0112128
0.342123
-0.0104716
0.343144
-0.00971566
0.344086
-0.0089577
0.344953
-0.00820554
0.34575
-0.00746502
0.346482
-0.00673999
0.347153
-0.0060321
0.347766
-0.00534159
0.348323
-0.00466806
0.348826
-0.00401086
0.349276
-0.00336933
0.349675
-0.00274298
0.350023
-0.0021317
0.35032
-0.00153559
0.350568
-0.000955225
0.350766
-0.000391101
0.000155376
0.327693
-0.0138937
-0.326363
0.328946
-0.013171
0.330107
-0.0123739
0.331175
-0.0115393
0.332154
-0.0106952
0.333051
-0.00985481
0.333872
-0.00902608
0.334622
-0.00821536
0.335308
-0.00742597
0.335934
-0.00665837
0.336505
-0.00591172
0.337021
-0.00518466
0.337486
-0.00447575
0.3379
-0.00378365
0.338265
-0.00310746
0.33858
-0.00244678
0.338846
-0.00180164
0.339063
-0.00117263
0.339233
-0.000560373
3.35482e-05
0.317569
-0.015228
-0.316235
0.318815
-0.0144167
0.319953
-0.0135117
0.320987
-0.0125734
0.321927
-0.0116354
0.322781
-0.0107085
0.323556
-0.00980135
0.324262
-0.00892071
0.324904
-0.00806849
0.325489
-0.00724331
0.32602
-0.00644292
0.3265
-0.00566482
0.326931
-0.00490652
0.327313
-0.00416593
0.327648
-0.00344165
0.327934
-0.00273305
0.328172
-0.00204007
0.328363
-0.00136336
0.328506
-0.000703749
-6.30397e-05
0.30808
-0.0165817
-0.306726
0.309325
-0.0156621
0.310442
-0.0146282
0.311444
-0.0135755
0.312346
-0.0125372
0.313157
-0.0115193
0.313887
-0.0105323
0.31455
-0.00958287
0.315151
-0.00867007
0.315698
-0.00778999
0.316194
-0.00693879
0.316641
-0.00611252
0.317042
-0.00530739
0.317397
-0.00452045
0.317705
-0.00374983
0.317967
-0.00299467
0.318181
-0.00225487
0.318349
-0.00153118
0.31847
-0.000824719
-0.000137601
0.299149
-0.0179749
-0.297756
0.300397
-0.0169103
0.301492
-0.0157231
0.302463
-0.014547
0.303326
-0.0134002
0.304093
-0.0122859
0.304779
-0.0112188
0.3054
-0.010203
0.305962
-0.00923256
0.306473
-0.00830088
0.306937
-0.00740239
0.307355
-0.00653122
0.30773
-0.00568203
0.30806
-0.00485097
0.308346
-0.00403575
0.308587
-0.0032353
0.308782
-0.00244953
0.30893
-0.00167938
0.309031
-0.000926349
-0.000192951
0.290734
-0.0194428
-0.289266
0.29198
-0.0181565
0.293049
-0.0167923
0.293991
-0.0154886
0.294812
-0.0142214
0.29553
-0.0130043
0.296171
-0.0118594
0.296749
-0.0107811
0.297273
-0.00975652
0.297749
-0.00877731
0.298183
-0.00783581
0.298575
-0.00692349
0.298926
-0.00603323
0.299236
-0.00516039
0.299502
-0.0043023
0.299725
-0.00345774
0.299902
-0.0026267
0.300033
-0.0018104
0.300117
-0.00101081
-0.000231025
0.282807
-0.0210516
-0.281199
0.284045
-0.0193936
0.28508
-0.0178283
0.285991
-0.0163988
0.286762
-0.014993
0.287425
-0.013667
0.288015
-0.0124498
0.288549
-0.0113148
0.289033
-0.0102409
0.289476
-0.0092195
0.28988
-0.00824021
0.290248
-0.00729105
0.290577
-0.006363
0.290868
-0.00545079
0.291117
-0.00455152
0.291323
-0.0036639
0.291484
-0.00278807
0.2916
-0.00192565
0.291668
-0.00107924
-0.000252673
0.275325
-0.0228655
-0.273511
0.276568
-0.020636
0.277563
-0.0188238
0.278426
-0.0172618
0.279135
-0.0157019
0.279734
-0.0142659
0.280268
-0.0129838
0.280753
-0.0117997
0.281196
-0.010684
0.281604
-0.00962759
0.28198
-0.00861664
0.282325
-0.00763536
0.282635
-0.00667299
0.282908
-0.00572382
0.283141
-0.0047849
0.283332
-0.003855
0.283479
-0.00293457
0.283579
-0.00202575
0.283632
-0.0011319
-0.000257915
0.268236
-0.0246401
-0.266461
0.26953
-0.0219303
0.270503
-0.0197963
0.271256
-0.0180149
0.271875
-0.016321
0.27241
-0.0148011
0.272884
-0.013458
0.273315
-0.0122305
0.273715
-0.011084
0.27409
-0.0100021
0.274439
-0.00896596
0.274761
-0.00795705
0.275051
-0.00696364
0.275307
-0.00597973
0.275525
-0.00500245
0.275701
-0.00403087
0.275832
-0.00306588
0.275916
-0.00211025
0.275953
-0.00116823
-0.000246107
0.261413
-0.261605
-0.0244483
0.262766
-0.023284
0.263993
-0.0210235
0.264482
-0.0185032
0.264933
-0.0167725
0.265429
-0.0152964
0.265855
-0.013885
0.266225
-0.0126
0.266576
-0.0114354
0.266916
-0.0103418
0.267236
-0.00928609
0.267531
-0.00825231
0.267798
-0.0072303
0.268032
-0.00621356
0.268229
-0.00519904
0.268384
-0.0041864
0.268495
-0.00317724
0.26856
-0.00217495
0.268576
-0.00118449
-0.000213697
0.0275985
0.235125
-0.233949
-0.0287753
0.0263872
0.241982
-0.240771
0.0251438
0.249074
-0.247831
0.0238685
0.256444
-0.255169
0.0225616
0.264141
-0.262834
0.0212238
0.272214
-0.270876
0.0198548
0.28071
-0.279341
0.018452
0.289681
-0.288278
0.017011
0.29919
-0.297749
0.0155247
0.309325
-0.307839
0.0139843
0.320215
-0.318675
0.0123798
0.332059
-0.330455
0.010701
0.34515
-0.343471
0.00894113
0.359897
-0.358137
0.00710337
0.376816
-0.374979
0.00521398
0.396451
-0.394562
0.00334443
0.419177
-0.417307
0.00164597
0.444626
-0.442927
0.000396665
0.46993
-0.468681
0.489792
-0.489395
0.027602
0.236304
-0.0287807
0.0263899
0.243194
0.0251462
0.250318
0.0238702
0.25772
0.0225618
0.265449
0.0212215
0.273554
0.0198489
0.282082
0.0184418
0.291088
0.0169956
0.300637
0.0155039
0.310817
0.0139581
0.321761
0.0123484
0.333669
0.0106653
0.346833
0.00890304
0.361659
0.00706669
0.378653
0.00518539
0.398333
0.00333428
0.421028
0.00166699
0.446293
0.000446951
0.47115
0.490239
0.0275732
0.237484
-0.0287534
0.026361
0.244407
0.0251181
0.251561
0.0238428
0.258995
0.0225347
0.266758
0.0211938
0.274895
0.0198196
0.283456
0.0184101
0.292498
0.0169608
0.302086
0.0154656
0.312312
0.0139162
0.32331
0.0123033
0.335282
0.0106178
0.348519
0.0088551
0.363422
0.00702174
0.380486
0.00514926
0.400205
0.00331457
0.422863
0.00166829
0.447939
0.000460213
0.472358
0.490699
0.0275105
0.238664
-0.0286902
0.0263003
0.245617
0.0250601
0.252801
0.0237875
0.260268
0.0224815
0.268064
0.0211419
0.276234
0.0197681
0.28483
0.018358
0.293908
0.0169075
0.303536
0.0154106
0.313809
0.0138595
0.324862
0.012245
0.336896
0.0105588
0.350205
0.00879702
0.365184
0.0069674
0.382316
0.00510299
0.40207
0.00328185
0.424684
0.00165315
0.449568
0.000460422
0.473551
0.491159
0.0274129
0.23984
-0.0285891
0.0262075
0.246822
0.0249725
0.254036
0.0237049
0.261536
0.022403
0.269366
0.0210666
0.277571
0.019695
0.286202
0.0182861
0.295317
0.0168361
0.304986
0.0153392
0.315306
0.0137878
0.326413
0.0121734
0.338511
0.0104879
0.35189
0.00872826
0.366944
0.00690323
0.384141
0.00504721
0.403926
0.00323979
0.426491
0.0016302
0.451178
0.000456063
0.474725
0.491615
0.0272834
0.24101
-0.0284536
0.0260853
0.24802
0.0248578
0.255264
0.023597
0.262796
0.0223011
0.270661
0.0209696
0.278902
0.0196016
0.28757
0.0181954
0.296723
0.0167473
0.306434
0.0152518
0.316801
0.0137015
0.327963
0.0120884
0.340124
0.0104051
0.353573
0.00864888
0.3687
0.00682983
0.38596
0.00498368
0.405772
0.00319157
0.428283
0.00160275
0.452767
0.00044859
0.475879
0.492064
0.027124
0.242172
-0.0282858
0.0259354
0.249209
0.0247174
0.256482
0.0234654
0.264048
0.022177
0.27195
0.0208518
0.280228
0.0194889
0.288933
0.0180867
0.298125
0.0166417
0.307879
0.0151487
0.318294
0.0136009
0.329511
0.0119904
0.341734
0.0103104
0.355253
0.00855923
0.370451
0.00674779
0.387771
0.00491328
0.407606
0.00313812
0.430058
0.00157119
0.454333
0.000438222
0.477012
0.492502
0.0269437
0.243324
-0.0280959
0.0257654
0.250387
0.0245578
0.257689
0.0233153
0.265291
0.0220351
0.27323
0.0207167
0.281546
0.0193594
0.29029
0.0179616
0.299523
0.0165204
0.309321
0.0150308
0.319784
0.0134863
0.331056
0.0118795
0.343341
0.0102043
0.356929
0.00845951
0.372196
0.00665731
0.389573
0.00483613
0.409427
0.00307946
0.431815
0.0015356
0.455877
0.000425402
0.478122
0.492928
0.026741
0.244466
-0.0278824
0.0255747
0.251553
0.0243787
0.258885
0.0231466
0.266523
0.0218755
0.274501
0.0205646
0.282857
0.0192134
0.291641
0.0178207
0.300916
0.0163838
0.310758
0.0148983
0.321269
0.013358
0.332596
0.011756
0.344943
0.0100867
0.358598
0.00834975
0.373933
0.0065584
0.391365
0.00475226
0.411234
0.00301571
0.433552
0.00149643
0.457397
0.000410734
0.479208
0.493338
0.0265373
0.245597
-0.027669
0.0253809
0.25271
0.0241945
0.260072
0.0229708
0.267747
0.0217066
0.275765
0.0204013
0.284162
0.0190548
0.292988
0.0176662
0.302304
0.0162332
0.312191
0.0147517
0.322751
0.013216
0.334132
0.0116197
0.346539
0.00995741
0.36026
0.00822978
0.37566
0.00645092
0.393144
0.00466162
0.413023
0.00294704
0.435266
0.00145406
0.45889
0.000394582
0.480267
0.493733
0.0263153
0.246718
-0.027436
0.0251704
0.253855
0.0239946
0.261247
0.0227799
0.268961
0.021523
0.277022
0.0202235
0.285462
0.0188816
0.294329
0.0174969
0.303689
0.0160677
0.31362
0.0145905
0.324228
0.0130599
0.335662
0.01147
0.348129
0.00981604
0.361914
0.00809926
0.377377
0.00633472
0.394908
0.00456427
0.414793
0.00287372
0.436957
0.00140896
0.460354
0.000377393
0.481299
0.49411
0.0261331
0.247836
-0.0272505
0.0249901
0.254998
0.0238152
0.262422
0.0226001
0.270177
0.0213421
0.27828
0.0200416
0.286762
0.0186993
0.295672
0.0173153
0.305073
0.015888
0.315047
0.0144142
0.325702
0.0128888
0.337187
0.0113061
0.349712
0.0096618
0.363559
0.00795758
0.379081
0.00620936
0.396656
0.00445993
0.416543
0.00279556
0.438621
0.00136099
0.461789
0.000359056
0.482301
0.494469
0.0259172
0.248944
-0.0270261
0.0247816
0.256133
0.023612
0.263592
0.0224
0.271389
0.0211432
0.279537
0.0198426
0.288063
0.0185001
0.297014
0.0171164
0.306457
0.0156908
0.316473
0.0142205
0.327172
0.0127009
0.338707
0.0111266
0.351286
0.00949348
0.365192
0.00780389
0.380771
0.0060744
0.398386
0.00434857
0.418269
0.00271293
0.440257
0.00131087
0.463191
0.00034029
0.483272
0.49481
0.0258399
0.250076
-0.0269714
0.0246765
0.257297
0.0234783
0.26479
0.0222399
0.272627
0.0209613
0.280816
0.0196445
0.289379
0.0182913
0.298368
0.0169018
0.307846
0.0154749
0.3179
0.0140072
0.32864
0.0124939
0.34022
0.0109293
0.352851
0.00930953
0.366811
0.00763704
0.382443
0.00592904
0.400094
0.00422963
0.419968
0.00262533
0.441861
0.00125782
0.464559
0.000320191
0.484209
0.49513
0.0256425
0.251201
-0.0267678
0.0244785
0.258461
0.0232754
0.265993
0.022029
0.273873
0.020741
0.282104
0.0194151
0.290705
0.0180544
0.299728
0.0166606
0.30924
0.0152332
0.319327
0.0137694
0.330104
0.0122641
0.341726
0.0107115
0.354404
0.00910779
0.368415
0.00745558
0.384096
0.00577256
0.401777
0.0041033
0.421637
0.00253399
0.44343
0.00120413
0.465888
0.000301191
0.485112
0.495431
0.025838
0.25245
-0.0270871
0.0245449
0.259754
0.023227
0.267311
0.0218932
0.275207
0.0205448
0.283452
0.0191798
0.29207
0.0177958
0.301112
0.0163908
0.310645
0.0149613
0.320756
0.0135022
0.331563
0.0120074
0.343221
0.0104701
0.355941
0.00888608
0.369999
0.00725805
0.385724
0.00560404
0.403431
0.00396895
0.423272
0.00243818
0.444961
0.00114794
0.467179
0.000279979
0.48598
0.495711
0.0255977
0.253679
-0.0268267
0.0242953
0.261056
0.0229668
0.26864
0.0216224
0.276552
0.0202596
0.284815
0.0188791
0.293451
0.0174839
0.302507
0.0160744
0.312054
0.0146478
0.322183
0.0131981
0.333012
0.0117183
0.3447
0.010201
0.357458
0.00864149
0.371559
0.00704253
0.387323
0.00542252
0.405051
0.00382709
0.424868
0.00234112
0.446447
0.00109656
0.468423
0.000266025
0.486811
0.495977
0.0263415
0.255463
-0.028125
0.0245671
0.262831
0.0229426
0.270264
0.0214294
0.278065
0.0199679
0.286276
0.018534
0.294885
0.017116
0.303925
0.0157028
0.313468
0.0142841
0.323602
0.0128501
0.334446
0.0113919
0.346159
0.00990103
0.358949
0.00837222
0.373088
0.00680817
0.388887
0.00522767
0.406632
0.00367705
0.426418
0.00224111
0.447883
0.00104585
0.469618
0.000248685
0.487608
0.496226
0.0255283
0.257307
-0.0273729
0.0238855
0.264474
0.0224334
0.271716
0.0209724
0.279526
0.0195086
0.28774
0.0180707
0.296323
0.0166575
0.305339
0.0152573
0.314868
0.0138584
0.325001
0.0124502
0.335855
0.0110224
0.347586
0.0095658
0.360406
0.00807484
0.374579
0.00655245
0.390409
0.00501796
0.408166
0.00351878
0.427918
0.00214205
0.44926
0.00101351
0.470747
0.000268304
0.488353
0.496494
0.0258931
-0.0301902
0.0239057
0.0221108
0.0204379
0.0189121
0.0174794
0.0160919
0.0147245
0.0133625
0.011994
0.010608
0.00919514
0.00775027
0.00627711
0.0047958
0.00335386
0.00203937
0.000981351
0.000294045
0.0263801
0.215237
-0.214746
-0.0268712
0.024404
0.221048
-0.219072
0.0224338
0.227152
-0.225182
0.0206726
0.233746
-0.231985
0.0191128
0.240813
-0.239253
0.0177038
0.24834
-0.246931
0.0163998
0.256308
-0.255004
0.0151659
0.264708
-0.263474
0.0139756
0.273554
-0.272364
0.0128067
0.282892
-0.281723
0.0116392
0.29281
-0.291642
0.0104526
0.303462
-0.302275
0.00922451
0.315106
-0.313878
0.00793033
0.328154
-0.32686
0.00654544
0.343227
-0.341843
0.00505253
0.361206
-0.359713
0.0034618
0.383236
-0.381646
0.00185949
0.410456
-0.408854
0.000513695
0.442534
-0.441189
0.477317
-0.476803
0.0245643
0.216504
-0.0258316
0.0233024
0.22231
0.0219901
0.228465
0.0206614
0.235075
0.0193457
0.242128
0.0180603
0.249625
0.0168097
0.257559
0.0155891
0.265928
0.0143885
0.274755
0.0131949
0.284086
0.0119932
0.294011
0.010766
0.304689
0.00949308
0.316379
0.00815196
0.329495
0.00672094
0.344659
0.00518742
0.362739
0.00356864
0.384855
0.00195915
0.412066
0.000615192
0.443878
0.477932
0.0237767
0.217588
-0.0248605
0.0227605
0.223326
0.0216851
0.22954
0.0205642
0.236196
0.019413
0.24328
0.0182457
0.250793
0.0170706
0.258734
0.0158905
0.267109
0.0147038
0.275941
0.0135048
0.285285
0.0122842
0.295232
0.0110284
0.305945
0.00972041
0.317687
0.00834038
0.330875
0.00686961
0.346129
0.0052996
0.364309
0.00365214
0.386503
0.00202188
0.413696
0.000653295
0.445247
0.478586
0.0235195
0.218342
-0.0242734
0.0226316
0.224214
0.0216443
0.230527
0.0205995
0.23724
0.0195182
0.244361
0.0184107
0.2519
0.0172812
0.259863
0.0161306
0.268259
0.0149576
0.277114
0.0137583
0.286484
0.0125254
0.296465
0.0112482
0.307222
0.0099117
0.319023
0.00849839
0.332288
0.00699195
0.347636
0.00538682
0.365915
0.00370843
0.388181
0.00205428
0.41535
0.000668649
0.446633
0.479254
0.0234551
0.219004
-0.0241169
0.0226229
0.225046
0.021695
0.231455
0.0207026
0.238233
0.0196636
0.2454
0.0185885
0.252975
0.0174823
0.260969
0.0163461
0.269395
0.0151785
0.278282
0.0139757
0.287687
0.0127311
0.29771
0.0114347
0.308518
0.010073
0.320385
0.00862986
0.333731
0.00709078
0.349175
0.0054528
0.367553
0.00374546
0.389888
0.00207146
0.417024
0.000676
0.448028
0.47993
0.0235195
0.219699
-0.0242152
0.0227022
0.225863
0.0218037
0.232354
0.020842
0.239195
0.0198289
0.246413
0.018773
0.254031
0.017679
0.262063
0.0165483
0.270526
0.0153797
0.279451
0.0141695
0.288897
0.0129114
0.298968
0.0115959
0.309834
0.0102103
0.321771
0.00873937
0.335202
0.00717031
0.350744
0.00550258
0.36922
0.00376986
0.391621
0.00207982
0.418714
0.000678014
0.44943
0.480608
0.0237302
0.220445
-0.0244761
0.0228972
0.226696
0.0219934
0.233257
0.0210321
0.240156
0.0200222
0.247423
0.0189692
0.255084
0.0178761
0.263156
0.0167429
0.271659
0.0155676
0.280626
0.0143464
0.290118
0.0130729
0.300241
0.0117377
0.311169
0.0103285
0.32318
0.00883128
0.336699
0.00723441
0.352341
0.00553975
0.370915
0.00378461
0.393376
0.00208097
0.420418
0.000675445
0.450835
0.481284
0.0240564
0.221237
-0.0248486
0.0231881
0.227565
0.0222569
0.234189
0.021275
0.241138
0.0202496
0.248448
0.0191844
0.256149
0.0180803
0.264261
0.0169358
0.272804
0.0157479
0.281814
0.0145116
0.291354
0.0132203
0.301533
0.0118643
0.312525
0.0104317
0.324612
0.00890903
0.338222
0.00728597
0.353964
0.00556652
0.372634
0.00379123
0.395151
0.00207604
0.422133
0.000669444
0.452242
0.481953
0.024445
0.222079
-0.0252867
0.0235337
0.228476
0.0225666
0.235156
0.0215546
0.24215
0.0205037
0.249499
0.0194165
0.257236
0.0182927
0.265384
0.0171298
0.273967
0.0159236
0.28302
0.0146685
0.29261
0.0133569
0.302844
0.011979
0.313903
0.0105227
0.326069
0.00897517
0.33977
0.00732716
0.355612
0.00558467
0.374377
0.00379128
0.396945
0.00206662
0.423858
0.000661317
0.453647
0.482614
0.0248604
0.222974
-0.0257553
0.0239044
0.229432
0.022899
0.236161
0.0218532
0.243196
0.0207722
0.25058
0.0196579
0.258351
0.0185094
0.266533
0.0173235
0.275152
0.0160953
0.284248
0.0148184
0.293887
0.0134846
0.304178
0.0120837
0.315304
0.0106035
0.327549
0.00903156
0.341342
0.00735969
0.357284
0.00559575
0.376141
0.00378621
0.398754
0.00205411
0.42559
0.000652006
0.455049
0.483266
0.0252838
0.223922
-0.0262318
0.0242835
0.230432
0.0232391
0.237205
0.022158
0.244277
0.0210448
0.251693
0.0199009
0.259495
0.0187251
0.267709
0.0175138
0.276364
0.0162614
0.285501
0.0149609
0.295187
0.0136037
0.305535
0.0121793
0.316728
0.0106753
0.329053
0.00907956
0.342937
0.00738493
0.358978
0.00560113
0.377925
0.00377733
0.400578
0.00203967
0.427327
0.000642257
0.456447
0.483909
0.0257004
0.22492
-0.026698
0.0246574
0.231475
0.023575
0.238288
0.0224589
0.245393
0.0213132
0.252839
0.0201391
0.260669
0.018935
0.268913
0.0176972
0.277602
0.0164196
0.286778
0.015095
0.296512
0.013714
0.306916
0.012266
0.318176
0.0107386
0.33058
0.00911995
0.344556
0.00740382
0.360694
0.00560171
0.379727
0.0037654
0.402415
0.00202384
0.429069
0.0006323
0.457838
0.484541
0.0260957
0.225962
-0.0271378
0.0250136
0.232558
0.0238957
0.239406
0.0227467
0.246542
0.0215699
0.254016
0.0203663
0.261872
0.0191345
0.270145
0.0178703
0.278866
0.0165677
0.288081
0.015219
0.29786
0.0138147
0.30832
0.0123437
0.319647
0.0107937
0.33213
0.00915319
0.346197
0.007417
0.362431
0.00559829
0.381545
0.00375128
0.404262
0.00200746
0.430813
0.000622743
0.459223
0.485164
0.0264576
0.227042
-0.0275379
0.0253412
0.233674
0.0241919
0.240555
0.0230133
0.24772
0.0218081
0.255221
0.0205772
0.263103
0.0193191
0.271403
0.0180299
0.280155
0.0167033
0.289407
0.0153315
0.299232
0.0139047
0.309747
0.0124117
0.32114
0.0108403
0.333702
0.00917946
0.347858
0.00742483
0.364185
0.00559126
0.383379
0.00373522
0.406118
0.00199043
0.432558
0.000613177
0.4606
0.485777
0.0267773
0.228154
-0.0278891
0.0256322
0.234819
0.0244564
0.241731
0.0232524
0.248924
0.0220223
0.256451
0.0207671
0.264358
0.0194853
0.272684
0.018173
0.281467
0.0168241
0.290756
0.0154307
0.300626
0.0139828
0.311195
0.0124694
0.322653
0.0108783
0.335293
0.00919876
0.349537
0.00742761
0.365956
0.0055813
0.385225
0.00371836
0.407981
0.0019743
0.434302
0.000605078
0.46197
0.486382
0.0270494
0.22929
-0.0281859
0.0258817
0.235987
0.0246846
0.242928
0.0234597
0.250149
0.0222088
0.257702
0.0209327
0.265635
0.0196301
0.273987
0.0182973
0.2828
0.0169284
0.292125
0.0155153
0.302039
0.0140484
0.312662
0.0125164
0.324186
0.0109073
0.336902
0.00921113
0.351233
0.00742554
0.367742
0.00556861
0.387082
0.00370065
0.409848
0.0019582
0.436044
0.000596549
0.463331
0.486979
0.0272711
0.230444
-0.0284253
0.0260867
0.237171
0.0248734
0.244141
0.0236323
0.25139
0.0223647
0.25897
0.0210714
0.266928
0.0197513
0.275307
0.0184008
0.28415
0.0170144
0.293512
0.015584
0.303469
0.0141002
0.314146
0.0125517
0.325734
0.0109269
0.338527
0.00921627
0.352944
0.00741864
0.36954
0.00555385
0.388947
0.00368417
0.411718
0.00194647
0.437782
0.000593128
0.464685
0.487572
0.0274419
0.231609
-0.0286069
0.0262466
0.238366
0.0250222
0.245366
0.0237694
0.252643
0.0224891
0.26025
0.0211822
0.268235
0.0198479
0.276641
0.0184828
0.285516
0.0170815
0.294913
0.0156364
0.304914
0.014138
0.315644
0.0125753
0.327297
0.0109372
0.340165
0.00921457
0.354666
0.00740734
0.371347
0.00553712
0.390817
0.00366821
0.413587
0.00193677
0.439513
0.000588544
0.466033
0.48816
0.0275633
0.232779
-0.0287328
0.0263621
0.239568
0.025131
0.246597
0.0238704
0.253904
0.0225812
0.261539
0.0212642
0.269552
0.0199187
0.277987
0.0185419
0.286892
0.0171284
0.296326
0.0156711
0.306372
0.0141605
0.317155
0.0125861
0.328871
0.010937
0.341814
0.00920495
0.356399
0.00739091
0.373161
0.00551838
0.39269
0.00365496
0.41545
0.00193933
0.441229
0.000606511
0.467366
0.488767
0.0276402
-0.0288098
0.0264368
0.0252024
0.0239374
0.0226424
0.0213184
0.0199647
0.0185789
0.017156
0.0156889
0.0141687
0.012585
0.0109275
0.00918881
0.007371
0.00549879
0.00364206
0.00194355
0.000628454
-0.208888
0.0273719
-0.0332294
-0.207423
0.0225682
-0.0240337
-0.206427
0.0210185
-0.0220149
-0.205845
0.0178844
-0.0184663
-0.205333
0.0160084
-0.0165203
-0.204935
0.0139102
-0.0143077
-0.204611
0.012158
-0.0124824
-0.204364
0.0104106
-0.0106572
-0.204186
0.00878033
-0.0089587
-0.204076
0.00718632
-0.00729643
-0.204031
0.00564622
-0.00569105
-0.204051
0.00413839
-0.00411817
-0.204135
0.00266322
-0.00257892
-0.204284
0.00121405
-0.00106575
-0.204496
-0.000210395
0.000422413
-0.204771
-0.0016121
0.0018879
-0.205111
-0.00299134
0.00333104
-0.205515
-0.00434761
0.00475147
-0.205983
-0.00567865
0.00614658
-0.00698081
-0.206514
0.00751162
-0.215964
0.0242638
-0.214511
0.0211157
-0.213219
0.0197269
-0.21252
0.0171853
-0.21194
0.0154277
-0.211518
0.0134889
-0.211183
0.0118222
-0.210936
0.010164
-0.210763
0.00860709
-0.210661
0.00708485
-0.210627
0.00561173
-0.210658
0.00416963
-0.210753
0.00275843
-0.210912
0.00137251
-0.211133
1.05726e-05
-0.211416
-0.00132901
-0.211761
-0.00264644
-0.212167
-0.0039411
-0.212635
-0.00521103
-0.00645349
-0.213162
-0.222846
0.0219277
-0.221576
0.0198454
-0.220317
0.0184683
-0.219545
0.0164127
-0.218911
0.0147938
-0.218455
0.0130338
-0.218099
0.0114653
-0.217839
0.00990449
-0.217658
0.00842627
-0.217552
0.0069791
-0.217516
0.0055753
-0.217547
0.00420018
-0.217642
0.00285368
-0.2178
0.0015312
-0.218021
0.000231602
-0.218304
-0.00104637
-0.218648
-0.00230281
-0.219052
-0.00353702
-0.219516
-0.00474732
-0.00593159
-0.220037
-0.230115
0.0200577
-0.228875
0.0186058
-0.22771
0.0173028
-0.226904
0.0156073
-0.226236
0.0141251
-0.225744
0.0125419
-0.225358
0.0110797
-0.225076
0.00962244
-0.224878
0.00822804
-0.224758
0.00685972
-0.224711
0.00552829
-0.224734
0.0042224
-0.224822
0.00294243
-0.224976
0.00168473
-0.225193
0.000448522
-0.225472
-0.000767113
-0.225813
-0.0019621
-0.226214
-0.00313569
-0.226675
-0.00428639
-0.00541253
-0.227194
-0.237703
0.0185082
-0.236488
0.0173908
-0.235394
0.016208
-0.234571
0.0147846
-0.233882
0.0134365
-0.233358
0.0120174
-0.232943
0.0106652
-0.232636
0.00931495
-0.232417
0.00800876
-0.23228
0.00672322
-0.232219
0.00546762
-0.232231
0.00423398
-0.232312
0.00302317
-0.232459
0.00183252
-0.232673
0.000661679
-0.23295
-0.000489938
-0.23329
-0.00162205
-0.233692
-0.00273387
-0.234154
-0.00382404
-0.00489113
-0.234675
-0.245578
0.0171557
-0.244412
0.0162243
-0.243372
0.015168
-0.24254
0.0139524
-0.24184
0.0127364
-0.241289
0.0114668
-0.24085
0.0102259
-0.240518
0.00898349
-0.240278
0.00776903
-0.240125
0.00656983
-0.240051
0.00539363
-0.240053
0.00423563
-0.240127
0.00309708
-0.24027
0.00197631
-0.240482
0.0008734
-0.24076
-0.000211906
-0.241103
-0.00127913
-0.24151
-0.0023274
-0.241978
-0.00335546
-0.00436204
-0.242507
-0.253768
0.0159199
-0.252654
0.0151097
-0.251657
0.0141719
-0.250824
0.0131187
-0.250117
0.0120297
-0.249546
0.0108959
-0.249086
0.00976604
-0.248734
0.00863099
-0.248476
0.00751098
-0.248307
0.00640108
-0.248221
0.00530773
-0.248214
0.00422877
-0.248283
0.00316578
-0.248425
0.00211801
-0.248637
0.00108591
-0.248919
6.95557e-05
-0.249267
-0.000930379
-0.249682
-0.00191297
-0.25016
-0.00287696
-0.00382123
-0.250701
-0.26231
0.0147557
-0.261238
0.0140382
-0.260275
0.0132086
-0.259444
0.0122879
-0.258733
0.0113187
-0.258146
0.0103092
-0.257669
0.009289
-0.257298
0.00825995
-0.257024
0.00723628
-0.256841
0.00621806
-0.256744
0.0052107
-0.256729
0.00421406
-0.256793
0.00322993
-0.256933
0.00225838
-0.257148
0.00130013
-0.257434
0.000355591
-0.25779
-0.000574423
-0.258214
-0.00148891
-0.258704
-0.00238663
-0.00326653
-0.259259
-0.271244
0.0136356
-0.270203
0.0129975
-0.269261
0.0122662
-0.268432
0.0114596
-0.267716
0.0106028
-0.267116
0.00970832
-0.266622
0.00879559
-0.266233
0.00787092
-0.265942
0.00694486
-0.265744
0.00602019
-0.265635
0.00510162
-0.265611
0.00419035
-0.265669
0.00328833
-0.265807
0.00239622
-0.266022
0.00151499
-0.266312
0.000645281
-0.266674
-0.000211966
-0.267108
-0.00105569
-0.26761
-0.00188465
-0.00269785
-0.268178
-0.280627
0.0125389
-0.279603
0.0119739
-0.27867
0.0113329
-0.277839
0.0106286
-0.277113
0.0098774
-0.276496
0.00909114
-0.275984
0.00828335
-0.275575
0.00746151
-0.275263
0.00663381
-0.275047
0.00580422
-0.274923
0.00497691
-0.274886
0.00415386
-0.274935
0.00333708
-0.275066
0.00252765
-0.275278
0.00172667
-0.275568
0.000934969
-0.275933
0.000153544
-0.276373
-0.000616486
-0.276883
-0.00137391
-0.00211774
-0.277463
-0.29055
0.0114466
-0.289528
0.0109515
-0.28859
0.010395
-0.287746
0.00978543
-0.287003
0.00913422
-0.286363
0.00845099
-0.285825
0.00774568
-0.285389
0.00702529
-0.285052
0.00629639
-0.284811
0.00556315
-0.284663
0.0048293
-0.284606
0.00409712
-0.284638
0.0033686
-0.284755
0.00264505
-0.284956
0.00192763
-0.285239
0.00121725
-0.2856
0.000514909
-0.286038
-0.000178264
-0.286551
-0.000861061
-0.00153252
-0.287136
-0.301167
0.0103386
-0.300127
0.00991169
-0.299168
0.0094357
-0.298298
0.00891572
-0.297524
0.00836007
-0.296849
0.007776
-0.296274
0.00717097
-0.2958
0.00655085
-0.295425
0.00592096
-0.295147
0.00528513
-0.294964
0.00464663
-0.294874
0.00400774
-0.294876
0.00337033
-0.294967
0.00273577
-0.295145
0.0021052
-0.295407
0.00147951
-0.295752
0.000859644
-0.296176
0.000246665
-0.296679
-0.000358225
-0.000954047
-0.297258
-0.312732
0.00919244
-0.311652
0.00883262
-0.310651
0.00843423
-0.309735
0.00800012
-0.308912
0.00753652
-0.308184
0.00704855
-0.307555
0.00654178
-0.307025
0.00602083
-0.306594
0.00548988
-0.306261
0.00495222
-0.306025
0.00441059
-0.305884
0.00386704
-0.305837
0.00332326
-0.305882
0.00278053
-0.306017
0.00223989
-0.30624
0.00170216
-0.306548
0.00116808
-0.30694
0.000638589
-0.307413
0.000114881
-0.000401982
-0.307965
-0.32565
0.00798326
-0.324507
0.00768902
-0.323438
0.00736567
-0.322453
0.0070144
-0.321556
0.00663976
-0.320752
0.00624514
-0.320045
0.00583455
-0.319436
0.00541143
-0.318925
0.00497891
-0.318512
0.00453961
-0.318197
0.0040957
-0.317979
0.00364892
-0.317857
0.00320064
-0.317828
0.00275198
-0.317892
0.00230382
-0.318047
0.00185683
-0.31829
0.00141148
-0.31862
0.000968408
-0.319034
0.000528723
9.3706e-05
-0.319529
-0.340545
0.00668536
-0.33931
0.00645442
-0.338148
0.00620321
-0.337065
0.00593158
-0.336068
0.0056425
-0.335161
0.00533815
-0.334347
0.00502108
-0.333629
0.00469372
-0.333009
0.00435817
-0.332485
0.00401639
-0.33206
0.00366994
-0.331731
0.00332016
-0.331498
0.00296808
-0.331361
0.00261456
-0.331317
0.00226032
-0.331366
0.00190586
-0.331506
0.00155131
-0.331735
0.00119663
-0.332048
0.000842575
0.000490888
-0.332446
-0.358308
0.00528004
-0.356962
0.00510899
-0.355684
0.00492527
-0.354481
0.00472872
-0.353359
0.00452035
-0.352323
0.00430198
-0.351376
0.00407437
-0.350522
0.00383922
-0.349761
0.00359747
-0.349095
0.00335053
-0.348525
0.00309931
-0.348049
0.00284478
-0.347669
0.00258756
-0.347382
0.00232824
-0.347189
0.00206733
-0.347089
0.00180522
-0.347079
0.00154165
-0.347158
0.00127544
-0.347321
0.00100606
0.000736141
-0.347567
-0.380141
0.00377574
-0.37869
0.00365752
-0.377296
0.00353159
-0.37597
0.0034027
-0.374717
0.00326768
-0.373544
0.00312887
-0.372454
0.00298416
-0.37145
0.00283492
-0.370533
0.0026808
-0.369706
0.00252285
-0.368968
0.00236137
-0.36832
0.002197
-0.367762
0.00202997
-0.367294
0.0018605
-0.366916
0.0016888
-0.366626
0.00151517
-0.366423
0.00133918
-0.366306
0.00115821
-0.366269
0.000968753
0.00077377
-0.366307
-0.407322
0.00224346
-0.405825
0.00216113
-0.404369
0.00207582
-0.402972
0.0020056
-0.401638
0.00193356
-0.400374
0.00186422
-0.399181
0.00179119
-0.398062
0.00171654
-0.39702
0.00163864
-0.396056
0.00155849
-0.39517
0.00147583
-0.394364
0.00139106
-0.393638
0.00130402
-0.392992
0.00121457
-0.392426
0.00112245
-0.391939
0.00102768
-0.391529
0.000930101
-0.391198
0.000826782
-0.390939
0.000709663
0.000575258
-0.39074
-0.439801
0.00085581
-0.438438
0.000797771
-0.437104
0.000742637
-0.435822
0.000722717
-0.434586
0.00069845
-0.433403
0.000680262
-0.432271
0.000659294
-0.431193
0.000638767
-0.430171
0.000616617
-0.429206
0.000593774
-0.4283
0.000569738
-0.427454
0.000544711
-0.426668
0.00051839
-0.425944
0.000490492
-0.425282
0.000460485
-0.424682
0.000427978
-0.424145
0.000392834
-0.423672
0.000353793
-0.423265
0.000302537
0.00021539
-0.422905
-0.475948
-0.47515
-0.474407
-0.473684
-0.472986
-0.472306
-0.471646
-0.471008
-0.470391
-0.469797
-0.469228
-0.468683
-0.468164
-0.467674
-0.467213
-0.466785
-0.466393
-0.466039
-0.465736
-0.465521
-0.207111
-0.00818076
0.00877777
-0.207765
-0.00941867
0.0100732
-0.208477
-0.0106235
0.0113352
-0.209246
-0.0117936
0.0125624
-0.210072
-0.0129264
0.0137524
-0.210955
-0.0140181
0.0149009
-0.211894
-0.0150636
0.0160028
-0.212888
-0.0160565
0.0170511
-0.213936
-0.0169891
0.0180371
-0.215034
-0.0178519
0.01895
-0.216177
-0.0186335
0.0197762
-0.217357
-0.0193193
0.0204992
-0.21856
-0.0198955
0.0210984
-0.219755
-0.0203523
0.0215473
-0.220908
-0.0206781
0.021831
-0.222022
-0.0208553
0.0219693
-0.22304
-0.0209146
0.0219326
-0.223668
-0.0209669
0.0215949
-0.224264
-0.0209274
0.0215237
-0.0209592
-0.224688
0.0213827
-0.213754
-0.00758933
-0.214401
-0.00877162
-0.215102
-0.00992177
-0.215858
-0.0110379
-0.216667
-0.0121174
-0.217529
-0.0131565
-0.218442
-0.0141508
-0.219404
-0.0150943
-0.220413
-0.0159803
-0.221463
-0.016801
-0.22255
-0.0175468
-0.223663
-0.0182069
-0.224786
-0.0187717
-0.225901
-0.0192373
-0.226981
-0.0195988
-0.227988
-0.0198482
-0.228882
-0.0200208
-0.229641
-0.0202079
-0.230188
-0.0203798
-0.0207273
-0.23042
-0.220623
-0.00700399
-0.221263
-0.00813156
-0.221956
-0.00922821
-0.222702
-0.0102919
-0.2235
-0.01132
-0.224347
-0.012309
-0.225243
-0.0132548
-0.226185
-0.0141524
-0.22717
-0.0149959
-0.228192
-0.0157786
-0.229246
-0.0164934
-0.23032
-0.0171323
-0.231403
-0.0176893
-0.232477
-0.0181625
-0.233524
-0.0185518
-0.234512
-0.0188609
-0.235413
-0.0191196
-0.236242
-0.0193792
-0.236943
-0.0196785
-0.0201811
-0.237489
-0.227777
-0.00642092
-0.228415
-0.00749358
-0.229107
-0.00853669
-0.22985
-0.00954811
-0.230645
-0.0105253
-0.231489
-0.011465
-0.23238
-0.0123636
-0.233316
-0.0132166
-0.234293
-0.0140193
-0.235305
-0.014766
-0.236347
-0.0154513
-0.23741
-0.0160698
-0.238481
-0.0166182
-0.239548
-0.0170958
-0.240594
-0.0175056
-0.241598
-0.0178571
-0.242544
-0.0181736
-0.243435
-0.0184876
-0.244258
-0.0188555
-0.0193911
-0.245048
-0.235262
-0.00583406
-0.235905
-0.00685089
-0.236602
-0.00783966
-0.237352
-0.00879826
-0.238153
-0.00972425
-0.239003
-0.0106147
-0.2399
-0.0114663
-0.240842
-0.0122753
-0.241823
-0.0130378
-0.24284
-0.0137492
-0.243886
-0.0144056
-0.244952
-0.0150035
-0.246029
-0.0155413
-0.247105
-0.0160198
-0.248167
-0.0164438
-0.2492
-0.0168241
-0.250194
-0.0171792
-0.251147
-0.0175349
-0.252062
-0.0179405
-0.0184613
-0.252992
-0.243104
-0.00523761
-0.243757
-0.00619728
-0.244466
-0.00713058
-0.245229
-0.00803544
-0.246044
-0.0089096
-0.246908
-0.00975041
-0.247819
-0.010555
-0.248775
-0.0113202
-0.24977
-0.0120427
-0.2508
-0.0127193
-0.251858
-0.013347
-0.252938
-0.0139237
-0.25403
-0.0144493
-0.255124
-0.0149255
-0.25621
-0.015358
-0.257277
-0.0157568
-0.258319
-0.016137
-0.259333
-0.0165209
-0.26033
-0.0169444
-0.0174406
-0.26135
-0.251312
-0.00462726
-0.251981
-0.00552823
-0.252706
-0.00640474
-0.253487
-0.00725479
-0.25432
-0.00807632
-0.255204
-0.00886695
-0.256135
-0.00962424
-0.257109
-0.0103456
-0.258124
-0.0110284
-0.259173
-0.0116702
-0.260251
-0.012269
-0.261351
-0.0128239
-0.262464
-0.0133354
-0.263584
-0.0138061
-0.2647
-0.0142415
-0.265807
-0.0146505
-0.266898
-0.0150455
-0.267974
-0.0154449
-0.269046
-0.0158727
-0.0163447
-0.270142
-0.259885
-0.00400058
-0.260572
-0.00484113
-0.261318
-0.00565932
-0.262119
-0.00645324
-0.262975
-0.00722108
-0.263881
-0.00796074
-0.264835
-0.00867015
-0.265833
-0.00934716
-0.266872
-0.00998987
-0.267946
-0.0105965
-0.269049
-0.0111657
-0.270175
-0.0116974
-0.271318
-0.0121926
-0.27247
-0.0126542
-0.273624
-0.0130873
-0.274775
-0.0134992
-0.27592
-0.0139004
-0.27706
-0.0143048
-0.278205
-0.0147279
-0.0151773
-0.279373
-0.268822
-0.00335719
-0.269527
-0.00413529
-0.270293
-0.00489329
-0.271117
-0.00562943
-0.271996
-0.0063421
-0.272927
-0.00702948
-0.273908
-0.00768988
-0.274933
-0.00832158
-0.276
-0.00892314
-0.277103
-0.0094934
-0.278237
-0.0100316
-0.279397
-0.010538
-0.280575
-0.0110141
-0.281767
-0.0114625
-0.282966
-0.0118879
-0.284169
-0.0122964
-0.285373
-0.0126962
-0.286581
-0.0130975
-0.287799
-0.0135099
-0.0139376
-0.289038
-0.278121
-0.00269924
-0.278844
-0.00341247
-0.279629
-0.00410798
-0.280475
-0.00478416
-0.281377
-0.00543961
-0.282334
-0.00607279
-0.283341
-0.00668234
-0.284396
-0.00726691
-0.285494
-0.00782545
-0.28663
-0.00835728
-0.287799
-0.00886209
-0.288997
-0.00934036
-0.290218
-0.00979364
-0.291456
-0.0102245
-0.292707
-0.0106368
-0.293967
-0.0110357
-0.295236
-0.0114274
-0.296514
-0.0118192
-0.297808
-0.0122167
-0.0126225
-0.299123
-0.287803
-0.00203262
-0.288537
-0.0026781
-0.289337
-0.0033083
-0.290199
-0.00392176
-0.291122
-0.00451728
-0.292101
-0.00509361
-0.293133
-0.00564965
-0.294216
-0.00618441
-0.295344
-0.00669718
-0.296514
-0.00718756
-0.29772
-0.00765564
-0.298959
-0.00810202
-0.300224
-0.00852817
-0.301512
-0.00893647
-0.302819
-0.00933011
-0.304141
-0.00971324
-0.305478
-0.0100907
-0.30683
-0.0104672
-0.308201
-0.0108462
-0.0112293
-0.309594
-0.297922
-0.00136876
-0.298656
-0.00194323
-0.29946
-0.0025048
-0.30033
-0.0030522
-0.301262
-0.00358443
-0.302256
-0.00410048
-0.303306
-0.00459954
-0.304409
-0.00508093
-0.305562
-0.00554419
-0.30676
-0.00598918
-0.308
-0.00641622
-0.309276
-0.00682601
-0.310584
-0.00721992
-0.311921
-0.00760001
-0.313282
-0.00796892
-0.314665
-0.00833001
-0.316069
-0.0086869
-0.317493
-0.00904273
-0.31894
-0.00939947
-0.00975798
-0.320411
-0.308607
-0.000727047
-0.309323
-0.00122703
-0.310111
-0.00171633
-0.31097
-0.00219389
-0.311895
-0.00265889
-0.312885
-0.0031106
-0.313936
-0.00354848
-0.315045
-0.00397209
-0.316208
-0.00438125
-0.317421
-0.00477601
-0.318681
-0.00515676
-0.319982
-0.00552436
-0.321322
-0.00588008
-0.322697
-0.00622558
-0.324102
-0.00656311
-0.325537
-0.00689536
-0.326999
-0.00722513
-0.328487
-0.00755461
-0.330002
-0.00788473
-0.00821563
-0.331544
-0.320119
-0.000137503
-0.320786
-0.000559714
-0.321529
-0.000973088
-0.322346
-0.00137684
-0.323235
-0.00177041
-0.324192
-0.00215333
-0.325215
-0.00252534
-0.326301
-0.00288624
-0.327446
-0.00323606
-0.328647
-0.003575
-0.329901
-0.00390358
-0.331202
-0.00422265
-0.332549
-0.00453338
-0.333937
-0.00483728
-0.335364
-0.00513615
-0.336827
-0.0054321
-0.338325
-0.00572757
-0.339855
-0.00602435
-0.341417
-0.00632277
-0.0066221
-0.343011
-0.33294
0.000357079
-0.333515
1.52437e-05
-0.334169
-0.000319086
-0.3349
-0.000645445
-0.335707
-0.000963717
-0.336587
-0.00127359
-0.337537
-0.00157516
-0.338555
-0.00186838
-0.339637
-0.00215352
-0.340782
-0.00243091
-0.341984
-0.00270116
-0.343242
-0.00296501
-0.344551
-0.0032237
-0.34591
-0.00347864
-0.347315
-0.00373108
-0.348764
-0.00398276
-0.350256
-0.00423603
-0.351787
-0.00449306
-0.353356
-0.00475431
-0.00501782
-0.35496
-0.347912
0.000701935
-0.348338
0.000441761
-0.348845
0.000187868
-0.349431
-5.9027e-05
-0.350096
-0.000299584
-0.350836
-0.000533325
-0.35165
-0.000760939
-0.352536
-0.000982461
-0.353491
-0.00119849
-0.354513
-0.00140938
-0.355598
-0.00161583
-0.356744
-0.00181859
-0.357949
-0.00201873
-0.35921
-0.00221753
-0.360525
-0.00241621
-0.361892
-0.00261596
-0.363309
-0.00281903
-0.364773
-0.00302909
-0.366279
-0.00324837
-0.00347309
-0.367824
-0.366444
0.000839319
-0.366661
0.000658536
-0.366955
0.000482061
-0.367327
0.000313553
-0.367777
0.000150228
-0.368304
-6.84903e-06
-0.368905
-0.000159639
-0.369579
-0.00030806
-0.370325
-0.000453111
-0.371139
-0.000595066
-0.37202
-0.000734678
-0.372966
-0.00087264
-0.373975
-0.00100987
-0.375045
-0.00114767
-0.376174
-0.0012874
-0.37736
-0.00142974
-0.378602
-0.00157658
-0.379898
-0.00173358
-0.381239
-0.00190768
-0.00209442
-0.382617
-0.390631
0.000730226
-0.390591
0.000618056
-0.390618
0.00050878
-0.390718
0.000413765
-0.39089
0.000322634
-0.391135
0.0002379
-0.39145
0.000155507
-0.391834
7.61979e-05
-0.392286
-1.41593e-06
-0.392804
-7.73427e-05
-0.393386
-0.000152349
-0.394032
-0.000226974
-0.394739
-0.000302219
-0.395508
-0.00037912
-0.396336
-0.000459269
-0.397222
-0.000543774
-0.398165
-0.000633318
-0.399165
-0.00073346
-0.400215
-0.000858547
-0.00101489
-0.401294
-0.422564
0.000389613
-0.422279
0.000332925
-0.422049
0.00027899
-0.421883
0.000247716
-0.421777
0.000215806
-0.421728
0.000189266
-0.421735
0.00016292
-0.421798
0.000138431
-0.421914
0.000114473
-0.422082
9.13308e-05
-0.422303
6.84369e-05
-0.422575
4.5507e-05
-0.422899
2.18221e-05
-0.423275
-3.49581e-06
-0.423703
-3.15114e-05
-0.424183
-6.35623e-05
-0.424716
-0.000100457
-0.425305
-0.000144289
-0.425954
-0.000209157
-0.000335095
-0.426634
-0.465131
-0.464798
-0.464519
-0.464272
-0.464056
-0.463867
-0.463704
-0.463565
-0.463451
-0.463359
-0.463291
-0.463246
-0.463224
-0.463227
-0.463259
-0.463322
-0.463423
-0.463567
-0.463776
-0.464111
2.42577e-05
-0.464136
0.000686826
-0.427297
0.00184468
-0.402452
0.00330466
-0.384077
0.00492234
-0.369441
0.00659248
-0.35663
0.00824594
-0.344664
0.00984352
-0.333142
0.0113668
-0.321935
0.0128102
-0.311037
0.0141752
-0.300488
0.0154663
-0.29033
0.0166893
-0.280596
0.0178496
-0.271302
0.0189508
-0.262451
0.0199902
-0.254031
0.0209609
-0.246019
0.0218988
-0.238427
0.0228839
-0.231405
-0.225126
0.0233217
9.94035e-05
-0.464235
0.000807561
-0.428005
0.00201108
-0.403655
0.00351942
-0.385586
0.00518
-0.371102
0.00688686
-0.358337
0.0085727
-0.34635
0.0102
-0.334769
0.0117521
-0.323487
0.013225
-0.31251
0.0146217
-0.301884
0.0159486
-0.291657
0.0172128
-0.28186
0.0184206
-0.27251
0.0195763
-0.263607
0.0206831
-0.255138
0.0217543
-0.24709
0.0228177
-0.23949
0.023848
-0.232436
-0.226006
0.024728
0.000171753
-0.464407
0.000926958
-0.42876
0.00217501
-0.404904
0.00372942
-0.38714
0.00543231
-0.372805
0.0071758
-0.36008
0.00889382
-0.348068
0.0105509
-0.336426
0.0121322
-0.325068
0.0136356
-0.314014
0.0150661
-0.303315
0.0164318
-0.293022
0.0177418
-0.28317
0.019005
-0.273773
0.0202286
-0.264831
0.0214191
-0.256329
0.0225787
-0.24825
0.0236863
-0.240598
0.0246736
-0.233423
-0.226802
0.0254702
0.000207227
-0.464614
0.00102444
-0.429577
0.00232827
-0.406207
0.00393127
-0.388743
0.00567621
-0.37455
0.00745559
-0.36186
0.00920493
-0.349817
0.0108909
-0.338112
0.0125006
-0.326678
0.014034
-0.315547
0.0154976
-0.304778
0.016901
-0.294426
0.0182548
-0.284524
0.0195695
-0.275088
0.0208554
-0.266117
0.0221226
-0.257596
0.0233785
-0.249506
0.0246219
-0.241841
0.0258425
-0.234643
-0.227992
0.0270322
0.000245024
-0.464859
0.00111766
-0.43045
0.00247569
-0.407565
0.00412605
-0.390393
0.00591119
-0.376335
0.00772456
-0.363673
0.00950334
-0.351596
0.0112162
-0.339825
0.0128526
-0.328314
0.0144138
-0.317108
0.0159081
-0.306273
0.0173464
-0.295864
0.0187402
-0.285917
0.0201008
-0.276448
0.0214386
-0.267454
0.022762
-0.258919
0.0240756
-0.250819
0.0253768
-0.243142
0.0266512
-0.235918
-0.229211
0.0278701
0.000274937
-0.465134
0.00120179
-0.431377
0.00261443
-0.408978
0.00431157
-0.392091
0.0061351
-0.378158
0.00798005
-0.365518
0.00978565
-0.353402
0.0115227
-0.341562
0.0131826
-0.329974
0.0147684
-0.318694
0.0162895
-0.307794
0.0177577
-0.297332
0.0191854
-0.287345
0.0205846
-0.277848
0.0219662
-0.268836
0.0233401
-0.260293
0.0247136
-0.252193
0.0260885
-0.244517
0.0274539
-0.237283
-0.230538
0.0287809
0.000305519
-0.465439
0.0012833
-0.432355
0.00274721
-0.410442
0.00448816
-0.393831
0.00634704
-0.380017
0.00822035
-0.367391
0.0100494
-0.355231
0.0118072
-0.34332
0.0134868
-0.331654
0.015093
-0.3203
0.016636
-0.309337
0.0181285
-0.298825
0.019583
-0.2888
0.0210113
-0.279276
0.0224239
-0.270249
0.0238295
-0.261699
0.0252343
-0.253598
0.0266387
-0.245922
0.02803
-0.238675
-0.231883
0.0293752
0.00033381
-0.465773
0.00136036
-0.433381
0.00287292
-0.411954
0.00465468
-0.395613
0.00654554
-0.381908
0.00844355
-0.369289
0.0102922
-0.35708
0.0120667
-0.345094
0.0137618
-0.333349
0.0153837
-0.321922
0.0169435
-0.310897
0.0184543
-0.300335
0.0199288
-0.290274
0.0213788
-0.280726
0.0228145
-0.271684
0.0242445
-0.263129
0.0256751
-0.255028
0.0271066
-0.247353
0.028527
-0.240095
-0.233261
0.0299049
0.000361802
-0.466135
0.00143472
-0.434454
0.0029924
-0.413512
0.00481103
-0.397432
0.00672982
-0.383827
0.00864841
-0.371208
0.0105125
-0.358944
0.0122993
-0.346881
0.0140054
-0.335055
0.015638
-0.323555
0.0172092
-0.312468
0.0187323
-0.301858
0.0202201
-0.291762
0.0216837
-0.28219
0.0231329
-0.273134
0.0245756
-0.264571
0.0260172
-0.25647
0.0274581
-0.248794
0.0288868
-0.241524
-0.234647
0.0302734
0.000388731
-0.466524
0.00150566
-0.435571
0.00310501
-0.415112
0.00495649
-0.399283
0.00689896
-0.385769
0.00883377
-0.373143
0.0107089
-0.360819
0.0125035
-0.348676
0.0142158
-0.336767
0.0158544
-0.325193
0.0174319
-0.314045
0.0189619
-0.303388
0.020457
-0.293257
0.0219283
-0.283661
0.0233848
-0.27459
0.0248343
-0.266021
0.0262818
-0.257917
0.027728
-0.25024
0.0291629
-0.242959
-0.236044
0.0305591
0.000415131
-0.466939
0.00157362
-0.43673
0.00321086
-0.416749
0.00509085
-0.401163
0.00705246
-0.387731
0.00899893
-0.375089
0.0108804
-0.3627
0.0126783
-0.350473
0.0143924
-0.338481
0.0160322
-0.326833
0.0176111
-0.315624
0.0191429
-0.30492
0.02064
-0.294754
0.022113
-0.285134
0.0235706
-0.276048
0.0250201
-0.26747
0.0264663
-0.259364
0.0279104
-0.251684
0.0293436
-0.244392
-0.237442
0.0307414
0.000440909
-0.46738
0.00163842
-0.437927
0.00330968
-0.41842
0.00521375
-0.403067
0.00718988
-0.389707
0.00914337
-0.377043
0.0110267
-0.364584
0.0128234
-0.35227
0.0145347
-0.340193
0.0161714
-0.32847
0.0177472
-0.3172
0.0192762
-0.306449
0.0207707
-0.296249
0.0222409
-0.286604
0.0236953
-0.277502
0.0251407
-0.268915
0.0265819
-0.260805
0.0280205
-0.253123
0.0294495
-0.245821
-0.238839
0.0308474
0.000466422
-0.467846
0.00170038
-0.439161
0.00340159
-0.420121
0.00532514
-0.404991
0.00731106
-0.391693
0.00926688
-0.378999
0.0111476
-0.366464
0.0129385
-0.354061
0.0146429
-0.341897
0.0162721
-0.330099
0.0178408
-0.318769
0.0193629
-0.307971
0.0208507
-0.297736
0.0223141
-0.288067
0.0237612
-0.278949
0.0251984
-0.270353
0.0266307
-0.262237
0.0280601
-0.254552
0.0294811
-0.247242
-0.240234
0.0308755
0.000492015
-0.468338
0.00175978
-0.440429
0.00348664
-0.421848
0.00542491
-0.406929
0.00741584
-0.393684
0.00936935
-0.380952
0.0112429
-0.368338
0.0130239
-0.355842
0.0147172
-0.34359
0.0163351
-0.331717
0.0178928
-0.320327
0.0194044
-0.309483
0.020882
-0.299214
0.0223353
-0.289521
0.0237719
-0.280386
0.0251982
-0.271779
0.0266189
-0.263658
0.0280368
-0.25597
0.0294479
-0.248653
-0.241623
0.0308369
0.000518251
-0.468856
0.001817
-0.441728
0.00356486
-0.423596
0.005513
-0.408877
0.00750421
-0.395675
0.00945083
-0.382899
0.0113128
-0.3702
0.0130799
-0.357609
0.0147582
-0.345268
0.0163612
-0.33332
0.0179044
-0.32187
0.0194022
-0.310981
0.0208665
-0.300678
0.0223066
-0.290961
0.02373
-0.281809
0.0251427
-0.273192
0.0265496
-0.265065
0.0279539
-0.257374
0.029353
-0.250052
-0.243005
0.0307349
0.000545572
-0.469402
0.00187205
-0.443054
0.00363617
-0.42536
0.00558941
-0.410831
0.00757631
-0.397662
0.00951158
-0.384834
0.0113578
-0.372046
0.0131069
-0.359358
0.0147665
-0.346928
0.0163511
-0.334904
0.0178767
-0.323395
0.0193576
-0.312462
0.0208058
-0.302126
0.0222303
-0.292385
0.0236381
-0.283217
0.0250351
-0.274589
0.0264264
-0.266456
0.0278156
-0.258764
0.0292016
-0.251438
-0.244378
0.0305753
0.000574192
-0.469976
0.00192521
-0.444405
0.00370127
-0.427136
0.00565494
-0.412784
0.00763272
-0.39964
0.00955202
-0.386753
0.0113782
-0.373872
0.0131053
-0.361085
0.0147426
-0.348565
0.0163055
-0.336467
0.0178104
-0.3249
0.0192718
-0.313923
0.0207012
-0.303556
0.0221076
-0.293792
0.0234978
-0.284607
0.0248773
-0.275968
0.0262514
-0.26783
0.0276241
-0.260136
0.0289961
-0.25281
-0.245744
0.0303612
0.000605429
-0.470582
0.00197962
-0.445779
0.00376323
-0.42892
0.00571133
-0.414732
0.00767416
-0.401603
0.00957235
-0.388652
0.0113739
-0.375674
0.0130752
-0.362787
0.0146868
-0.350177
0.0162249
-0.338006
0.0177063
-0.326382
0.0191454
-0.315362
0.0205537
-0.304964
0.0219399
-0.295178
0.0233103
-0.285978
0.0246704
-0.277328
0.0260256
-0.269185
0.0273807
-0.261492
0.0287377
-0.254167
-0.2471
0.0300937
0.000647604
-0.471229
0.00204371
-0.447175
0.00382604
-0.430702
0.00575968
-0.416666
0.00770065
-0.403544
0.00957246
-0.390523
0.0113453
-0.377447
0.013017
-0.364458
0.0145996
-0.351759
0.01611
-0.339516
0.0175652
-0.327837
0.0189795
-0.316776
0.0203643
-0.306349
0.0217278
-0.296541
0.0230762
-0.287326
0.0244148
-0.278667
0.0257491
-0.27052
0.0270845
-0.262827
0.0284247
-0.255507
-0.248445
0.0297698
0.000724161
0.00212056
0.00388613
0.00579697
0.00771045
0.00955151
0.0112918
0.0129308
0.0144815
0.0159615
0.0173879
0.018775
0.0201339
0.0214725
0.0227965
0.0241111
0.0254215
0.026734
0.0280536
0.0293838
0.0261577
-1.20418
1.20687
0.0251848
-1.08849
1.08946
0.0251026
-0.988422
0.988504
0.0253959
-0.900235
0.899942
0.0257583
-0.823243
0.82288
0.0260569
-0.754561
0.754262
0.0261874
-0.690762
0.690632
0.0260707
-0.629369
0.629486
0.0256922
-0.569114
0.569493
0.0250841
-0.509964
0.510572
0.0243093
-0.452638
0.453413
0.0234418
-0.398128
0.398996
0.022551
-0.347336
0.348226
0.0216918
-0.300871
0.301731
0.0209016
-0.259021
0.259811
0.0202013
-0.221796
0.222496
0.0195992
-0.189019
0.189622
0.0190951
-0.160406
0.16091
0.018684
-0.135617
0.136028
0.0183587
-0.114306
0.114631
0.0181116
-0.09613
0.0963772
0.0179354
-0.0807638
0.0809401
0.0178237
-0.0678918
0.0680036
0.01777
-0.0572089
0.0572626
0.017767
-0.0484019
0.0484049
0.0178056
-0.0411674
0.0411289
0.0178736
-0.0351796
0.0351115
0.0179567
-0.0301539
0.0300709
0.0180385
-0.0257714
0.0256896
0.0181022
-0.021829
0.0217653
0.0181341
-0.0180365
0.0180046
0.0181208
-0.0143403
0.0143536
0.0180591
-0.0104298
0.0104916
0.0179414
-0.00644904
0.00656669
0.0177807
-0.00192033
0.00208106
0.0175733
0.00266051
-0.0024533
0.0173474
0.00817156
-0.00794552
0.0171098
0.0133262
-0.0130887
0.0168426
0.019922
-0.0196548
0.0267366
-0.0265608
0.024221
-1.20005
0.0223794
-1.08664
0.0218851
-0.987928
0.0220121
-0.900362
0.0223494
-0.82358
0.0227214
-0.754933
0.022996
-0.691037
0.023074
-0.629447
0.0229238
-0.568964
0.0225633
-0.509603
0.0220417
-0.452116
0.0214211
-0.397508
0.0207623
-0.346677
0.0201143
-0.300223
0.0195115
-0.258418
0.0189739
-0.221258
0.0185107
-0.188556
0.0181234
-0.160018
0.017809
-0.135303
0.0175628
-0.11406
0.0173794
-0.0959467
0.0172542
-0.0806386
0.0171825
-0.0678201
0.0171598
-0.0571862
0.0171802
-0.0484223
0.0172357
-0.0412228
0.0173152
-0.0352591
0.0174051
-0.0302437
0.0174897
-0.025856
0.0175527
-0.021892
0.0175812
-0.018065
0.0175627
-0.0143218
0.0174949
-0.0103621
0.0173714
-0.00632554
0.0172066
-0.00175547
0.0169974
0.00286964
0.0167747
0.0083943
0.0165421
0.0135589
0.0162895
0.0201745
0.0268982
0.022288
-1.19456
0.0195705
-1.08393
0.0186488
-0.987006
0.018607
-0.90032
0.0189187
-0.823892
0.0193633
-0.755378
0.0197839
-0.691458
0.02006
-0.629723
0.0201425
-0.569046
0.0200335
-0.509494
0.0197683
-0.451851
0.0193971
-0.397137
0.0189717
-0.346251
0.0185357
-0.299787
0.0181206
-0.258003
0.0177458
-0.220883
0.0174213
-0.188232
0.0171504
-0.159747
0.0169324
-0.135085
0.016765
-0.113892
0.0166454
-0.095827
0.0165709
-0.0805641
0.0165391
-0.0677884
0.0165474
-0.0571944
0.0165912
-0.0484661
0.0166638
-0.0412955
0.0167552
-0.0353505
0.0168523
-0.0303408
0.0169402
-0.025944
0.0170034
-0.0219552
0.0170295
-0.018091
0.0170069
-0.0142992
0.0169343
-0.0102895
0.0168064
-0.00619766
0.016639
-0.00158804
0.0164298
0.00307878
0.0162121
0.00861204
0.0159862
0.0137847
0.01575
0.0204107
0.0270442
0.0203569
-1.18773
0.0167609
-1.08033
0.0153951
-0.98564
0.0151801
-0.900105
0.0154656
-0.824177
0.0159826
-0.755895
0.0165507
-0.692026
0.0170286
-0.630201
0.0173478
-0.569366
0.0174945
-0.509641
0.017489
-0.451846
0.0173698
-0.397017
0.0171796
-0.346061
0.0169567
-0.299565
0.0167297
-0.257776
0.0165179
-0.220671
0.0163321
-0.188046
0.0161775
-0.159593
0.0160557
-0.134963
0.0159669
-0.113804
0.0159107
-0.0957708
0.0158868
-0.0805402
0.0158949
-0.0677965
0.015934
-0.0572335
0.0160013
-0.0485334
0.0160912
-0.0413854
0.0161947
-0.035454
0.0162994
-0.0304456
0.0163913
-0.0260359
0.0164553
-0.0220192
0.0164799
-0.0181156
0.0164542
-0.0142735
0.0163781
-0.0102133
0.0162472
-0.00606679
0.0160787
-0.00141956
0.0158712
0.00328629
0.01566
0.0088232
0.0154426
0.0140022
0.0152242
0.0206291
0.0271736
0.0184275
-1.1796
0.0139519
-1.07585
0.012124
-0.983813
0.0117293
-0.89971
0.0119888
-0.824437
0.0125781
-0.756484
0.0132956
-0.692743
0.0139789
-0.630885
0.0145394
-0.569926
0.0149457
-0.510047
0.0152036
-0.452103
0.0153391
-0.397153
0.0153861
-0.346108
0.0153774
-0.299556
0.0153395
-0.257738
0.015291
-0.220623
0.015244
-0.187999
0.0152057
-0.159554
0.01518
-0.134938
0.0151697
-0.113793
0.0151767
-0.0957778
0.0152033
-0.0805668
0.0152511
-0.0678443
0.015321
-0.0573034
0.0154117
-0.0486241
0.015519
-0.0414927
0.0156348
-0.0355698
0.0157476
-0.0305584
0.0158439
-0.0261322
0.0159095
-0.0220848
0.0159334
-0.0181395
0.0159057
-0.0142459
0.0158271
-0.0101347
0.0156946
-0.00593426
0.0155265
-0.00125145
0.0153221
0.00349063
0.015119
0.00902631
0.0149114
0.0142098
0.0147123
0.0208283
0.0272856
0.0165002
-1.17022
0.0111429
-1.0705
0.00883309
-0.981503
0.00825147
-0.899129
0.00848606
-0.824671
0.009149
-0.757147
0.0100176
-0.693612
0.01091
-0.631777
0.011716
-0.570732
0.0123864
-0.510718
0.0129114
-0.452628
0.0133046
-0.397546
0.013591
-0.346395
0.0137982
-0.299763
0.0139501
-0.25789
0.0140656
-0.220738
0.0141578
-0.188091
0.0142359
-0.159633
0.0143064
-0.135008
0.0143745
-0.113861
0.0144448
-0.0958481
0.0145216
-0.0806436
0.0146089
-0.0679316
0.0147095
-0.057404
0.0148237
-0.0487383
0.0149484
-0.0416174
0.0150767
-0.0356981
0.0151979
-0.0306796
0.0152991
-0.0262334
0.0153668
-0.0221525
0.0153908
-0.0181634
0.0153621
-0.0142171
0.0152822
-0.0100548
0.0151493
-0.00580136
0.0149829
-0.00108507
0.0147832
0.00369036
0.0145895
0.00922007
0.0143931
0.0144061
0.0142142
0.0210072
0.0273795
0.0145741
-1.15963
0.00833082
-1.06425
0.0055197
-0.978692
0.00474496
-0.898354
0.00495698
-0.824883
0.00569494
-0.757885
0.00671599
-0.694633
0.00782062
-0.632882
0.0088766
-0.571788
0.00981545
-0.511656
0.0106115
-0.453424
0.0112656
-0.3982
0.011794
-0.346923
0.0122188
-0.300188
0.012562
-0.258233
0.0128422
-0.221019
0.0130741
-0.188323
0.013269
-0.159827
0.0134358
-0.135175
0.0135824
-0.114008
0.0137158
-0.0959815
0.0138429
-0.0807706
0.0139696
-0.0680584
0.0141008
-0.0575352
0.0142383
-0.0488758
0.0143805
-0.0417596
0.0145214
-0.035839
0.0146512
-0.0308094
0.0147578
-0.02634
0.0148283
-0.022223
0.0148532
-0.0181883
0.0148244
-0.0141883
0.0147443
-0.00997467
0.0146122
-0.00566927
0.0144488
-0.00092169
0.014255
0.00388415
0.0140718
0.00940329
0.0138879
0.01459
0.0137302
0.0211649
0.0274547
0.0126464
-1.14785
0.00551663
-1.05712
0.00219054
-0.975365
0.00121656
-0.89738
0.00140571
-0.825073
0.00221766
-0.758697
0.00339059
-0.695806
0.0047097
-0.634201
0.00601973
-0.573098
0.00723148
-0.512868
0.00830269
-0.454496
0.00922134
-0.399119
0.00999444
-0.347696
0.010639
-0.300832
0.011175
-0.258769
0.0116211
-0.221465
0.0119934
-0.188695
0.0123056
-0.16014
0.0125691
-0.135439
0.0127943
-0.114233
0.0129909
-0.0961781
0.0131681
-0.0809478
0.0133343
-0.0682245
0.0134959
-0.0576968
0.0136567
-0.0490366
0.0138163
-0.0419193
0.0139699
-0.0359926
0.0141086
-0.0309481
0.014221
-0.0264524
0.0142948
-0.0222968
0.0143213
-0.0182149
0.0142933
-0.0141603
0.014214
-0.0098954
0.0140839
-0.00553913
0.0139247
-0.000762477
0.013738
0.00407081
0.0135664
0.00957493
0.013396
0.0147604
0.0132601
0.0213009
0.027511
0.0107193
-1.13494
0.00271887
-1.04912
-0.00113275
-0.971514
-0.00232168
-0.896191
-0.00216408
-0.82523
-0.00128264
-0.759578
4.04095e-05
-0.697129
0.0015757
-0.635736
0.00314375
-0.574666
0.00463293
-0.514357
0.00598365
-0.455846
0.00717062
-0.400306
0.00819162
-0.348717
0.00905846
-0.301699
0.00978906
-0.2595
0.0104024
-0.222078
0.0109162
-0.189209
0.0113463
-0.16057
0.011707
-0.135799
0.0120111
-0.114537
0.012271
-0.096438
0.0124984
-0.0811752
0.0127038
-0.0684299
0.0128958
-0.0578888
0.0130797
-0.0492205
0.0132567
-0.0420963
0.0134232
-0.036159
0.0135709
-0.0310959
0.0136894
-0.0265709
0.0137672
-0.0223745
0.0137961
-0.0182437
0.0137697
-0.0141339
0.0136922
-0.00981792
0.0135651
-0.00541201
0.0134111
-0.000608528
0.0132327
0.00424923
0.0130735
0.00973408
0.0129175
0.0149164
0.0128039
0.0214145
0.0275481
0.00880774
-1.12098
-3.51752e-05
-1.04028
-0.00444355
-0.967105
-0.00588259
-0.894752
-0.00576867
-0.825344
-0.00481727
-0.76053
-0.00334117
-0.698605
-0.00158551
-0.637492
0.000245766
-0.576497
0.0020176
-0.516129
0.00365261
-0.457481
0.00511211
-0.401765
0.00638455
-0.34999
0.00747648
-0.302791
0.00840391
-0.260427
0.00918615
-0.22286
0.00984263
-0.189866
0.0103916
-0.161119
0.0108499
-0.136258
0.0112334
-0.114921
0.0115569
-0.0967615
0.0118345
-0.0814528
0.0120791
-0.0686745
0.0123013
-0.058111
0.0125084
-0.0494275
0.0127028
-0.0422907
0.0128821
-0.0363383
0.0130391
-0.0312529
0.0131641
-0.0266959
0.0132462
-0.0224567
0.0132781
-0.0182756
0.0132542
-0.0141099
0.0131794
-0.00974315
0.0130563
-0.0052889
0.0129086
-0.000460842
0.0127394
0.00441844
0.0125935
0.00987997
0.0124526
0.0150573
0.0123616
0.0215055
0.0275659
0.00691807
-1.10605
-0.00277984
-1.03058
-0.00781723
-0.962068
-0.0095398
-0.89303
-0.00945798
-0.825426
-0.00841418
-0.761573
-0.00676922
-0.70025
-0.00478268
-0.639478
-0.00267974
-0.5786
-0.000618152
-0.518191
0.00130704
-0.459407
0.00304399
-0.403502
0.00457194
-0.351517
0.00589225
-0.304111
0.00701908
-0.261554
0.0079722
-0.223813
0.00877283
-0.190666
0.00944175
-0.161788
0.00999857
-0.136814
0.0104618
-0.115384
0.0108492
-0.0971488
0.0111772
-0.0817809
0.011461
-0.0689584
0.0117135
-0.0583635
0.0119435
-0.0496575
0.0121553
-0.0425025
0.0123474
-0.0365305
0.0125139
-0.0314194
0.0126457
-0.0268277
0.0127328
-0.0225437
0.0127683
-0.0183112
0.0127475
-0.0140892
0.0126763
-0.00967196
0.0125582
-0.00517072
0.0124176
-0.00032033
0.0122585
0.00457756
0.0121265
0.0100119
0.0120014
0.0151824
0.0119332
0.0215737
0.0275645
0.00497638
-1.09018
-0.0056702
-1.01994
-0.0113896
-0.956349
-0.0133696
-0.89105
-0.0132666
-0.825529
-0.0120897
-0.76275
-0.0102538
-0.702086
-0.00802364
-0.641708
-0.00563885
-0.580985
-0.00327887
-0.520551
-0.00105639
-0.461629
0.000963855
-0.405522
0.0027521
-0.353306
0.00430462
-0.305664
0.00563387
-0.262883
0.0067602
-0.22494
0.00770676
-0.191613
0.00849694
-0.162578
0.00915321
-0.137471
0.00969697
-0.115928
0.0101486
-0.0976004
0.0105272
-0.0821595
0.0108503
-0.0692815
0.011133
-0.0586461
0.0113859
-0.0499105
0.011615
-0.0427315
0.0118201
-0.0367356
0.0119962
-0.0315956
0.0121351
-0.0269666
0.0122275
-0.022636
0.0122672
-0.0183509
0.0122504
-0.0140723
0.0121836
-0.00960513
0.0120712
-0.0050583
0.0119386
-0.00018781
0.0117903
0.00472585
0.0116728
0.0101295
0.0115639
0.0152913
0.0115184
0.0216192
0.0275441
0.00284804
-1.07331
-0.0087639
-1.00832
-0.0150712
-0.950041
-0.0172362
-0.888885
-0.017088
-0.825677
-0.0157808
-0.764057
-0.0137642
-0.704102
-0.0112957
-0.644177
-0.00862784
-0.583653
-0.00596474
-0.523214
-0.00343926
-0.464155
-0.00113012
-0.407832
0.000923427
-0.355359
0.00271238
-0.307453
0.00424746
-0.264418
0.00554969
-0.226242
0.00664425
-0.192707
0.00755725
-0.163491
0.00831411
-0.138227
0.00893917
-0.116553
0.00945555
-0.0981168
0.00988508
-0.082589
0.0102477
-0.0696441
0.0105605
-0.058959
0.0108363
-0.0501863
0.0110826
-0.0429778
0.0113007
-0.0369537
0.0114866
-0.0317815
0.0116329
-0.0271129
0.011731
-0.0227342
0.0117756
-0.0183955
0.0117633
-0.01406
0.0117016
-0.00954341
0.0115957
-0.00495242
0.0114719
-6.40122e-05
0.0113351
0.00486266
0.0112325
0.0102321
0.0111401
0.0153837
0.0111172
0.021642
0.027505
0.000694097
-1.05553
-0.0115142
-0.996116
-0.018254
-0.943302
-0.0206907
-0.886448
-0.0206491
-0.825719
-0.019334
-0.765373
-0.0172148
-0.706222
-0.0145524
-0.646839
-0.0116231
-0.586582
-0.00866472
-0.526172
-0.00583706
-0.466982
-0.00323655
-0.410432
-0.000914
-0.357682
0.00111518
-0.309482
0.00285947
-0.266162
0.00434039
-0.227723
0.0055852
-0.193952
0.00662275
-0.164528
0.0074815
-0.139086
0.00818879
-0.11726
0.0087706
-0.0986986
0.00925143
-0.0830698
0.00965367
-0.0700464
0.00999674
-0.059302
0.0102954
-0.050485
0.0105589
-0.0432413
0.01079
-0.0371847
0.0109858
-0.0319772
0.0111398
-0.0272668
0.0112441
-0.0228385
0.011294
-0.0184454
0.0112869
-0.014053
0.011231
-0.00948749
0.0111323
-0.00485376
0.0110179
5.04257e-05
0.0108931
0.00498744
0.0108056
0.0103196
0.01073
0.0154594
0.0107294
0.0216425
0.0274476
-0.000751191
-1.03771
-0.013074
-0.983794
-0.0204762
-0.935899
-0.023566
-0.883358
-0.0239042
-0.825381
-0.0227278
-0.766549
-0.0205837
-0.708366
-0.0177738
-0.649649
-0.0146099
-0.589746
-0.0113694
-0.529413
-0.00824425
-0.470107
-0.00535247
-0.413324
-0.00275875
-0.360276
-0.000486372
-0.311754
0.00147014
-0.268119
0.00313247
-0.229385
0.00452976
-0.19535
0.00569365
-0.165692
0.00665567
-0.140048
0.00744621
-0.118051
0.00809415
-0.0993465
0.00862671
-0.0836024
0.00906883
-0.0704885
0.00944222
-0.0596754
0.00976377
-0.0508065
0.0100445
-0.043522
0.0102886
-0.0374288
0.0104944
-0.0321831
0.0106563
-0.0274287
0.0107671
-0.0229493
0.0108228
-0.0185012
0.0108216
-0.0140517
0.010772
-0.00943797
0.0106812
-0.00476295
0.0105767
0.000154953
0.0104644
0.00509976
0.0103922
0.0103917
0.0103335
0.0155181
0.0103549
0.0216211
0.0273722
-0.00157306
-1.02072
-0.0145631
-0.970804
-0.023191
-0.927271
-0.0270826
-0.879466
-0.0276843
-0.824779
-0.0264639
-0.767769
-0.0241579
-0.710672
-0.0211206
-0.652687
-0.017676
-0.593191
-0.0141253
-0.532963
-0.0106852
-0.473548
-0.00749071
-0.416518
-0.00461776
-0.363149
-0.00209611
-0.314276
7.73131e-05
-0.270292
0.00192467
-0.231233
0.00347727
-0.196902
0.00476967
-0.166985
0.00583659
-0.141115
0.00671157
-0.118926
0.00742647
-0.100061
0.00801131
-0.0841872
0.0084936
-0.0709708
0.00889745
-0.0600793
0.00924191
-0.051151
0.00953985
-0.04382
0.00979701
-0.037686
0.010013
-0.032399
0.010183
-0.0275987
0.0103007
-0.0230671
0.0103627
-0.0185632
0.0103677
-0.0140567
0.0103252
-0.00939542
0.0102428
-0.00468051
0.0101486
0.000249106
0.0100491
0.00519928
0.00999241
0.0104484
0.0099505
0.01556
0.0099933
0.0215783
0.0272794
-0.00517203
-1.00208
-0.0201703
-0.955805
-0.0295589
-0.917883
-0.0333187
-0.875707
-0.033301
-0.824797
-0.0313796
-0.769691
-0.028478
-0.713573
-0.0249364
-0.656228
-0.0210342
-0.597093
-0.0170615
-0.536936
-0.0132375
-0.477372
-0.00969814
-0.420058
-0.00651961
-0.366327
-0.00373172
-0.317064
-0.00133013
-0.272694
0.000709951
-0.233273
0.00242322
-0.198615
0.00384794
-0.168409
0.00502247
-0.14229
0.00598381
-0.119887
0.00676701
-0.100845
0.00740502
-0.0848253
0.00792803
-0.0714938
0.00836265
-0.0605139
0.00873015
-0.0515185
0.00904538
-0.0441352
0.00931569
-0.0379563
0.00954193
-0.0326252
0.00972034
-0.0277772
0.00984532
-0.023192
0.00991401
-0.0186318
0.0099258
-0.0140685
0.00989071
-0.00936033
0.00981713
-0.00460693
0.00973373
0.000332499
0.00964727
0.00528575
0.00960606
0.0104896
0.00958091
0.0155852
0.00964452
0.0215147
0.0271699
-0.0141783
-0.976913
-0.0300307
-0.939953
-0.0385389
-0.909375
-0.0411269
-0.873119
-0.0399458
-0.825978
-0.0370375
-0.772599
-0.0333423
-0.717269
-0.0291409
-0.66043
-0.0246639
-0.60157
-0.020185
-0.541415
-0.0159175
-0.481639
-0.0119919
-0.423983
-0.00847921
-0.36984
-0.00540515
-0.320138
-0.00276133
-0.275338
-0.000518492
-0.235516
0.00136268
-0.200497
0.00292494
-0.169972
0.00421087
-0.143576
0.00526131
-0.120937
0.00611475
-0.101698
0.00680725
-0.0855178
0.00737186
-0.0720584
0.00783777
-0.0609798
0.00822863
-0.0519094
0.00856133
-0.0444679
0.00884493
-0.0382399
0.00908163
-0.0328619
0.00926867
-0.0279642
0.00940121
-0.0233246
0.00947698
-0.0187076
0.009496
-0.0140875
0.00946882
-0.00933315
0.0094045
-0.00454262
0.00933218
0.000404825
0.00925893
0.00535899
0.00923312
0.0105154
0.00922454
0.0155938
0.00930829
0.021431
0.0270441
-0.016288
-0.952366
-0.0306222
-0.925619
-0.039618
-0.900379
-0.0430207
-0.869716
-0.0425849
-0.826414
-0.0401462
-0.775038
-0.0366196
-0.720795
-0.0323752
-0.664674
-0.0277187
-0.606226
-0.0229766
-0.546157
-0.0184084
-0.486207
-0.0141778
-0.428214
-0.0103761
-0.373641
-0.00704059
-0.323474
-0.00416777
-0.278211
-0.00172908
-0.237954
0.000316522
-0.202542
0.00201469
-0.17167
0.00341133
-0.144972
0.00455062
-0.122077
0.00547425
-0.102622
0.00622123
-0.0862647
0.0068274
-0.0726646
0.00732454
-0.0614769
0.00773865
-0.0523235
0.00808872
-0.044818
0.00838557
-0.0385367
0.00863278
-0.0331092
0.0088286
-0.02816
0.00896895
-0.0234649
0.00905214
-0.0187908
0.00907874
-0.0141141
0.00905984
-0.00931424
0.00900509
-0.00448787
0.00894404
0.000465875
0.00888408
0.00541896
0.0088735
0.010526
0.00888121
0.0155861
0.00898437
0.0213278
0.0269027
0.0142819
-0.960984
-0.00513212
-0.906205
-0.0207401
-0.884771
-0.030951
-0.859505
-0.0361203
-0.821244
-0.0373564
-0.773802
-0.0360328
-0.722119
-0.0331053
-0.667601
-0.0291789
-0.610153
-0.0247559
-0.55058
-0.02025
-0.490713
-0.0159408
-0.432523
-0.0119919
-0.37759
-0.00848431
-0.326981
-0.00543989
-0.281255
-0.00284302
-0.240551
-0.00065828
-0.204727
0.00115846
-0.173487
0.00265372
-0.146467
0.00387328
-0.123296
0.00486093
-0.103609
0.00565791
-0.0870617
0.00630237
-0.073309
0.00682835
-0.0620029
0.00726403
-0.0527592
0.00763033
-0.0451843
0.00793973
-0.0388461
0.00819707
-0.0333665
0.00840155
-0.0283645
0.00854976
-0.0236131
0.00864052
-0.0188816
0.0086749
-0.0141485
0.00866444
-0.00930378
0.00861944
-0.00444286
0.00856964
0.000515672
0.00852296
0.00546564
0.00852713
0.0105218
0.00855097
0.0155622
0.00867229
0.0212065
0.0267463
0.39671
-0.870667
-0.487028
0.347848
-0.857342
0.300426
-0.837348
0.252009
-0.811088
0.210491
-0.779726
0.177564
-0.740875
0.150556
-0.69511
0.127515
-0.644561
0.107831
-0.590469
0.0911407
-0.533889
0.077057
-0.476629
0.0652763
-0.420743
0.0555429
-0.367857
0.0475919
-0.31903
0.0411554
-0.274819
0.035981
-0.235377
0.0318426
-0.200589
0.0285459
-0.17019
0.0259295
-0.143851
0.0238628
-0.121229
0.0222415
-0.101988
0.020983
-0.0858032
0.0200206
-0.0723467
0.0192976
-0.0612799
0.0187624
-0.0522239
0.0183641
-0.044786
0.0180536
-0.0385356
0.017783
-0.0330959
0.0175128
-0.0280943
0.0172124
-0.0233128
0.0168693
-0.0185385
0.0164819
-0.013761
0.0160724
-0.00889425
0.0156625
-0.00403297
0.0153055
0.000872643
0.0150182
0.00575297
0.0148766
0.0106634
0.0148254
0.0156134
0.0149889
0.0210429
0.0264815
0.429258
-0.784677
-0.515248
0.364896
-0.79298
0.310769
-0.783221
0.264191
-0.76451
0.22445
-0.739986
0.191039
-0.707464
0.162739
-0.66681
0.138356
-0.620178
0.117299
-0.569412
0.0992714
-0.515862
0.0839788
-0.461337
0.0711382
-0.407902
0.0604866
-0.357205
0.051749
-0.310293
0.0446439
-0.267713
0.0389048
-0.229638
0.0342922
-0.195976
0.0305994
-0.166497
0.0276534
-0.140905
0.025313
-0.118889
0.023465
-0.10014
0.0220188
-0.084357
0.020901
-0.0712289
0.0200487
-0.0604276
0.0194049
-0.05158
0.0189134
-0.0442945
0.0185202
-0.0381424
0.0181733
-0.032749
0.0178306
-0.0277516
0.0174602
-0.0229423
0.0170504
-0.0181287
0.016602
-0.0133126
0.016141
-0.00843324
0.0156937
-0.00358567
0.0153164
0.00124994
0.0150292
0.00604015
0.0149061
0.0107865
0.014891
0.0156285
0.015107
0.0208269
0.0261668
0.467596
-0.705584
-0.546689
0.403495
-0.72888
0.347736
-0.727462
0.297112
-0.713887
0.252329
-0.695203
0.214229
-0.669364
0.181982
-0.634563
0.154238
-0.592434
0.130252
-0.545426
0.109731
-0.495341
0.0923957
-0.444001
0.0779149
-0.393421
0.0659601
-0.345251
0.056195
-0.300527
0.04828
-0.259798
0.0418983
-0.223256
0.0367711
-0.190849
0.0326619
-0.162388
0.0293758
-0.137619
0.0267553
-0.116269
0.0246749
-0.0980597
0.0230348
-0.0827169
0.0217543
-0.0699484
0.0207643
-0.0594376
0.0200023
-0.0508181
0.0194074
-0.0436995
0.018921
-0.037656
0.0184874
-0.0323154
0.0180625
-0.0273267
0.0176135
-0.0224933
0.0171306
-0.0176458
0.0166172
-0.0127993
0.0161037
-0.00791969
0.0156208
-0.00310281
0.0152279
0.0016428
0.0149473
0.00632075
0.0148508
0.010883
0.0148793
0.0156001
0.0151553
0.0205509
0.0257983
0.491842
-0.626723
-0.570702
0.422792
-0.65983
0.364638
-0.669308
0.314633
-0.663882
0.270446
-0.651015
0.231595
-0.630513
0.197774
-0.600742
0.168208
-0.562868
0.142324
-0.519542
0.119943
-0.47296
0.100912
-0.42497
0.0849539
-0.377463
0.0717396
-0.332036
0.0609219
-0.28971
0.0521423
-0.251019
0.045058
-0.216171
0.0393627
-0.185154
0.0347946
-0.15782
0.0311363
-0.133961
0.0282121
-0.113344
0.0258815
-0.0957292
0.0240332
-0.0808686
0.0225774
-0.0684925
0.0214377
-0.0582979
0.0205459
-0.0499262
0.0198355
-0.0429892
0.019244
-0.0370645
0.0187124
-0.0317838
0.0181949
-0.0268092
0.0176591
-0.0219575
0.017097
-0.0170837
0.0165159
-0.0122181
0.0159502
-0.00735401
0.0154356
-0.00258815
0.0150334
0.00204498
0.0147677
0.00658644
0.0147059
0.0109448
0.0147869
0.0155191
0.0151286
0.0202092
0.0253713
0.518584
-0.554318
-0.59099
0.453195
-0.59444
0.396059
-0.612172
0.344581
-0.612404
0.297206
-0.60364
0.254511
-0.587818
0.217005
-0.563236
0.184267
-0.53013
0.155686
-0.490961
0.130987
-0.448261
0.109998
-0.403981
0.0924185
-0.359884
0.0778659
-0.317484
0.0659412
-0.277785
0.0562478
-0.241325
0.0484114
-0.208335
0.0420994
-0.178842
0.0370275
-0.152748
0.0329584
-0.129892
0.0296985
-0.110084
0.0270922
-0.0931229
0.0250151
-0.0787915
0.0233667
-0.0668442
0.0220621
-0.0569933
0.021026
-0.0488901
0.0201865
-0.0421496
0.0194766
-0.0363547
0.0188347
-0.0311419
0.0182143
-0.0261887
0.0175835
-0.0213268
0.0169375
-0.0164376
0.0162873
-0.011568
0.015672
-0.00673862
0.0151314
-0.0020476
0.0147281
0.00244833
0.0144871
0.00682744
0.014469
0.0109628
0.0146118
0.0153763
0.0150237
0.0197973
0.0248812
0.540427
-0.487053
-0.607691
0.475273
-0.529286
0.41604
-0.552939
0.36337
-0.559735
0.315886
-0.556155
0.272684
-0.544616
0.233777
-0.52433
0.199168
-0.495521
0.168629
-0.460421
0.142024
-0.421657
0.119276
-0.381233
0.100151
-0.340759
0.0842744
-0.301607
0.0712272
-0.264738
0.0605896
-0.230688
0.0519634
-0.199709
0.0449936
-0.171872
0.0393762
-0.14713
0.0348567
-0.125372
0.0312258
-0.106453
0.0283134
-0.0902105
0.0259819
-0.07646
0.0241193
-0.0649816
0.022631
-0.055505
0.0214337
-0.0476928
0.0204491
-0.0411651
0.0196063
-0.0355119
0.0188413
-0.0303769
0.0181073
-0.0254547
0.0173744
-0.020594
0.016641
-0.0157042
0.0159228
-0.0108498
0.0152626
-0.0060784
0.0147045
-0.0014895
0.0143102
0.00284268
0.0141049
0.00703268
0.01414
0.0109278
0.0143537
0.0151626
0.0148395
0.0193115
0.0243228
0.558868
-0.42554
-0.620381
0.497795
-0.468213
0.440913
-0.496056
0.388777
-0.507599
0.340043
-0.507421
0.294307
-0.498881
0.252381
-0.482404
0.214924
-0.458064
0.18196
-0.427457
0.153298
-0.392994
0.128769
-0.356704
0.10811
-0.3201
0.0909213
-0.284418
0.07675
-0.250567
0.0651517
-0.219089
0.0557086
-0.190266
0.0480474
-0.164211
0.0418477
-0.140931
0.0368404
-0.120365
0.0328026
-0.102416
0.0295512
-0.0869591
0.0269362
-0.073845
0.0248341
-0.0628795
0.0231397
-0.0538106
0.021761
-0.0463141
0.0206134
-0.0400175
0.0196216
-0.0345202
0.0187199
-0.0294751
0.0178622
-0.024597
0.0170212
-0.019753
0.0161992
-0.0148822
0.0154165
-0.0100671
0.0147192
-0.00538109
0.0141545
-0.000924795
0.0137812
0.00321598
0.0136238
0.00719006
0.0137215
0.01083
0.0140148
0.0148693
0.0145772
0.0187491
0.0236906
0.574089
-0.369744
-0.629885
0.516558
-0.410683
0.460296
-0.439794
0.407063
-0.454366
0.357186
-0.457544
0.310636
-0.45233
0.267732
-0.4395
0.228926
-0.419258
0.194423
-0.392954
0.164208
-0.362779
0.138187
-0.330684
0.11615
-0.298063
0.0977267
-0.265994
0.0824646
-0.235305
0.0699099
-0.206535
0.0596355
-0.179991
0.0512575
-0.155833
0.044444
-0.134117
0.0389146
-0.114835
0.0344349
-0.0979359
0.0308109
-0.0833351
0.0278812
-0.0709153
0.025511
-0.0605093
0.0235849
-0.0518845
0.022002
-0.0447312
0.0206709
-0.0386864
0.0195126
-0.0333618
0.0184603
-0.0284228
0.0174694
-0.0236061
0.0165161
-0.0187997
0.0156068
-0.0139728
0.0147662
-0.00922648
0.0140426
-0.00465755
0.0134848
-0.000366994
0.0131463
0.00355446
0.0130495
0.00728692
0.0132191
0.0106604
0.0135998
0.0144886
0.0142412
0.0181077
0.0229773
0.585405
-0.318951
-0.636199
0.531574
-0.356852
0.477472
-0.385692
0.425207
-0.402101
0.375393
-0.40773
0.328013
-0.40495
0.283536
-0.395023
0.242852
-0.378574
0.206578
-0.35668
0.17483
-0.331031
0.147453
-0.303306
0.124175
-0.274786
0.104615
-0.246434
0.0883205
-0.21901
0.074834
-0.193048
0.0637282
-0.168886
0.0546174
-0.146722
0.0471644
-0.126664
0.041082
-0.108753
0.0361275
-0.0929815
0.0320975
-0.079305
0.0288206
-0.0676384
0.0261518
-0.0578405
0.0239658
-0.0496985
0.022153
-0.0429184
0.0206159
-0.0371494
0.0192723
-0.0320182
0.0180553
-0.0272058
0.0169228
-0.0224737
0.0158552
-0.0177321
0.0148629
-0.0129805
0.0139745
-0.00833807
0.0132388
-0.00392182
0.0127037
0.000168019
0.0124151
0.00384309
0.0123915
0.00731055
0.0126417
0.0104102
0.0131168
0.0140135
0.0138397
0.0173848
0.0221737
0.59219
-0.272479
-0.638662
0.541876
-0.306538
0.489852
-0.333668
0.438154
-0.350402
0.387987
-0.357564
0.340065
-0.357028
0.295137
-0.350095
0.253977
-0.337415
0.217074
-0.319777
0.184539
-0.298496
0.156263
-0.27503
0.132023
-0.250546
0.111492
-0.225904
0.0942589
-0.201776
0.0798882
-0.178678
0.0679668
-0.156964
0.0581176
-0.136873
0.0500065
-0.118553
0.0433445
-0.102091
0.0378845
-0.0875214
0.0334158
-0.0748363
0.029759
-0.0639815
0.0267596
-0.0548412
0.0242834
-0.0472223
0.0222131
-0.040848
0.0204459
-0.0353822
0.0188974
-0.0304697
0.017502
-0.0258104
0.0162211
-0.0211928
0.0150397
-0.0165508
0.0139723
-0.011913
0.0130496
-0.00741542
0.0123187
-0.00319095
0.0118243
0.000662484
0.0116012
0.00406617
0.011663
0.00724872
0.0120019
0.0100713
0.0125775
0.013438
0.0133861
0.0165762
0.0212669
0.593138
-0.229678
-0.635939
0.546053
-0.259453
0.496439
-0.284054
0.446303
-0.300266
0.397154
-0.308414
0.349934
-0.309808
0.305345
-0.305507
0.264079
-0.296149
0.226724
-0.282422
0.193573
-0.265345
0.164607
-0.246064
0.139617
-0.225556
0.118284
-0.204571
0.100225
-0.183717
0.0850362
-0.163489
0.0723299
-0.144258
0.0617476
-0.12629
0.052967
-0.109772
0.0457038
-0.0948278
0.0397103
-0.0815279
0.034772
-0.069898
0.0307027
-0.0599122
0.0273402
-0.0514787
0.0245424
-0.0444245
0.0221854
-0.038491
0.0201628
-0.0333596
0.0183894
-0.0286964
0.0168028
-0.0242238
0.0153687
-0.0197586
0.0140773
-0.0152594
0.0129458
-0.0107816
0.0120057
-0.00647531
0.0112992
-0.00248448
0.0108642
0.00109751
0.0107224
0.00420795
0.010881
0.00709016
0.011316
0.00963633
0.0119981
0.0127559
0.0128998
0.0156745
0.0202393
0.586859
-0.190258
-0.626279
0.543083
-0.215677
0.49639
-0.237361
0.448567
-0.252444
0.401149
-0.260995
0.355237
-0.263896
0.311664
-0.261934
0.271153
-0.255637
0.234264
-0.245534
0.201275
-0.232356
0.17218
-0.216968
0.146808
-0.200184
0.124907
-0.18267
0.106167
-0.164977
0.0902451
-0.147567
0.0767977
-0.13081
0.0654979
-0.11499
0.0560438
-0.100318
0.0481626
-0.0869467
0.0416112
-0.0749765
0.0361741
-0.0644608
0.0316606
-0.0553988
0.0279025
-0.0477206
0.0247512
-0.0412732
0.0220778
-0.0358176
0.0197742
-0.0310559
0.0177566
-0.0266788
0.0159673
-0.0224344
0.0143776
-0.0181689
0.0129828
-0.0138645
0.0118017
-0.00960055
0.0108635
-0.00553716
0.0102025
-0.00182348
0.00984606
0.00145399
0.00980063
0.00425338
0.010066
0.00682479
0.0106043
0.00909803
0.0113997
0.0119605
0.0124068
0.0146673
0.0190674
0.572789
-0.154384
-0.608663
0.532721
-0.175608
0.489616
-0.194256
0.44504
-0.207868
0.40045
-0.216405
0.356967
-0.220413
0.315421
-0.220388
0.276466
-0.216683
0.240608
-0.209676
0.208153
-0.199901
0.179192
-0.188007
0.153651
-0.174643
0.131355
-0.160374
0.112063
-0.145685
0.0954951
-0.130999
0.0813577
-0.116673
0.0693632
-0.102996
0.0592379
-0.0901931
0.050727
-0.0784357
0.0435964
-0.067846
0.0376335
-0.0584979
0.0326457
-0.050411
0.0284603
-0.0435351
0.0249238
-0.0377367
0.0219047
-0.0327985
0.0192951
-0.0284463
0.0170152
-0.0243989
0.0150136
-0.0204328
0.0132683
-0.0164237
0.0117794
-0.0123757
0.0105655
-0.00838663
0.00965023
-0.00462185
0.00905609
-0.00122934
0.00879636
0.00171372
0.0088611
0.00418865
0.00924218
0.0064437
0.0098915
0.00844871
0.0108088
0.0110432
0.0119401
0.013536
0.0177207
0.551987
-0.122446
-0.583925
0.516148
-0.13977
0.477306
-0.155414
0.436784
-0.167346
0.395855
-0.175476
0.355542
-0.1801
0.316634
-0.18148
0.279759
-0.179808
0.245416
-0.175333
0.213942
-0.168426
0.185494
-0.159559
0.160079
-0.149228
0.137601
-0.137897
0.117904
-0.125988
0.100783
-0.113878
0.0860108
-0.101901
0.0733482
-0.0903333
0.0625577
-0.0794027
0.0534086
-0.0692866
0.0456808
-0.0601181
0.0391675
-0.0519847
0.0336769
-0.0449204
0.0290337
-0.0388919
0.0250819
-0.0337849
0.0216889
-0.0294056
0.0187499
-0.0255073
0.0161912
-0.0218403
0.0139699
-0.0182115
0.0120715
-0.0145252
0.0104998
-0.010804
0.00927081
-0.00715765
0.00839913
-0.00375018
0.00789204
-0.000722251
0.00774536
0.0018604
0.00793237
0.00400164
0.00843718
0.00593889
0.00920642
0.00767947
0.0102571
0.00999245
0.0115382
0.012255
0.0161623
0.527315
-0.0946959
-0.555065
0.496009
-0.108464
0.461794
-0.121199
0.42575
-0.131303
0.388937
-0.138662
0.352238
-0.143401
0.316373
-0.145615
0.281937
-0.145372
0.249417
-0.142814
0.219178
-0.138187
0.191442
-0.131823
0.166305
-0.124091
0.143766
-0.115358
0.123755
-0.105977
0.106148
-0.0962712
0.0907832
-0.0865354
0.0774745
-0.0770246
0.0660243
-0.0679525
0.0562297
-0.0594919
0.047888
-0.0517765
0.0408017
-0.0448983
0.0347817
-0.0389004
0.0296523
-0.0337625
0.0252567
-0.0293894
0.021464
-0.0256128
0.0181744
-0.0222177
0.015323
-0.0189888
0.0128768
-0.0157653
0.0108289
-0.0124774
0.00918609
-0.00916114
0.00795899
-0.00593056
0.00714965
-0.00294083
0.00674683
-0.000319432
0.00672649
0.00188074
0.00704583
0.00368231
0.00768181
0.00530291
0.00858147
0.00677981
0.00978058
0.00879335
0.0112427
0.0107928
0.0143494
0.502793
-0.0709676
-0.526521
0.475854
-0.0815246
0.446134
-0.0914786
0.414481
-0.0996498
0.381738
-0.105919
0.348641
-0.110304
0.315823
-0.112797
0.283846
-0.113395
0.253192
-0.11216
0.22425
-0.109245
0.1973
-0.104873
0.172517
-0.0993081
0.149986
-0.0928275
0.129718
-0.085709
0.111666
-0.0782185
0.0957329
-0.0706025
0.081789
-0.0630808
0.0696783
-0.0558418
0.059228
-0.0490416
0.0502555
-0.0428039
0.0425742
-0.037217
0.0359999
-0.0323261
0.0303583
-0.0281208
0.0254936
-0.0245247
0.0212782
-0.0213975
0.0176199
-0.0185594
0.0144642
-0.0158331
0.0117892
-0.0130904
0.00959578
-0.0102839
0.00789177
-0.00745713
0.00668019
-0.00471897
0.00594736
-0.00220801
0.0056612
-3.32742e-05
0.00577644
0.0017655
0.00623566
0.00322309
0.00700976
0.00452881
0.00805161
0.00573796
0.0094168
0.00742816
0.0110938
0.00911587
0.0122364
0.482654
-0.0506416
-0.50298
0.459426
-0.0582964
0.433565
-0.0656177
0.405711
-0.0717957
0.376514
-0.0767227
0.346574
-0.080363
0.316443
-0.0826662
0.286641
-0.0835929
0.257642
-0.0831601
0.22985
-0.0814535
0.203591
-0.0786143
0.179103
-0.0748199
0.156543
-0.0702675
0.135996
-0.065162
0.117483
-0.0597054
0.10097
-0.0540895
0.0863774
-0.0484883
0.0735902
-0.0430545
0.0624654
-0.0379169
0.0528407
-0.0331792
0.0445415
-0.0289178
0.0373892
-0.0251739
0.0312119
-0.0219435
0.025856
-0.0191688
0.0211988
-0.0167403
0.017157
-0.0145176
0.0136876
-0.0123637
0.0107804
-0.0101831
0.00844315
-0.00794666
0.00668356
-0.00569754
0.00549478
-0.0035302
0.00484543
-0.00155865
0.00468136
0.000130791
0.00493604
0.00151083
0.0055393
0.00261982
0.00645727
0.00361084
0.00765276
0.00454247
0.00920247
0.00587845
0.0111243
0.00719405
0.0097791
0.470701
-0.0327827
-0.48856
0.450185
-0.03778
0.427177
-0.0426095
0.402149
-0.0467675
0.375598
-0.0501724
0.348014
-0.0527786
0.319879
-0.0545315
0.291674
-0.0553877
0.263857
-0.0553431
0.236844
-0.0544401
0.21099
-0.0527601
0.186581
-0.0504112
0.163833
-0.0475191
0.142889
-0.0442184
0.123829
-0.040645
0.10667
-0.0369304
0.091377
-0.0331959
0.0778716
-0.0295491
0.0660373
-0.0260826
0.05573
-0.0228719
0.0467859
-0.0199737
0.0390318
-0.0174197
0.0322978
-0.0152095
0.0264328
-0.0133037
0.0213192
-0.0116267
0.0168827
-0.0100811
0.0130919
-0.0085729
0.00994744
-0.00703865
0.00746347
-0.00546269
0.00564608
-0.00388016
0.00447755
-0.00236166
0.00390818
-0.000989286
0.00386215
0.000176823
0.00425283
0.00112015
0.0049992
0.00187346
0.00606376
0.00254628
0.00742105
0.00318518
0.00917053
0.00412898
0.0113553
0.00500931
0.00694211
0.470416
-0.0163037
-0.486895
0.451428
-0.0187913
0.430033
-0.0212149
0.406591
-0.0233255
0.3815
-0.0250815
0.355175
-0.0264533
0.32805
-0.0274068
0.300577
-0.0279146
0.273203
-0.0279696
0.246352
-0.0275888
0.220401
-0.026809
0.195671
-0.0256816
0.17242
-0.0242678
0.150836
-0.0226345
0.131042
-0.0208507
0.113095
-0.0189835
0.0969949
-0.0170959
0.0826901
-0.0152442
0.0700849
-0.0134774
0.0590489
-0.0118359
0.0494255
-0.0103503
0.0410441
-0.00903834
0.033735
-0.00790041
0.0273479
-0.00691656
0.0217686
-0.00604751
0.0169302
-0.0052427
0.0128111
-0.00445381
0.00942131
-0.00364882
0.00677984
-0.00282122
0.00489078
-0.00199109
0.00372598
-0.00119686
0.00321885
-0.000482164
0.00327398
0.000121693
0.00378701
0.000607129
0.00466762
0.000992841
0.00587516
0.00133874
0.00739574
0.0016646
0.00934868
0.00217604
0.0117977
0.00256027
0.00371062
0.485611
-0.501915
0.46682
0.445605
0.422279
0.397198
0.370745
0.343338
0.315423
0.287454
0.259865
0.233056
0.207374
0.183107
0.160472
0.139621
0.120638
0.103542
0.0882977
0.0748203
0.0629844
0.052634
0.0435957
0.0356953
0.0287787
0.0227312
0.0174885
0.0130347
0.0093859
0.00656468
0.00457358
0.00337673
0.00289456
0.00301625
0.00362338
0.00461622
0.00595496
0.00761956
0.0097956
0.0123559
0.5903
-0.000883563
-0.588607
0.591454
0.000556036
0.592048
0.00197968
0.592063
0.00338701
0.591481
0.0047807
0.590283
0.00615581
0.588452
0.00751396
0.585967
0.00883997
0.582808
0.0101471
0.578956
0.0113948
0.57438
0.0126367
0.569064
0.0137493
0.562953
0.0149253
0.556043
0.0157681
0.548179
0.0169608
0.539412
0.017173
0.529096
0.0188704
0.517526
0.0172299
0.502014
0.0209758
0.0108368
0.596938
-0.00216653
-0.595655
0.597807
-0.000312972
0.598243
0.00154364
0.598229
0.00340122
0.597748
0.00526163
0.596783
0.00712059
0.595317
0.00897982
0.593331
0.0108264
0.590805
0.0126728
0.587715
0.0144853
0.584038
0.0163132
0.579732
0.0180549
0.574772
0.019886
0.569055
0.0214844
0.562574
0.0234424
0.555084
0.0246629
0.546895
0.0270591
0.537468
0.0266577
0.5287
0.0297429
0.0242896
0.601912
-0.00301863
-0.60106
0.60247
-0.000870357
0.602721
0.00129197
0.602656
0.00346635
0.602265
0.00565323
0.601536
0.00784903
0.600461
0.0100546
0.599027
0.0122609
0.597223
0.014477
0.595028
0.0166801
0.592435
0.0189059
0.589406
0.0210837
0.585957
0.0233351
0.582021
0.0254206
0.57772
0.0277432
0.572899
0.0294842
0.567909
0.032049
0.56196
0.0326064
0.555713
0.0359898
0.0333141
0.605627
-0.00353786
-0.605108
0.605959
-0.00120222
0.606099
0.00115191
0.606043
0.00352285
0.605786
0.00591017
0.605324
0.00831124
0.604652
0.0107261
0.603764
0.0131493
0.602655
0.0155857
0.601314
0.0180211
0.599745
0.0204752
0.597927
0.0229018
0.595888
0.0253741
0.593567
0.0277416
0.591029
0.0302806
0.588038
0.0324754
0.58477
0.0353167
0.580594
0.0367822
0.576336
0.0402478
0.0389481
0.608072
-0.00380576
-0.607804
0.608246
-0.00137633
0.608326
0.00107213
0.60831
0.00353836
0.608199
0.00602163
0.60799
0.00852017
0.607683
0.0110335
0.607273
0.0135586
0.606762
0.0160973
0.606141
0.0186422
0.605412
0.0212041
0.604553
0.0237603
0.603571
0.0263564
0.602402
0.0289103
0.601094
0.0315891
0.599514
0.0340557
0.597905
0.036925
0.595884
0.0388037
0.594035
0.0420966
0.0419936
0.609418
-0.00388125
-0.609343
0.60948
-0.00143812
0.60953
0.00102246
0.609569
0.00349959
0.609598
0.00599254
0.609618
0.00850014
0.609629
0.0110219
0.609632
0.0135562
0.609625
0.0161042
0.609604
0.0186627
0.609571
0.0212374
0.609514
0.023817
0.609447
0.0264232
0.60935
0.0290072
0.609281
0.0316585
0.609159
0.0341777
0.609124
0.0369594
0.60882
0.0391085
0.608639
0.042277
0.0429416
0.60993
-0.00380946
-0.610002
0.609912
-0.00141991
0.60995
0.000984472
0.610047
0.00340291
0.610205
0.00583476
0.610426
0.00827917
0.610712
0.0107355
0.611065
0.013203
0.611488
0.0156816
0.611981
0.0181695
0.61255
0.0206686
0.613194
0.023173
0.613924
0.025693
0.614725
0.0282061
0.615621
0.0307633
0.616541
0.0332577
0.617579
0.0359206
0.618507
0.0381809
0.619661
0.0411234
0.042221
0.609712
-0.00361991
-0.609901
0.609632
-0.00134002
0.609665
0.000951614
0.609813
0.00325425
0.610081
0.00556715
0.610471
0.00788951
0.610986
0.0102206
0.611629
0.0125597
0.612404
0.0149065
0.613313
0.0172601
0.614361
0.0196213
0.615545
0.0219882
0.616872
0.0243659
0.618334
0.0267444
0.61995
0.0291473
0.621691
0.0315172
0.623631
0.03398
0.625616
0.036196
0.627875
0.0388647
0.0402112
0.608322
-0.00333326
-0.608608
0.608192
-0.00121027
0.608222
0.000921399
0.608415
0.00306092
0.608775
0.00520747
0.609304
0.00736021
0.610007
0.00951838
0.610885
0.0116813
0.611943
0.0138485
0.613184
0.0160195
0.614611
0.0181942
0.616227
0.0203716
0.61804
0.0225533
0.620049
0.0247349
0.62227
0.0269268
0.624684
0.0291026
0.627336
0.0313281
0.630119
0.0334131
0.633199
0.0357845
0.0372119
0.604613
-0.00297152
-0.604975
0.604448
-0.00104549
0.604483
0.000886491
0.60472
0.00282348
0.605163
0.0047645
0.605815
0.00670864
0.606678
0.008655
0.607757
0.0106028
0.609054
0.0125513
0.610574
0.0144999
0.61232
0.0164482
0.614296
0.0183955
0.616507
0.0203423
0.618955
0.0222872
0.621647
0.0242341
0.624578
0.0261721
0.627775
0.028131
0.631176
0.0300121
0.6349
0.0320602
0.0334496
0.596921
-0.00256771
-0.597325
0.596747
-0.000870664
0.596803
0.000830118
0.597093
0.00253351
0.597619
0.00423839
0.598384
0.00594367
0.599391
0.00764832
0.600642
0.00935135
0.602142
0.0110519
0.603892
0.0127493
0.605898
0.0144427
0.608161
0.0161317
0.610688
0.0178159
0.61348
0.0194947
0.616545
0.0211691
0.619882
0.0228351
0.623509
0.0245043
0.627389
0.0261319
0.631604
0.0278452
0.0291146
0.583734
-0.00216699
-0.584135
0.583583
-0.000719345
0.583683
0.000730339
0.584036
0.00218075
0.584643
0.00363058
0.585509
0.00507854
0.586633
0.00652341
0.588021
0.00796404
0.589673
0.00939934
0.591594
0.0108283
0.593787
0.0122502
0.596254
0.013664
0.599001
0.0150694
0.60203
0.0164655
0.605347
0.0178524
0.608953
0.0192287
0.61286
0.0205977
0.617049
0.0219426
0.621575
0.0233195
0.0244106
0.564708
-0.00181129
-0.565064
0.564607
-0.00061815
0.564762
0.00057576
0.565174
0.00176891
0.565844
0.0029598
0.566776
0.00414693
0.56797
0.0053289
0.56943
0.00650435
0.571157
0.00767199
0.573155
0.00883065
0.575426
0.00997925
0.577973
0.0111168
0.5808
0.0122425
0.58391
0.0133554
0.587307
0.0144552
0.590995
0.015541
0.59498
0.0166132
0.599255
0.0176668
0.603854
0.0187209
0.0196014
0.541305
-0.00151987
-0.541596
0.541257
-0.000570207
0.541454
0.000379213
0.541896
0.00132668
0.542585
0.00227054
0.543523
0.00320913
0.544711
0.00414089
0.546151
0.00506429
0.547845
0.00597789
0.549795
0.00688036
0.552004
0.00777044
0.554474
0.00864698
0.557207
0.00950896
0.560207
0.0103555
0.563477
0.0111857
0.567019
0.0119989
0.570838
0.0127946
0.574933
0.0135715
0.57932
0.0143334
0.0149973
0.516518
-0.00128324
-0.516755
0.516501
-0.000553329
0.516705
0.000175505
0.51713
0.000901478
0.517778
0.00162285
0.518649
0.00233789
0.519745
0.00304494
0.521067
0.00374241
0.522616
0.00442879
0.524394
0.00510265
0.526402
0.00576265
0.528641
0.00640758
0.531114
0.00703632
0.533821
0.00764785
0.536766
0.00824129
0.539949
0.00881586
0.543373
0.00937088
0.547038
0.00990572
0.550952
0.0104202
0.0108837
0.493989
-0.00107253
-0.494199
0.493968
-0.000532329
0.494137
6.18996e-06
0.494497
0.00054129
0.495049
0.00107125
0.495792
0.0015944
0.496728
0.00210912
0.497857
0.00261385
0.499178
0.0031071
0.500694
0.00358749
0.502402
0.00405369
0.504306
0.00450453
0.506403
0.00493888
0.508695
0.00535575
0.511182
0.00575426
0.513864
0.00613365
0.516742
0.00649323
0.519815
0.00683249
0.523084
0.00715135
0.00744638
0.477158
-0.000855262
-0.477376
0.477101
-0.000475196
0.477204
-9.70934e-05
0.477468
0.000277484
0.477893
0.000646991
0.478477
0.00100994
0.479221
0.00136486
0.480125
0.00171037
0.481187
0.00204514
0.482406
0.00236791
0.483782
0.00267753
0.485314
0.00297289
0.487
0.00325302
0.488839
0.00351702
0.490829
0.00376411
0.492969
0.00399359
0.495257
0.00420488
0.497692
0.00439763
0.500271
0.00457247
0.00473729
0.468944
-0.000607921
-0.469191
0.468833
-0.000364282
0.468858
-0.000122476
0.469019
0.000116265
0.469316
0.00035074
0.469746
0.000579769
0.470308
0.000802202
0.471002
0.00101696
0.471824
0.00122298
0.472773
0.00141928
0.473845
0.00160494
0.475039
0.00177911
0.476351
0.001941
0.477778
0.00208991
0.479317
0.00222522
0.480964
0.00234637
0.482716
0.00245292
0.484569
0.00254467
0.486519
0.00262244
0.00269604
0.471985
-0.000321024
-0.472271
0.47182
-0.00019958
0.471777
-7.93662e-05
0.471854
3.88861e-05
0.47205
0.000154457
0.472364
0.000266647
0.472791
0.000374776
0.47333
0.000478198
0.473976
0.000576289
0.474727
0.000668468
0.475578
0.00075419
0.476524
0.000832953
0.477561
0.000904305
0.478683
0.000967829
0.479885
0.00102317
0.481161
0.00107003
0.482506
0.00110816
0.483913
0.00113749
0.485377
0.00115855
0.00117768
0.489502
-0.489823
0.489302
0.489223
0.489262
0.489416
0.489683
0.490058
0.490536
0.491112
0.49178
0.492535
0.493368
0.494272
0.49524
0.496263
0.497333
0.498441
0.499579
0.500737
0.477957
0.00687265
-0.509278
0.492144
-0.0374705
0.501578
-0.0304582
0.507009
-0.0239344
0.513315
-0.0230778
0.520453
-0.0224341
0.527417
-0.0208494
0.534092
-0.0192747
0.54059
-0.0179335
0.546866
-0.0166185
0.552835
-0.015255
0.558452
-0.0138693
0.563697
-0.0124746
0.568549
-0.0110664
0.572993
-0.00964273
0.577013
-0.00820659
0.580598
-0.00676192
0.583735
-0.00531217
0.586411
-0.0038603
-0.00240924
0.506605
0.00258989
-0.502323
0.514607
-0.0454717
0.523552
-0.0394036
0.529278
-0.0296605
0.534334
-0.0281338
0.540367
-0.028467
0.54659
-0.0270731
0.552353
-0.025037
0.557733
-0.023314
0.562859
-0.0217446
0.567698
-0.0200933
0.572196
-0.0183676
0.576346
-0.0166244
0.580154
-0.0148744
0.583621
-0.0131096
0.586743
-0.0113287
0.589515
-0.00953443
0.591932
-0.00772882
0.593983
-0.00591136
-0.00408113
0.531743
-0.00337641
-0.525776
0.538343
-0.0520716
0.545479
-0.0465403
0.551244
-0.0354251
0.55564
-0.0325297
0.560221
-0.033048
0.565142
-0.031994
0.56974
-0.0296356
0.573838
-0.0274115
0.577615
-0.0255213
0.58116
-0.0236391
0.584449
-0.021656
0.587457
-0.0196327
0.590193
-0.01761
0.592667
-0.0155836
0.594881
-0.0135432
0.596833
-0.0114862
0.598517
-0.00941304
0.599928
-0.00732252
-0.00521289
0.558085
-0.00867601
-0.552786
0.562406
-0.056392
0.567203
-0.0513373
0.57182
-0.0400428
0.575259
-0.0359687
0.578288
-0.0360771
0.581532
-0.0352377
0.584717
-0.0328209
0.587528
-0.030222
0.590016
-0.0280096
0.59232
-0.0259429
0.594468
-0.0238045
0.596436
-0.0216004
0.598214
-0.0193874
0.599808
-0.0171784
0.601227
-0.0149614
0.602468
-0.0127276
0.60353
-0.010475
0.604411
-0.00820309
-0.00591053
0.583616
-0.0139635
-0.578329
0.584986
-0.0577617
0.587079
-0.053431
0.589985
-0.0429488
0.592204
-0.0381875
0.593771
-0.0376443
0.595351
-0.036817
0.597049
-0.0345194
0.598611
-0.031784
0.599947
-0.0293454
0.601142
-0.0271377
0.60226
-0.0249227
0.603297
-0.0226378
0.604235
-0.0203254
0.605071
-0.0180137
0.605808
-0.0156986
0.60645
-0.0133696
0.606997
-0.0110218
0.607448
-0.00865438
-0.00626678
0.60542
-0.0193863
-0.599997
0.604304
-0.0566451
0.603908
-0.0530355
0.604975
-0.0440157
0.605944
-0.0391564
0.606283
-0.0379837
0.606465
-0.0369985
0.606815
-0.0348693
0.607234
-0.032203
0.607575
-0.0296865
0.607837
-0.0274
0.608076
-0.0251612
0.60831
-0.0228718
0.608528
-0.0205435
0.60872
-0.018206
0.608886
-0.0158651
0.60903
-0.0135134
0.609153
-0.0111449
0.609257
-0.00875809
-0.00635256
0.622496
-0.0245425
-0.61734
0.619691
-0.0538403
0.617441
-0.0507852
0.616844
-0.0434182
0.616621
-0.0389342
0.615964
-0.0373268
0.615077
-0.036111
0.614326
-0.0341186
0.613757
-0.0316339
0.613249
-0.0291779
0.612742
-0.0268937
0.612259
-0.0246775
0.611823
-0.0224364
0.611438
-0.0201582
0.611095
-0.0178629
0.61079
-0.0155606
0.610526
-0.0132492
0.610305
-0.0109239
0.61013
-0.00858259
-0.00622496
0.63534
-0.0286843
-0.631198
0.631474
-0.0499748
0.628017
-0.047328
0.626094
-0.041495
0.624784
-0.0376244
0.623276
-0.0358188
0.621571
-0.0344061
0.619964
-0.0325114
0.618572
-0.0302412
0.617331
-0.0279378
0.616174
-0.0257368
0.615091
-0.0235942
0.614099
-0.0214441
0.613207
-0.0192662
0.612413
-0.0170692
0.611715
-0.0148622
0.611112
-0.0126462
0.610607
-0.0104188
0.610202
-0.00817813
-0.00592403
0.644537
-0.0311199
-0.642102
0.63996
-0.0453974
0.635724
-0.043092
0.632795
-0.0385661
0.630524
-0.0353534
0.62824
-0.0335345
0.625854
-0.0320203
0.623562
-0.0302193
0.621485
-0.0281649
0.61961
-0.0260624
0.617883
-0.0240102
0.616284
-0.0219951
0.614819
-0.0199784
0.613496
-0.0179432
0.612318
-0.0158913
0.611284
-0.0138283
0.610394
-0.0117563
0.609649
-0.00967445
0.609053
-0.00758202
-0.0054789
0.649725
-0.0314673
-0.649378
0.644593
-0.0402658
0.639791
-0.0382899
0.636068
-0.0348426
0.632956
-0.0322414
0.629951
-0.0305295
0.626952
-0.0290218
0.62408
-0.027347
0.621429
-0.0255141
0.619007
-0.0236398
0.616782
-0.021785
0.614734
-0.0199477
0.612864
-0.0181081
0.611176
-0.0162554
0.609674
-0.0143893
0.608358
-0.0125126
0.607229
-0.010627
0.606287
-0.0087327
0.605535
-0.00682978
-0.00491846
0.649096
-0.0297393
-0.650824
0.643522
-0.034692
0.638286
-0.0330535
0.633931
-0.0304873
0.63012
-0.0284309
0.626496
-0.0269048
0.622975
-0.025501
0.619629
-0.0240014
0.616523
-0.0224077
0.613666
-0.0207833
0.611043
-0.0191619
0.608639
-0.0175442
0.606452
-0.015921
0.604484
-0.0142868
0.602736
-0.0126412
0.601209
-0.0109857
0.599903
-0.00932157
0.59882
-0.00764941
0.59796
-0.00596984
-0.00428354
0.640047
-0.0263448
-0.643441
0.634238
-0.0288832
0.62877
-0.0275854
0.624014
-0.0257314
0.619738
-0.0241547
0.615699
-0.0228663
0.611839
-0.0216412
0.608199
-0.0203611
0.604817
-0.0190256
0.601701
-0.0176668
0.598841
-0.0163018
0.596228
-0.0149318
0.59386
-0.0135528
0.591736
-0.0121627
0.589856
-0.0107619
0.588222
-0.00935113
0.586832
-0.0079317
0.585687
-0.00650454
0.584788
-0.00507059
-0.00363091
0.621227
-0.021987
-0.625585
0.615515
-0.0231708
0.610127
-0.0221977
0.6053
-0.0209047
0.600887
-0.0197411
0.596735
-0.0187148
0.592807
-0.0177128
0.589122
-0.0166766
0.585702
-0.0156056
0.58255
-0.0145148
0.579661
-0.0134122
0.577028
-0.012299
0.574649
-0.011174
0.572523
-0.010037
0.57065
-0.00888864
0.569029
-0.00773006
0.56766
-0.00656246
0.566542
-0.00538706
0.565677
-0.00420515
-0.00301806
0.594187
-0.0174111
-0.598763
0.588926
-0.0179099
0.583951
-0.0172228
0.579402
-0.0163553
0.575194
-0.0155337
0.571244
-0.0147645
0.567527
-0.013996
0.564053
-0.0132022
0.56083
-0.012383
0.55786
-0.0115448
0.55514
-0.0106916
0.552665
-0.00982427
0.550434
-0.00894322
0.548446
-0.0080491
0.546701
-0.00714298
0.545197
-0.00622616
0.543934
-0.00530003
0.542913
-0.00436604
0.542134
-0.00342571
-0.00248062
0.56317
-0.013166
-0.567415
0.558615
-0.0133544
0.554292
-0.0128999
0.55028
-0.012343
0.546537
-0.0117912
0.543022
-0.0112492
0.539721
-0.0106955
0.536639
-0.0101197
0.533778
-0.00952218
0.531139
-0.00890595
0.52872
-0.00827305
0.526521
-0.00762458
0.524539
-0.00696147
0.522775
-0.00628485
0.521228
-0.00559601
0.519898
-0.00489641
0.518786
-0.00418758
0.517891
-0.00347113
0.517214
-0.0027487
-0.00202202
0.533608
-0.00952511
-0.537249
0.529847
-0.0095928
0.526261
-0.0093142
0.522894
-0.00897598
0.519729
-0.00862588
0.516747
-0.00826719
0.513943
-0.00789187
0.51132
-0.00749631
0.508879
-0.00708117
0.506621
-0.00664811
0.504546
-0.00619855
0.502655
-0.0057336
0.500948
-0.0052544
0.499426
-0.00476222
0.498088
-0.00425845
0.496936
-0.00374456
0.495971
-0.00322211
0.495192
-0.0026927
0.494602
-0.00215801
-0.00161974
0.510529
-0.00652529
-0.513529
0.507494
-0.00655728
0.504583
-0.00640296
0.501819
-0.00621272
0.4992
-0.00600612
0.496718
-0.00578527
0.494374
-0.00554769
0.49217
-0.00529248
0.490109
-0.00502035
0.488193
-0.00473243
0.486424
-0.00442977
0.484804
-0.00411345
0.483334
-0.00378456
0.482017
-0.00344431
0.480852
-0.00309399
0.479842
-0.00273494
0.478989
-0.00236861
0.478293
-0.00199643
0.477755
-0.00161995
-0.0012407
0.497781
-0.00405565
-0.500251
0.495305
-0.00408137
0.492911
-0.00400918
0.490614
-0.00391536
0.488415
-0.00380705
0.486315
-0.00368556
0.484318
-0.00355044
0.482427
-0.00340171
0.480647
-0.00323996
0.47898
-0.00306596
0.477431
-0.00288051
0.476002
-0.00268448
0.474696
-0.00247875
0.473516
-0.00226429
0.472464
-0.00204214
0.471543
-0.00181338
0.470753
-0.00157913
0.470097
-0.00134058
0.469576
-0.0010989
-0.000855329
0.498338
-0.00194035
-0.500454
0.496219
-0.0019621
0.494149
-0.00193958
0.49214
-0.00190614
0.490197
-0.00186387
0.488325
-0.0018134
0.486529
-0.00175481
0.484816
-0.00168827
0.48319
-0.00161409
0.481657
-0.00153273
0.480221
-0.00144465
0.478887
-0.00135034
0.477658
-0.00125036
0.476539
-0.00114528
0.475533
-0.00103573
0.474642
-0.000922363
0.473869
-0.000805848
0.473215
-0.000686888
0.472682
-0.000566203
-0.000444524
0.51555
-0.51749
0.513588
0.511648
0.509742
0.507878
0.506065
0.50431
0.502622
0.501008
0.499475
0.49803
0.49668
0.49543
0.494284
0.493249
0.492326
0.49152
0.490833
0.490267
0.0646658
0.0161453
-0.0166862
0.06635
0.048881
-0.0505653
0.0692265
0.0825012
-0.0853777
0.0734154
0.117666
-0.121855
0.0790482
0.155005
-0.160638
0.0862148
0.195007
-0.202174
0.0948975
0.237832
-0.246514
0.104938
0.283105
-0.293146
0.116074
0.329889
-0.341025
0.128035
0.376901
-0.388863
0.140685
0.42291
-0.43556
0.154219
0.467258
-0.480791
0.16937
0.510469
-0.52562
0.18759
0.554509
-0.572729
0.210596
0.60238
-0.625387
0.240786
0.654873
-0.685063
0.279745
0.713798
-0.752757
0.330043
0.771367
-0.821665
0.405455
0.82243
-0.897842
0.858496
-0.962319
0.0696107
0.0155321
0.0714764
0.0470153
0.0746299
0.0793477
0.0791898
0.113106
0.0853129
0.148882
0.0931383
0.187182
0.102712
0.228258
0.113932
0.271886
0.126557
0.317264
0.140302
0.363156
0.154975
0.408237
0.170683
0.45155
0.188045
0.493107
0.208483
0.534071
0.233746
0.577117
0.26612
0.622499
0.308808
0.67111
0.358503
0.721672
0.440377
0.740555
0.796551
0.0748962
0.0148591
0.0769348
0.0449766
0.0803721
0.0759104
0.0853213
0.108157
0.0919536
0.14225
0.100452
0.178683
0.110935
0.217775
0.123373
0.259448
0.137574
0.303063
0.153252
0.347478
0.170163
0.391326
0.188322
0.433391
0.208198
0.473231
0.231082
0.511187
0.258913
0.549286
0.292955
0.588457
0.339984
0.624081
0.38769
0.673966
0.466612
0.661634
0.737386
0.0805648
0.0141342
0.0827625
0.0427789
0.0864748
0.0721981
0.0918117
0.10282
0.09895
0.135112
0.108106
0.169527
0.119466
0.206415
0.133092
0.245822
0.148866
0.287289
0.166529
0.329815
0.185795
0.372061
0.206568
0.412618
0.229161
0.450638
0.254466
0.485883
0.285031
0.518721
0.319637
0.553851
0.370105
0.573614
0.41561
0.628461
0.489458
0.587785
0.674059
0.0866536
0.0133617
0.0889987
0.0404338
0.0929715
0.0682253
0.0986842
0.0971074
0.106315
0.127481
0.116098
0.159744
0.128277
0.194236
0.14301
0.231089
0.160279
0.27002
0.179882
0.310212
0.201527
0.350415
0.224972
0.389172
0.250485
0.425125
0.278046
0.458321
0.311575
0.485192
0.345845
0.519581
0.398133
0.521326
0.443546
0.583048
0.509469
0.521862
0.605199
0.0931947
0.0125454
0.0956746
0.037954
0.0998865
0.0640134
0.10595
0.0910442
0.114044
0.119387
0.124411
0.149377
0.137333
0.181314
0.15305
0.215372
0.171664
0.251407
0.193056
0.28882
0.217005
0.326466
0.243037
0.36314
0.271668
0.396494
0.301292
0.428698
0.338001
0.448482
0.371969
0.485613
0.423911
0.469384
0.471682
0.535277
0.528028
0.465516
0.53323
0.100221
0.0116901
0.10282
0.0353549
0.107242
0.0595917
0.113614
0.0846718
0.122121
0.11088
0.133006
0.138492
0.146569
0.167751
0.163107
0.198833
0.182845
0.231669
0.205749
0.265916
0.231797
0.300417
0.260139
0.334799
0.29198
0.364652
0.323521
0.397157
0.363405
0.408598
0.398293
0.450725
0.447385
0.420292
0.498746
0.483915
0.547289
0.416973
0.463179
0.107769
0.0108015
0.110469
0.0326548
0.115065
0.0549962
0.12169
0.0780459
0.130534
0.102036
0.141839
0.127187
0.155908
0.153682
0.173063
0.181678
0.193639
0.211094
0.217648
0.241907
0.245415
0.27265
0.275569
0.304645
0.310432
0.32979
0.34386
0.363729
0.386192
0.366266
0.42418
0.412737
0.468731
0.375741
0.522844
0.429802
0.567328
0.37249
0.399308
0.115876
0.00988621
0.118656
0.0298751
0.123385
0.0502674
0.130199
0.0712324
0.139285
0.0929492
0.150883
0.115589
0.165291
0.139274
0.182823
0.164146
0.203896
0.190021
0.228512
0.217292
0.257428
0.243733
0.288706
0.273368
0.32585
0.292646
0.361425
0.328154
0.40439
0.323301
0.447304
0.369823
0.488004
0.335041
0.542486
0.375321
0.585961
0.329015
0.343168
0.124586
0.00895186
0.127421
0.0270397
0.132238
0.0454501
0.139168
0.0643027
0.148392
0.0837256
0.160137
0.103844
0.174689
0.124721
0.192335
0.1465
0.213535
0.168821
0.238228
0.192599
0.267558
0.214404
0.299275
0.24165
0.337132
0.254789
0.375274
0.290012
0.416808
0.281767
0.464171
0.32246
0.503643
0.295568
0.556455
0.322509
0.59984
0.28563
0.29363
0.133941
0.00800705
0.136806
0.0241752
0.141664
0.0405919
0.148636
0.0573314
0.157886
0.0744747
0.169626
0.092105
0.184116
0.110231
0.201607
0.129009
0.222555
0.147873
0.246853
0.168301
0.275703
0.185554
0.307399
0.209955
0.343927
0.21826
0.38423
0.249709
0.423464
0.242533
0.47242
0.273503
0.512596
0.255393
0.562851
0.272254
0.605628
0.242853
0.248434
0.143993
0.00706074
0.146859
0.021309
0.15171
0.035741
0.15865
0.0503919
0.167822
0.0653023
0.179409
0.0805185
0.193638
0.0960013
0.21072
0.111927
0.231045
0.127548
0.254595
0.144751
0.282058
0.158091
0.31329
0.178722
0.347056
0.184495
0.387604
0.209162
0.42478
0.205357
0.472006
0.226276
0.512543
0.214857
0.559831
0.224965
0.601
0.201683
0.205993
0.154795
0.00612168
0.157636
0.0184679
0.162434
0.0309435
0.169273
0.0435522
0.178272
0.0563031
0.189578
0.0692127
0.203373
0.082206
0.219838
0.095463
0.239215
0.108171
0.261739
0.122227
0.287209
0.132621
0.317199
0.148733
0.347929
0.153764
0.386207
0.170884
0.42141
0.170154
0.464665
0.183022
0.503719
0.175802
0.547346
0.181339
0.585715
0.163314
0.166123
0.166405
0.00519758
0.169198
0.0156749
0.173903
0.0262387
0.180586
0.0368693
0.189335
0.0475533
0.200262
0.0582859
0.213494
0.0689739
0.22919
0.0797671
0.247411
0.0899501
0.268633
0.101005
0.291977
0.109276
0.319786
0.120925
0.347809
0.125741
0.382116
0.136577
0.414783
0.137488
0.45304
0.144764
0.488808
0.140034
0.527818
0.142329
0.56231
0.128823
0.12967
0.178888
0.00429417
0.181616
0.0129473
0.1862
0.0216547
0.192687
0.0303821
0.201138
0.0391026
0.211626
0.047797
0.224226
0.0563746
0.239067
0.0649254
0.256078
0.0729399
0.275778
0.0813053
0.297164
0.0878899
0.32222
0.0958683
0.347778
0.100182
0.377672
0.106683
0.407144
0.108016
0.440187
0.11172
0.471723
0.108499
0.505445
0.108606
0.535486
0.0987821
0.0977405
0.192315
0.00341414
0.194969
0.0102926
0.199421
0.0172031
0.205698
0.0241046
0.213836
0.0309652
0.223875
0.0377579
0.235842
0.0444079
0.249823
0.0509442
0.265697
0.0570656
0.283835
0.0631674
0.303491
0.0682339
0.325817
0.0735425
0.349004
0.0769955
0.374886
0.0808009
0.400965
0.0819369
0.429149
0.0835366
0.456387
0.0812607
0.484837
0.0801557
0.510451
0.0731685
0.0709421
0.206761
0.00255591
0.209349
0.00770525
0.213679
0.0128728
0.219766
0.0180178
0.227621
0.0231102
0.237257
0.028122
0.248666
0.0329986
0.26188
0.0377304
0.276783
0.0421619
0.293541
0.04641
0.311713
0.0500617
0.331752
0.0535031
0.352774
0.0559744
0.375414
0.0581604
0.398429
0.0589217
0.422546
0.0594197
0.446016
0.0577903
0.469878
0.0562937
0.491567
0.0514795
0.0489803
0.222313
0.00171225
0.224855
0.00516269
0.229105
0.00862334
0.235062
0.0120605
0.242721
0.0154513
0.25207
0.0187726
0.26308
0.0219894
0.27573
0.02508
0.289921
0.0279704
0.305662
0.0306694
0.3227
0.0330235
0.341098
0.0351055
0.360412
0.0366598
0.380723
0.0378503
0.401372
0.0382725
0.422487
0.0383046
0.443068
0.0372089
0.463454
0.0359081
0.482082
0.0328517
0.0308115
0.239061
0.000868365
0.241604
0.00261942
0.245851
0.00437601
0.251795
0.00611736
0.259414
0.00783135
0.268682
0.00950524
0.27955
0.0111215
0.291965
0.0126649
0.30583
0.0141053
0.321068
0.0154312
0.3375
0.0165913
0.355021
0.0175848
0.373348
0.0183329
0.392338
0.01886
0.411573
0.0190377
0.430909
0.0189682
0.449718
0.0184008
0.467971
0.0176548
0.484676
0.0161469
0.0150335
0.257107
0.259726
0.264103
0.27022
0.278051
0.287556
0.298678
0.311343
0.325448
0.340879
0.357471
0.375055
0.393388
0.412248
0.431286
0.450254
0.468655
0.48631
0.502457
0.0357374
0.0174765
-0.0178225
0.0363715
0.0529659
-0.0536
0.0372694
0.0892529
-0.0901508
0.0383822
0.126635
-0.127748
0.0396276
0.165234
-0.166479
0.0408923
0.204871
-0.206136
0.0420455
0.245095
-0.246248
0.0429557
0.28528
-0.28619
0.0435084
0.324792
-0.325344
0.0436232
0.363186
-0.363301
0.0432793
0.400518
-0.400174
0.0425514
0.437874
-0.437147
0.0416233
0.477882
-0.476954
0.0407069
0.5244
-0.523483
0.0399242
0.580914
-0.580132
0.0391733
0.649557
-0.648806
0.0382238
0.730868
-0.729919
0.0368038
0.82744
-0.82602
0.0341141
0.943901
-0.941211
1.07652
-1.07118
0.0357191
0.0171445
0.0363168
0.0523682
0.037159
0.0884107
0.0382004
0.125594
0.0393632
0.164071
0.0405378
0.203696
0.0415954
0.244037
0.0424065
0.284469
0.0428584
0.32434
0.0428725
0.363172
0.0424275
0.400963
0.041593
0.438709
0.040546
0.478929
0.0394979
0.525448
0.0385878
0.581824
0.0377523
0.650392
0.0367995
0.731821
0.0355149
0.828725
0.0332423
0.946173
1.08098
0.0356981
0.0168294
0.0362565
0.0518098
0.0370399
0.0876273
0.0380065
0.124627
0.0390824
0.162995
0.0401618
0.202617
0.0411181
0.243081
0.0418234
0.283764
0.0421673
0.323996
0.0420726
0.363266
0.0415186
0.401517
0.0405706
0.439657
0.0393995
0.480101
0.0382162
0.526631
0.0371743
0.582866
0.0362484
0.651318
0.0352882
0.732781
0.0341391
0.829874
0.0322899
0.948022
1.08452
0.0356744
0.016534
0.0361908
0.0512934
0.0369126
0.0869055
0.0378011
0.123739
0.0387863
0.16201
0.0397656
0.201638
0.0406151
0.242231
0.0412084
0.283171
0.0414368
0.323767
0.0412254
0.363478
0.0405542
0.402189
0.0394856
0.440726
0.0381849
0.481401
0.0368621
0.527954
0.0356843
0.584044
0.0346622
0.65234
0.0336905
0.733753
0.0326777
0.830887
0.0312612
0.949439
1.08709
0.0356483
0.0162614
0.03612
0.0508216
0.0367776
0.0862479
0.0375849
0.122931
0.0384757
0.161119
0.0393507
0.200763
0.040088
0.241494
0.0405631
0.282695
0.0406688
0.323662
0.0403328
0.363814
0.0395363
0.402985
0.0383395
0.441922
0.0369032
0.482837
0.0354364
0.529421
0.0341181
0.585363
0.0329942
0.653464
0.032007
0.73474
0.031131
0.831763
0.0301549
0.950415
1.08866
0.0356198
0.0160142
0.0360444
0.050397
0.0366353
0.0856569
0.0373587
0.122208
0.0381518
0.160326
0.0389182
0.199996
0.0395385
0.240874
0.0398893
0.282345
0.0398654
0.323685
0.0393968
0.364282
0.0384667
0.403915
0.0371341
0.443255
0.0355557
0.484416
0.03394
0.531036
0.0324766
0.586826
0.0312454
0.654695
0.0302393
0.735746
0.0295007
0.832501
0.0289719
0.950944
1.08918
0.035589
0.0157953
0.035964
0.050022
0.036486
0.0851349
0.0371232
0.121571
0.0378154
0.159634
0.0384697
0.199342
0.0389681
0.240375
0.039189
0.282124
0.0390287
0.323846
0.0384196
0.364892
0.0373475
0.404987
0.0358711
0.444731
0.0341439
0.486143
0.0323738
0.532807
0.0307606
0.588439
0.0294169
0.656039
0.0283887
0.736775
0.0277892
0.833101
0.0277128
0.95102
1.0886
0.0355561
0.0156074
0.0358792
0.0496989
0.0363302
0.0846839
0.0368788
0.121022
0.0374677
0.159045
0.0380062
0.198803
0.0383785
0.240003
0.0384639
0.282038
0.0381605
0.324149
0.0374033
0.365649
0.0361809
0.40621
0.0345526
0.44636
0.0326695
0.488026
0.0307392
0.534737
0.0289715
0.590207
0.0275099
0.657501
0.0264569
0.737827
0.0260008
0.833557
0.026384
0.950637
1.08689
0.0355211
0.0154532
0.0357901
0.0494299
0.0361682
0.0843058
0.0366264
0.120564
0.0371095
0.158562
0.0375292
0.198384
0.0377712
0.239761
0.037716
0.282094
0.0372631
0.324602
0.0363502
0.366562
0.0349691
0.407591
0.0331807
0.448148
0.0311342
0.490073
0.0290376
0.536833
0.0271103
0.592134
0.0255257
0.659085
0.0244451
0.738908
0.0241378
0.833864
0.0249839
0.949791
1.08399
0.0354841
0.0153353
0.0356969
0.049217
0.0360003
0.0840025
0.0363664
0.120198
0.0367418
0.158186
0.0370398
0.198086
0.0371479
0.239653
0.0369471
0.282294
0.0363386
0.325211
0.0352625
0.367638
0.0337143
0.409139
0.0317573
0.450105
0.0295399
0.49229
0.0272706
0.539103
0.0251786
0.594226
0.0234662
0.660798
0.0223554
0.740019
0.0222083
0.834011
0.0235281
0.948471
1.07985
0.0354452
0.0152564
0.0355998
0.0490625
0.0358269
0.0837754
0.0360995
0.119925
0.0363653
0.157921
0.0365394
0.197912
0.03651
0.239682
0.0361592
0.282645
0.0353889
0.325981
0.0341423
0.368884
0.0324189
0.410862
0.0302848
0.452239
0.0278886
0.494686
0.0254398
0.541552
0.0231776
0.596488
0.0213332
0.662642
0.0201874
0.741165
0.0202107
0.833988
0.0220001
0.946682
1.07442
0.0354045
0.015219
0.0354989
0.0489681
0.0356483
0.0836261
0.0358262
0.119747
0.0359811
0.157766
0.0360291
0.197864
0.0358592
0.239852
0.0353539
0.283151
0.0344162
0.326919
0.032992
0.370308
0.0310851
0.412769
0.0287654
0.454559
0.0261823
0.497269
0.0235471
0.544187
0.021109
0.598926
0.0191299
0.664621
0.0179459
0.742349
0.0181661
0.833768
0.0204489
0.944399
1.06761
0.035362
0.0152257
0.0353944
0.0489357
0.0354648
0.0835557
0.035547
0.119665
0.0355899
0.157723
0.03551
0.197944
0.0351969
0.240165
0.0345331
0.283814
0.0334224
0.328029
0.0318137
0.371917
0.0297151
0.414868
0.0272012
0.457073
0.024423
0.500048
0.0215943
0.547016
0.0189735
0.601547
0.0168569
0.666738
0.0156227
0.743583
0.0160516
0.833339
0.0187965
0.941654
1.05939
0.0353179
0.0152788
0.0352865
0.0489671
0.0352768
0.0835654
0.0352625
0.119679
0.0351924
0.157793
0.0349833
0.198153
0.0345246
0.240624
0.0336986
0.284641
0.0324097
0.329318
0.0306096
0.373717
0.0283112
0.417167
0.0255944
0.459789
0.0226127
0.503029
0.0195837
0.550045
0.0167738
0.604357
0.014523
0.668989
0.0132385
0.744867
0.0139379
0.832639
0.0172212
0.938371
1.04963
0.0352721
0.0153808
0.0351754
0.0490638
0.0350845
0.0836563
0.0349731
0.119791
0.0347895
0.157977
0.0344501
0.198492
0.0338437
0.24123
0.032852
0.285632
0.0313799
0.33079
0.0293818
0.375715
0.0268755
0.419673
0.0239473
0.462718
0.0207531
0.506223
0.0175162
0.553282
0.0145071
0.607366
0.0121169
0.671379
0.0107496
0.746235
0.0116988
0.83169
0.0154008
0.934669
1.03827
0.0352249
0.0155338
0.0350614
0.0492272
0.0348883
0.0838294
0.0346792
0.12
0.0343816
0.158274
0.0339113
0.198962
0.0331556
0.241986
0.0319951
0.286793
0.0303349
0.33245
0.0281323
0.377918
0.0254103
0.422395
0.0222619
0.465866
0.0188472
0.509638
0.0153972
0.556731
0.0121871
0.610576
0.00967892
0.673887
0.00827056
0.747643
0.00961919
0.830342
0.0140601
0.930228
1.02524
0.0351765
0.0157399
0.034945
0.0494587
0.0346885
0.0840859
0.0343806
0.120308
0.0339688
0.158686
0.0333671
0.199564
0.0324612
0.242892
0.0311294
0.288124
0.0292767
0.334303
0.0268631
0.380332
0.0239174
0.425341
0.0205398
0.469243
0.0168935
0.513284
0.0132173
0.560408
0.0097817
0.614012
0.00711215
0.676557
0.00557174
0.749184
0.00709313
0.82882
0.011918
0.925403
1.01033
0.0351272
0.0160009
0.0348266
0.0497593
0.0344848
0.0844277
0.0340763
0.120716
0.0335488
0.159213
0.0328159
0.200297
0.0317598
0.243948
0.0302556
0.289629
0.0282067
0.336352
0.0255763
0.382962
0.0224001
0.428517
0.0187882
0.472855
0.0149116
0.517161
0.0110257
0.564294
0.00741613
0.617621
0.00470192
0.679271
0.00332153
0.750564
0.00546879
0.826673
0.0121614
0.91871
0.994369
0.0350784
0.0163177
0.034708
0.0501298
0.0342777
0.084858
0.0337638
0.12123
0.0331165
0.159861
0.0322501
0.201163
0.0310446
0.245153
0.0293701
0.291303
0.0271253
0.338597
0.024273
0.385814
0.0208528
0.431937
0.0169824
0.476726
0.0128354
0.521308
0.00866961
0.568459
0.00476847
0.621522
0.00176513
0.682274
0.00021806
0.752111
0.00208359
0.824807
0.00959567
0.911198
0.976591
0.0350363
0.0346009
0.0340812
0.0334561
0.032679
0.0316687
0.0303076
0.0284647
0.0260369
0.0229881
0.0193648
0.0152993
0.0109871
0.00671771
0.00285328
6.49454e-05
-0.000580643
0.00256162
0.0159177
0.0353081
0.0229269
-0.0228732
0.0358387
0.0678174
-0.068348
0.0368814
0.11218
-0.113223
0.0383234
0.155934
-0.157376
0.0400135
0.198579
-0.200269
0.0417721
0.239428
-0.241187
0.043417
0.277775
-0.279419
0.0447881
0.31311
-0.314481
0.0457796
0.345372
-0.346364
0.0464
0.375353
-0.375974
0.0468358
0.405326
-0.405762
0.0473925
0.439152
-0.439709
0.0482171
0.480621
-0.481445
0.0490488
0.530878
-0.53171
0.0492224
0.588315
-0.588489
0.047583
0.650235
-0.648595
0.0425005
0.711475
-0.706392
0.0326512
0.764534
-0.754684
0.0186447
0.810644
-0.796638
0.857546
-0.865773
0.0353866
0.0229172
0.0359836
0.0672205
0.0370831
0.11108
0.0385809
0.154437
0.0403324
0.196827
0.0421635
0.237597
0.0438965
0.276042
0.0453767
0.31163
0.0465053
0.344244
0.0472988
0.37456
0.0479597
0.404665
0.048845
0.438267
0.0502167
0.479249
0.0519925
0.529102
0.0538334
0.586474
0.0551281
0.64894
0.0544263
0.712176
0.0497864
0.769173
0.0412206
0.81921
0.872935
0.0354486
0.022857
0.0360933
0.0665757
0.0372307
0.109943
0.0387594
0.152908
0.0405399
0.195047
0.0424026
0.235735
0.0441715
0.274273
0.0456913
0.31011
0.0468597
0.343075
0.0476826
0.373737
0.0483461
0.404001
0.0492012
0.437411
0.0505409
0.477909
0.0523426
0.5273
0.0543314
0.584485
0.0559584
0.647313
0.0557575
0.712377
0.0515103
0.773421
0.0417351
0.828985
0.88981
0.0355028
0.0227513
0.0361885
0.0658901
0.037358
0.108773
0.0389103
0.151356
0.04071
0.193247
0.0425918
0.233853
0.0443805
0.272484
0.0459186
0.308572
0.0470963
0.341898
0.0479031
0.37293
0.048495
0.40341
0.049193
0.436713
0.0502795
0.476823
0.0517235
0.525856
0.0531936
0.583015
0.0540919
0.646415
0.052994
0.713475
0.0476828
0.778732
0.037352
0.839316
0.902888
0.0355512
0.0226045
0.0362718
0.0651695
0.0374685
0.107577
0.0390397
0.149784
0.0408531
0.191434
0.0427474
0.231958
0.0445495
0.270682
0.0461002
0.307021
0.0472835
0.340714
0.0480737
0.37214
0.0485998
0.402883
0.0491529
0.43616
0.0500054
0.47597
0.0511233
0.524738
0.0521392
0.581999
0.0524791
0.646075
0.0509736
0.714981
0.0457712
0.783934
0.036357
0.84873
0.915129
0.0355943
0.0224203
0.0363441
0.0644196
0.0375628
0.106358
0.0391482
0.148199
0.0409703
0.189611
0.0428722
0.230057
0.0446832
0.268871
0.0462438
0.305461
0.0474341
0.339524
0.0482167
0.371358
0.0487003
0.4024
0.0491546
0.435706
0.0498545
0.47527
0.0507954
0.523798
0.0516354
0.581159
0.051883
0.645827
0.0506253
0.716238
0.046165
0.788394
0.0372929
0.857602
0.928206
0.0356324
0.0222025
0.0364057
0.0636463
0.0376408
0.105123
0.039235
0.146605
0.0410605
0.187786
0.0429641
0.228153
0.0447781
0.267057
0.0463439
0.303895
0.0475385
0.33833
0.0483158
0.37058
0.0487674
0.401948
0.0491463
0.435327
0.0497349
0.474682
0.0505718
0.522961
0.0513602
0.580371
0.0516602
0.645527
0.0506761
0.717222
0.0466686
0.792402
0.0378884
0.866383
0.941619
0.0356657
0.0219547
0.0364572
0.0628548
0.0377026
0.103877
0.0393
0.145007
0.041123
0.185963
0.0430219
0.226254
0.0448325
0.265246
0.0463968
0.302331
0.0475901
0.337136
0.0483583
0.369812
0.0487777
0.401529
0.0490843
0.43502
0.0495637
0.474202
0.0502914
0.522233
0.051002
0.57966
0.0512582
0.645271
0.0503137
0.718167
0.0464862
0.796229
0.0379536
0.874915
0.954724
0.0356946
0.0216804
0.036499
0.0620504
0.0377488
0.102628
0.0393434
0.143413
0.041158
0.184148
0.0430458
0.224366
0.044846
0.263446
0.0464021
0.300774
0.0475876
0.335951
0.0483417
0.369058
0.0487257
0.401145
0.0489581
0.434788
0.0493213
0.473839
0.0499169
0.521637
0.0505017
0.579075
0.050631
0.645142
0.0496281
0.71917
0.0459987
0.799859
0.0379488
0.882965
0.967386
0.0357192
0.0213828
0.0365316
0.061238
0.0377798
0.10138
0.0393656
0.141827
0.0411657
0.182348
0.0430362
0.222496
0.0448193
0.261663
0.0463603
0.299233
0.0475316
0.334779
0.0482666
0.368323
0.048613
0.400798
0.0487712
0.43463
0.0490171
0.473593
0.0494732
0.521181
0.0499233
0.578625
0.0499307
0.645134
0.0489051
0.720195
0.045543
0.803221
0.038009
0.890499
0.97964
0.0357397
0.0210651
0.0365554
0.0604222
0.0377961
0.100139
0.039367
0.140256
0.0411465
0.180569
0.0429934
0.220649
0.0447527
0.259904
0.0462718
0.297714
0.0474226
0.333629
0.0481337
0.367612
0.0484404
0.400492
0.048526
0.434544
0.0486592
0.47346
0.0489818
0.520859
0.0493129
0.578294
0.049235
0.645212
0.0482255
0.721205
0.0451218
0.806325
0.0380523
0.897569
0.99146
0.035756
0.0207306
0.0365707
0.0596076
0.0377984
0.0989111
0.0393483
0.138706
0.0411011
0.178816
0.0429179
0.218832
0.0446467
0.258175
0.0461369
0.296224
0.0472608
0.332505
0.0479425
0.36693
0.048207
0.400227
0.0482217
0.43453
0.0482473
0.473434
0.0484439
0.520662
0.0486693
0.578069
0.0485263
0.645355
0.0475339
0.722197
0.0446465
0.809212
0.0380192
0.904196
1.00278
0.0357684
0.0203823
0.0365777
0.0587982
0.0377871
0.0977017
0.0393099
0.137183
0.0410299
0.177096
0.0428103
0.217052
0.0445018
0.256483
0.0459562
0.29477
0.0470461
0.331415
0.0476929
0.366284
0.0479117
0.400008
0.0478559
0.434585
0.0477773
0.473513
0.0478516
0.520588
0.0479743
0.577946
0.0477684
0.645561
0.0467822
0.723184
0.0440854
0.811909
0.0379062
0.910375
1.01355
0.0357769
0.0200235
0.0365769
0.0579982
0.0377627
0.0965159
0.0392526
0.135694
0.0409336
0.175415
0.0426713
0.215314
0.0443188
0.254836
0.0457302
0.293358
0.0467792
0.330366
0.0473847
0.365678
0.0475538
0.399839
0.0474262
0.434713
0.0472452
0.473694
0.047198
0.520635
0.047216
0.577928
0.0469458
0.645831
0.0459621
0.724167
0.0434476
0.814423
0.0377208
0.916102
1.02373
0.0357816
0.0196572
0.0365685
0.0572113
0.0377259
0.0953586
0.0391772
0.134242
0.040813
0.173779
0.0425016
0.213625
0.0440984
0.253239
0.0454597
0.291997
0.0464605
0.329365
0.0470182
0.36512
0.0471327
0.399725
0.0469315
0.434914
0.0466485
0.473977
0.0464797
0.520804
0.0463908
0.578017
0.0460569
0.646165
0.0450787
0.725145
0.0427416
0.81676
0.0374629
0.92138
1.03331
0.0357827
0.0192866
0.0365526
0.0564414
0.037677
0.0942342
0.0390842
0.132835
0.040669
0.172194
0.0423022
0.211992
0.0438415
0.2517
0.0451457
0.290693
0.0460909
0.32842
0.0465938
0.364618
0.0466485
0.39967
0.0463708
0.435192
0.0459856
0.474362
0.0456952
0.521094
0.045498
0.578214
0.0451015
0.646562
0.0441316
0.726115
0.0419654
0.818927
0.0371284
0.926217
1.04225
0.0357802
0.0189147
0.0365297
0.0556919
0.0376167
0.0931473
0.0389745
0.131477
0.0405024
0.170666
0.042074
0.210421
0.0435493
0.250224
0.0447891
0.289453
0.0456714
0.327538
0.0461123
0.364177
0.0461012
0.399681
0.0457436
0.435549
0.0452553
0.47485
0.0448432
0.521506
0.0445359
0.578522
0.0440765
0.647021
0.0431156
0.727076
0.041113
0.820929
0.0367135
0.930617
1.05054
0.0357744
0.0185447
0.0364999
0.0549663
0.0375454
0.0921018
0.0388489
0.130174
0.0403143
0.169201
0.0418182
0.208917
0.0432229
0.24882
0.0443913
0.288285
0.045203
0.326726
0.0455745
0.363805
0.0454913
0.399764
0.0450496
0.435991
0.0444566
0.475443
0.0439221
0.522041
0.0435023
0.578941
0.0429777
0.647546
0.0420247
0.728029
0.0401792
0.822775
0.0362154
0.934581
1.05815
0.0357652
0.0181796
0.0364635
0.054268
0.0374636
0.0911018
0.0387081
0.128929
0.0401056
0.167804
0.0415359
0.207486
0.0428635
0.247492
0.0439534
0.287195
0.044687
0.325992
0.0449815
0.36351
0.0448195
0.399926
0.0442889
0.436522
0.0435886
0.476144
0.0429303
0.522699
0.0423948
0.579477
0.0418015
0.648139
0.0408547
0.728976
0.0391598
0.82447
0.0356299
0.93811
1.06504
0.0357528
0.0364208
0.0373718
0.0385529
0.0398773
0.0412282
0.0424725
0.0434769
0.0441248
0.0443346
0.0440866
0.0434617
0.042651
0.0418669
0.0412121
0.0405454
0.0396023
0.0380519
0.0349514
0.25407
0.00157013
0.249403
0.00466629
0.241773
0.00763092
0.231412
0.0103601
0.218633
0.0127793
0.203809
0.0148239
0.187371
0.0164388
0.169791
0.0175791
0.151581
0.0182106
0.133271
0.0183103
0.115405
0.0178659
0.0985264
0.0168783
0.08316
0.0153663
0.0697817
0.0133783
0.0587765
0.0110052
0.0503909
0.00838563
0.0446999
0.005691
0.0416139
0.00308601
0.0409601
0.000653777
-0.00168608
0.0426462
0.236094
0.00310858
0.231532
0.00922858
0.224082
0.0150804
0.213971
0.0204719
0.201493
0.0252567
0.187009
0.0293085
0.170926
0.0325213
0.153697
0.0348083
0.135804
0.0361035
0.117753
0.036361
0.100062
0.0355569
0.0832467
0.033694
0.0677945
0.0308185
0.0541235
0.0270494
0.0425205
0.0226081
0.0330889
0.0178172
0.0257391
0.0130408
0.0202505
0.00857463
0.016434
0.00447031
0.000417883
0.01433
0.219327
0.00466229
0.21473
0.0138257
0.207235
0.0225759
0.197064
0.0306429
0.184507
0.0378132
0.169912
0.0439038
0.153672
0.0487611
0.13622
0.0522601
0.118019
0.0543048
0.0995517
0.0548283
0.0813122
0.0537963
0.0637844
0.0512218
0.0473984
0.0472045
0.032457
0.0419908
0.0190511
0.036014
0.00702676
0.0298416
-0.00394218
0.0240097
-0.0141717
0.0188041
-0.0236986
0.0139973
0.00889402
-0.0321748
0.203717
0.00624867
0.199033
0.01851
0.191403
0.0302061
0.181047
0.0409981
0.16825
0.0506104
0.153346
0.0588077
0.136714
0.0653932
0.118767
0.0702071
0.0999449
0.073127
0.080706
0.0740673
0.0615122
0.07299
0.0427933
0.0699407
0.0248692
0.0651286
0.00783674
0.0590233
-0.00850926
0.05236
-0.0246124
0.0459447
-0.0409186
0.0403159
-0.0575568
0.0354424
-0.0740733
0.0305138
0.0244588
-0.0896381
0.189208
0.00786363
0.184446
0.0232722
0.176691
0.0379612
0.166157
0.0515313
0.153118
0.0636502
0.13789
0.074035
0.120834
0.0824499
0.102336
0.0887046
0.0828097
0.0926535
0.0626786
0.0941985
0.0423552
0.0933134
0.022176
0.0901199
0.00227993
0.0850247
-0.0175222
0.0788254
-0.0377432
0.072581
-0.0589641
0.0671656
-0.081429
0.0627808
-0.104721
0.0587348
-0.127721
0.0535132
0.045934
-0.149196
0.17574
0.00948878
0.170951
0.0280615
0.163147
0.0457654
0.15253
0.0621484
0.139352
0.0768278
0.12391
0.0894775
0.106533
0.0998266
0.0875795
0.107658
0.0674248
0.112808
0.0464471
0.115176
0.0249854
0.114775
0.00323816
0.111867
-0.018893
0.107156
-0.0418912
0.101824
-0.0664445
0.0971343
-0.0929885
0.0937096
-0.121277
0.0910691
-0.150264
0.087722
-0.178368
0.0816169
0.0718038
-0.204238
0.163253
0.0110977
0.15851
0.0328044
0.15077
0.0535055
0.140213
0.0727055
0.127064
0.0899769
0.111587
0.104954
0.0940785
0.117335
0.0748574
0.126879
0.0542549
0.133411
0.0325902
0.136841
0.0101048
0.13726
-0.0131751
0.135147
-0.0375956
0.131576
-0.0638496
0.128078
-0.0925935
0.125878
-0.123903
0.125019
-0.157016
0.124182
-0.190493
0.121199
-0.222615
0.113739
0.101257
-0.252068
0.151683
0.0126613
0.147069
0.0374187
0.139519
0.0610548
0.129186
0.083039
0.116257
0.102905
0.100959
0.120253
0.0835466
0.134748
0.0642942
0.146132
0.0434814
0.154224
0.0213568
0.158965
-0.0019524
0.16057
-0.0266004
0.159795
-0.0531389
0.158115
-0.0823406
0.157279
-0.114672
0.158209
-0.149825
0.160172
-0.186727
0.161085
-0.223858
0.158329
-0.25954
0.149421
0.134164
-0.292447
0.140966
0.0141516
0.136559
0.0418261
0.129323
0.0682905
0.119373
0.092989
0.106856
0.115423
0.0919521
0.135156
0.0748718
0.151828
0.0558415
0.165162
0.0350851
0.17498
0.0127759
0.181275
-0.0110761
0.184422
-0.0367911
0.18551
-0.0650649
0.186389
-0.0966496
0.188864
-0.131776
0.193336
-0.169874
0.19827
-0.209815
0.201025
-0.250208
0.198723
-0.28946
0.188673
0.170806
-0.326102
0.131039
0.0155452
0.126906
0.0459594
0.12009
0.0751063
0.110665
0.102415
0.0987293
0.127358
0.0844174
0.149468
0.0678903
0.168355
0.0493238
0.183728
0.0288829
0.195421
0.00666097
0.203497
-0.0174477
0.20853
-0.043899
0.211961
-0.0734586
0.215948
-0.106777
0.222183
-0.143874
0.230432
-0.184098
0.238494
-0.226513
0.24344
-0.270016
0.242226
-0.313072
0.23173
0.21167
-0.353937
0.121842
0.0168241
0.118034
0.0497673
0.111721
0.0814194
0.102932
0.111204
0.0917182
0.138572
0.0781641
0.163022
0.0623822
0.184137
0.0444985
0.201612
0.0246226
0.215297
0.00277895
0.22534
-0.0212246
0.232534
-0.0479281
0.238665
-0.078124
0.246144
-0.112407
0.256466
-0.150744
0.268769
-0.192579
0.280329
-0.237234
0.288094
-0.283864
0.288856
-0.330969
0.278835
0.257198
-0.376497
0.113316
0.0179771
0.109867
0.0532162
0.104113
0.0871734
0.0960405
0.119277
0.0856524
0.14896
0.0729844
0.17569
0.0581016
0.19902
0.0410819
0.218632
0.0219807
0.234398
0.000754543
0.246566
-0.0228729
0.256161
-0.0495191
0.265311
-0.079999
0.276624
-0.114842
0.291309
-0.153919
0.307846
-0.196719
0.323129
-0.242932
0.334307
-0.292251
0.338176
-0.343364
0.329947
0.307595
-0.393761
0.105408
0.0189987
0.102334
0.0562895
0.0971704
0.0923375
0.0898615
0.126585
0.080366
0.158455
0.0686733
0.187383
0.0548038
0.21289
0.0387914
0.234644
0.0206459
0.252543
0.000275013
0.266937
-0.0226376
0.279074
-0.0487097
0.291383
-0.0787093
0.306624
-0.113158
0.325758
-0.152089
0.346777
-0.195361
0.366401
-0.243102
0.382048
-0.295229
0.390303
-0.35029
0.385007
0.362704
-0.405398
0.0980669
0.0198893
0.0953706
0.0589858
0.090804
0.0969041
0.0842772
0.133112
0.0757072
0.167025
0.0650413
0.198049
0.0522588
0.225672
0.0373536
0.249549
0.0202943
0.269603
0.000943739
0.286288
-0.0210599
0.301078
-0.0463676
0.316691
-0.0757854
0.336042
-0.109936
0.359909
-0.14895
0.38579
-0.192564
0.410015
-0.24075
0.430234
-0.29395
0.443503
-0.351706
0.442764
0.422203
-0.411205
0.0912483
0.0206532
0.0889179
0.0613162
0.084937
0.100885
0.0791855
0.138864
0.0715443
0.174666
0.0619236
0.207669
0.0502664
0.237329
0.0365329
0.263283
0.0206612
0.285474
0.00249059
0.304458
-0.0183447
0.321913
-0.0424514
0.340798
-0.0705444
0.364135
-0.103221
0.392586
-0.140787
0.423355
-0.18335
0.452578
-0.231487
0.478371
-0.286372
0.498388
-0.347605
0.503997
0.48613
-0.411532
0.0849109
0.0212981
0.0829256
0.0633015
0.079504
0.104307
0.074501
0.143867
0.0677673
0.1814
0.0591808
0.216256
0.048653
0.247857
0.0361139
0.275822
0.0214735
0.300115
0.00454687
0.321385
-0.0150503
0.34151
-0.0379397
0.363687
-0.0648693
0.391064
-0.0965943
0.424311
-0.133758
0.460519
-0.176539
0.495359
-0.224683
0.526515
-0.278677
0.552382
-0.339733
0.565053
0.553282
-0.406885
0.0790183
0.0218332
0.077351
0.0649688
0.0744509
0.107207
0.0701544
0.148163
0.0642887
0.187266
0.0567051
0.22384
0.0472892
0.257273
0.03595
0.287161
0.0225833
0.313481
0.00700608
0.336962
-0.0111372
0.359653
-0.0324048
0.384955
-0.0574389
0.416098
-0.086895
0.453767
-0.121486
0.49511
-0.161658
0.535531
-0.207594
0.572451
-0.260957
0.605746
-0.324898
0.628993
0.626275
-0.397891
0.0735371
0.0222691
0.0721589
0.066347
0.069737
0.109629
0.0660935
0.151807
0.0610391
0.19232
0.0544038
0.230475
0.0460493
0.265627
0.0358606
0.29735
0.0237116
0.32563
0.00940483
0.351269
-0.00741971
0.376478
-0.0273366
0.404871
-0.0510383
0.4398
-0.0792691
0.481998
-0.11303
0.528871
-0.153309
0.57581
-0.199957
0.619099
-0.252314
0.658103
-0.312825
0.689504
0.698989
-0.385539
0.068439
0.0226163
0.0673214
0.0674647
0.0653333
0.111617
0.0622861
0.154854
0.0579825
0.196624
0.0522416
0.236216
0.0449167
0.272952
0.0358885
0.306378
0.0250338
0.336485
0.0121763
0.364127
-0.00298347
0.391638
-0.020925
0.422813
-0.0422479
0.461123
-0.0675835
0.507334
-0.097805
0.559093
-0.133991
0.611996
-0.176568
0.661675
-0.225764
0.7073
-0.285651
0.749391
0.781278
-0.367941
0.063718
0.0628347
0.0612288
0.0587062
0.0550611
0.0500901
0.0436228
0.0355199
0.025641
0.0137937
-0.000330199
-0.0172258
-0.0375479
-0.0619237
-0.0913198
-0.127919
-0.172635
-0.22002
-0.267267
-0.351761
0.0431348
-0.000488607
0.0437752
-0.00064041
0.0445603
-0.000785086
0.0454832
-0.000922881
0.0465386
-0.00105546
0.0477226
-0.00118394
0.0490319
-0.00130937
0.0504647
-0.0014328
0.05202
-0.00155521
0.0536975
-0.00167751
0.055498
-0.00180054
0.0574231
-0.00192506
0.0594748
-0.00205178
0.0616561
-0.0021813
0.0639703
-0.00231419
0.0664213
-0.00245092
0.0690132
-0.00259193
0.0717507
-0.00273755
0.0746389
-0.00288811
-0.00304384
0.0776827
0.0145687
-0.000727327
0.0149086
-0.000980247
0.0153445
-0.001221
0.0158745
-0.00145289
0.0164983
-0.00167922
0.0172158
-0.0019015
0.0180276
-0.00212113
0.0189343
-0.00233953
0.0199371
-0.00255801
0.0210373
-0.00277776
0.0222366
-0.00299984
0.0235368
-0.00322521
0.0249398
-0.00345474
0.0264477
-0.0036892
0.0280627
-0.00392925
0.0297873
-0.00417547
0.0316237
-0.00442838
0.0335745
-0.00468837
0.0356422
-0.00495578
-0.00523086
0.0378292
-0.0321863
-0.000715763
-0.0321592
-0.00100742
-0.03209
-0.00129021
-0.0319709
-0.00157194
-0.031795
-0.00185515
-0.0315571
-0.00213936
-0.0312535
-0.00242469
-0.0308814
-0.00271171
-0.0304383
-0.00300105
-0.0299227
-0.00329339
-0.0293331
-0.00358939
-0.0286686
-0.0038897
-0.0279284
-0.00419496
-0.0271119
-0.00450574
-0.0262185
-0.00482258
-0.0252481
-0.00514595
-0.0242002
-0.00547625
-0.0230747
-0.00581383
-0.0218715
-0.00615896
-0.00651185
-0.0205905
-0.0896318
-0.000722095
-0.08963
-0.00100917
-0.089618
-0.00130221
-0.0895807
-0.00160923
-0.0895088
-0.00192713
-0.0893968
-0.00225129
-0.0892419
-0.00257958
-0.0890424
-0.00291129
-0.0887972
-0.00324622
-0.0885061
-0.00358451
-0.088169
-0.00392646
-0.0877862
-0.00427245
-0.0873583
-0.00462294
-0.0868856
-0.00497837
-0.0863691
-0.00533916
-0.0858093
-0.00570572
-0.0852071
-0.0060784
-0.0845635
-0.0064575
-0.0838792
-0.00684326
-0.00723588
-0.0831551
-0.148814
-0.00110372
-0.148464
-0.00135995
-0.148125
-0.00164109
-0.147786
-0.00194808
-0.147443
-0.00227056
-0.147093
-0.002601
-0.146736
-0.00293638
-0.146372
-0.00327563
-0.145999
-0.00361841
-0.145619
-0.00396473
-0.145231
-0.00431478
-0.144835
-0.00466885
-0.14443
-0.00502725
-0.144018
-0.00539032
-0.143599
-0.00575837
-0.143173
-0.00613168
-0.142741
-0.0065105
-0.142303
-0.00689503
-0.141861
-0.00728539
-0.00768167
-0.141416
-0.203313
-0.00202812
-0.202445
-0.00222854
-0.20162
-0.00246554
-0.200836
-0.00273187
-0.200093
-0.00301387
-0.199389
-0.00330452
-0.198724
-0.0036015
-0.198096
-0.00390402
-0.197503
-0.00421178
-0.196943
-0.00452466
-0.196415
-0.00484265
-0.195918
-0.0051658
-0.195451
-0.00549418
-0.195013
-0.00582788
-0.194605
-0.00616697
-0.194225
-0.00651149
-0.193874
-0.00686145
-0.193552
-0.00721681
-0.19326
-0.00757747
-0.00794328
-0.192999
-0.250647
-0.00344915
-0.249306
-0.00356987
-0.248048
-0.00372377
-0.246875
-0.00390468
-0.245787
-0.00410151
-0.244782
-0.00430965
-0.243856
-0.00452762
-0.243005
-0.00475466
-0.242227
-0.0049902
-0.241518
-0.00523381
-0.240875
-0.00548509
-0.240297
-0.00574372
-0.239782
-0.00600941
-0.239328
-0.00628186
-0.238934
-0.00656081
-0.2386
-0.00684595
-0.238324
-0.00713695
-0.238108
-0.00743345
-0.23795
-0.00773501
-0.00804113
-0.237852
-0.29067
-0.00522553
-0.288988
-0.0052527
-0.287423
-0.00528795
-0.285981
-0.00534743
-0.284656
-0.00542586
-0.283445
-0.00552057
-0.282343
-0.00563022
-0.281344
-0.00575369
-0.280444
-0.00588995
-0.27964
-0.0060381
-0.278928
-0.00619727
-0.278305
-0.00636668
-0.277768
-0.00654558
-0.277317
-0.00673326
-0.276949
-0.00692902
-0.276663
-0.00713213
-0.276458
-0.00734187
-0.276334
-0.00755746
-0.276291
-0.00777807
-0.00800277
-0.276329
-0.324143
-0.00718461
-0.322273
-0.00712223
-0.320549
-0.0070125
-0.318967
-0.00692967
-0.317521
-0.00687146
-0.316206
-0.00683588
-0.315015
-0.00682113
-0.313943
-0.00682559
-0.312985
-0.00684767
-0.312137
-0.00688594
-0.311396
-0.00693904
-0.310757
-0.00700566
-0.310218
-0.00708458
-0.309776
-0.0071746
-0.309431
-0.00727454
-0.30918
-0.00738324
-0.309022
-0.0074995
-0.308957
-0.00762209
-0.308986
-0.00774973
-0.00788107
-0.309107
-0.351997
-0.00912452
-0.350119
-0.00900014
-0.348401
-0.00873043
-0.346828
-0.00850269
-0.345394
-0.00830515
-0.344093
-0.00813711
-0.342918
-0.007996
-0.341864
-0.00787965
-0.340926
-0.00778596
-0.340099
-0.00771293
-0.339379
-0.00765868
-0.338763
-0.0076214
-0.338248
-0.00759936
-0.337832
-0.00759087
-0.337512
-0.00759427
-0.337288
-0.00760791
-0.337157
-0.00763014
-0.33712
-0.00765925
-0.337176
-0.00769352
-0.0077311
-0.337326
-0.374819
-0.0108023
-0.373148
-0.010671
-0.37164
-0.0102379
-0.37026
-0.00988319
-0.369006
-0.00955864
-0.367872
-0.00927114
-0.366852
-0.00901607
-0.365941
-0.00879115
-0.365133
-0.00859364
-0.364425
-0.0084211
-0.363813
-0.00827113
-0.363292
-0.00814146
-0.362862
-0.00802986
-0.362519
-0.0079342
-0.362261
-0.00785237
-0.362086
-0.00778225
-0.361995
-0.00772174
-0.361985
-0.00766871
-0.362058
-0.00762099
-0.0075763
-0.362212
-0.392623
-0.0119407
-0.391407
-0.0118871
-0.390345
-0.0113
-0.389369
-0.0108588
-0.388494
-0.0104338
-0.38771
-0.0100554
-0.387013
-0.00971286
-0.386399
-0.00940536
-0.385863
-0.00912924
-0.385403
-0.00888178
-0.385014
-0.00866012
-0.384693
-0.00846161
-0.38444
-0.00828361
-0.38425
-0.00812363
-0.384123
-0.00797914
-0.384058
-0.00784767
-0.384053
-0.00772673
-0.384108
-0.00761383
-0.384222
-0.00750641
-0.00740184
-0.384397
-0.405079
-0.0122599
-0.404566
-0.0124003
-0.404185
-0.0116808
-0.403828
-0.0112159
-0.403532
-0.0107299
-0.403282
-0.0103051
-0.403079
-0.00991593
-0.402918
-0.00956595
-0.402798
-0.00924954
-0.402715
-0.00896432
-0.402669
-0.00870698
-0.402655
-0.00847472
-0.402674
-0.00826465
-0.402724
-0.00807402
-0.402803
-0.00790003
-0.402911
-0.00773994
-0.403047
-0.007591
-0.40321
-0.00745045
-0.403401
-0.00731548
-0.00718319
-0.40362
-0.411973
-0.0114918
-0.4124
-0.0119732
-0.412921
-0.0111603
-0.413375
-0.0107624
-0.413833
-0.0102718
-0.414273
-0.00986465
-0.414705
-0.00948403
-0.415125
-0.00914589
-0.415534
-0.00884061
-0.415931
-0.00856758
-0.416315
-0.00832284
-0.416686
-0.0081037
-0.417043
-0.00790707
-0.417387
-0.00773016
-0.417717
-0.00757007
-0.418033
-0.00742398
-0.418335
-0.00728906
-0.418623
-0.00716245
-0.418897
-0.00704124
-0.00692241
-0.419158
-0.413632
-0.00939266
-0.415196
-0.0104091
-0.416792
-0.00956451
-0.418207
-0.00934727
-0.41956
-0.00891875
-0.420816
-0.00860853
-0.421993
-0.00830641
-0.423088
-0.00805164
-0.424104
-0.00782484
-0.425042
-0.00762911
-0.425906
-0.00745882
-0.426697
-0.00731233
-0.427418
-0.00718655
-0.428069
-0.00707906
-0.428652
-0.00698711
-0.429168
-0.00690803
-0.429618
-0.00683909
-0.430003
-0.00677752
-0.430324
-0.00672047
-0.00666496
-0.430581
-0.410595
-0.00568198
-0.413508
-0.00749598
-0.416396
-0.00667649
-0.418964
-0.00677912
-0.421376
-0.00650748
-0.423574
-0.00641003
-0.425598
-0.00628282
-0.427445
-0.0062048
-0.429129
-0.00614055
-0.430655
-0.00610279
-0.43203
-0.00608377
-0.433258
-0.00608431
-0.434344
-0.00610114
-0.43529
-0.00613255
-0.436101
-0.00617596
-0.43678
-0.0062291
-0.43733
-0.00628955
-0.437753
-0.00635485
-0.438051
-0.00642227
-0.00648904
-0.438227
-0.403627
5.41478e-05
-0.408243
-0.00287921
-0.412687
-0.00223295
-0.416578
-0.0028886
-0.420181
-0.00290366
-0.423441
-0.00315044
-0.426423
-0.00330101
-0.429121
-0.00350617
-0.431557
-0.00370514
-0.433734
-0.00392509
-0.435666
-0.00415242
-0.437359
-0.00439145
-0.438822
-0.00463822
-0.440062
-0.00489259
-0.441085
-0.00515242
-0.441898
-0.0054164
-0.442505
-0.00568265
-0.44291
-0.00594917
-0.443119
-0.00621334
-0.0064725
-0.443136
-0.393636
0.00815151
-0.40002
0.00350474
-0.406116
0.00386273
-0.4115
0.00249506
-0.4165
0.0020967
-0.421011
0.00136037
-0.425107
0.000795319
-0.428783
0.000169081
-0.432071
-0.000416436
-0.434987
-0.00100893
-0.437551
-0.00158886
-0.439775
-0.00216772
-0.441671
-0.00274195
-0.443249
-0.00331417
-0.444519
-0.00388321
-0.445486
-0.00444898
-0.446158
-0.00501033
-0.446542
-0.00556567
-0.446643
-0.00611218
-0.0066472
-0.446468
-0.379824
0.0200351
-0.38836
0.0120407
-0.396704
0.0122063
-0.40397
0.00976192
-0.410578
0.00870469
-0.416466
0.00724812
-0.42177
0.00609869
-0.426516
0.00491507
-0.430754
0.00382228
-0.434507
0.00274379
-0.437797
0.00170083
-0.440638
0.00067381
-0.443046
-0.000334609
-0.44503
-0.00132982
-0.446602
-0.0023116
-0.447769
-0.00328111
-0.448542
-0.00423791
-0.448927
-0.00518095
-0.448931
-0.00610728
-0.00701336
-0.448565
-0.364956
-0.376949
-0.386757
-0.395462
-0.403277
-0.410337
-0.416721
-0.422463
-0.427599
-0.432152
-0.436142
-0.439586
-0.4425
-0.444896
-0.446785
-0.448178
-0.449085
-0.449514
-0.449475
-0.448977
0.0808878
-0.00320511
0.0842595
-0.00337172
0.0878035
-0.00354394
0.0915253
-0.00372182
0.0954307
-0.00390538
0.0995253
-0.00409459
0.103815
-0.0042894
0.108304
-0.0044897
0.113
-0.00469537
0.117906
-0.00490627
0.123028
-0.0051222
0.128371
-0.00534297
0.13394
-0.00556838
0.139738
-0.00579821
0.14577
-0.00603227
0.15204
-0.00627038
0.158553
-0.00651236
0.165311
-0.00675812
0.17232
-0.00700861
-0.00726334
0.179583
0.0401379
-0.00551384
0.042571
-0.00580477
0.0451308
-0.00610372
0.0478196
-0.00641069
0.0506399
-0.00672561
0.0535936
-0.00704837
0.056683
-0.00737879
0.05991
-0.00771667
0.0632764
-0.00806179
0.066784
-0.00841386
0.0704344
-0.00877262
0.0742292
-0.00913778
0.0781699
-0.00950906
0.0822579
-0.0098862
0.0864947
-0.010269
0.0908816
-0.0106573
0.09542
-0.0110507
0.100111
-0.011449
0.104957
-0.0118547
-0.0122692
0.109963
-0.0192323
-0.00687205
-0.0177963
-0.00724082
-0.0162824
-0.0076176
-0.0146908
-0.00800233
-0.0130214
-0.00839493
-0.0112745
-0.00879526
-0.00945021
-0.00920313
-0.00754855
-0.00961832
-0.0055697
-0.0100406
-0.00351391
-0.0104697
-0.0013812
-0.0109053
0.000828227
-0.0113472
0.00311425
-0.0117951
0.00547677
-0.0122487
0.00791573
-0.012708
0.010431
-0.0131725
0.0130216
-0.0136413
0.0156859
-0.0141133
0.018426
-0.0145948
-0.0150908
0.0212476
-0.0823934
-0.00763379
-0.0815938
-0.00804042
-0.0807573
-0.00845408
-0.0798849
-0.00887472
-0.0789777
-0.0093022
-0.0780366
-0.00973634
-0.0770628
-0.0101769
-0.0760574
-0.0106237
-0.0750218
-0.0110762
-0.0739572
-0.0115343
-0.0728652
-0.0119974
-0.0717474
-0.0124651
-0.0706055
-0.0129369
-0.0694417
-0.0134125
-0.0682581
-0.0138916
-0.0670573
-0.0143733
-0.0658443
-0.0148544
-0.0646259
-0.0153318
-0.0634015
-0.0158192
-0.0163327
-0.0621596
-0.140969
-0.00808065
-0.14052
-0.00848869
-0.140072
-0.00890244
-0.139625
-0.00932168
-0.139181
-0.0097461
-0.138742
-0.0101753
-0.13831
-0.0106089
-0.137888
-0.0110463
-0.137477
-0.0114869
-0.137081
-0.01193
-0.136704
-0.0123748
-0.136348
-0.0128205
-0.136019
-0.0132662
-0.135721
-0.0137112
-0.135457
-0.0141551
-0.135235
-0.0145958
-0.135063
-0.0150256
-0.134958
-0.0154371
-0.134917
-0.0158607
-0.0163416
-0.134908
-0.19277
-0.00830881
-0.192575
-0.00868406
-0.192414
-0.00906344
-0.192289
-0.00944644
-0.192203
-0.00983243
-0.192158
-0.0102207
-0.192156
-0.0106104
-0.192202
-0.0110006
-0.192298
-0.0113902
-0.19245
-0.0117781
-0.192662
-0.012163
-0.192939
-0.0125434
-0.193288
-0.0129178
-0.193713
-0.0132858
-0.194221
-0.0136473
-0.194819
-0.0139977
-0.195525
-0.0143195
-0.196365
-0.0145971
-0.197329
-0.014897
-0.0153322
-0.198338
-0.237817
-0.00834375
-0.237844
-0.00865708
-0.237935
-0.00897286
-0.238091
-0.00929019
-0.238316
-0.009608
-0.238611
-0.00992514
-0.238981
-0.0102403
-0.23943
-0.010552
-0.239961
-0.0108588
-0.24058
-0.0111588
-0.241293
-0.0114501
-0.242106
-0.0117303
-0.243027
-0.0119975
-0.24406
-0.0122525
-0.245211
-0.0124966
-0.246488
-0.0127203
-0.247922
-0.0128854
-0.249557
-0.0129622
-0.251366
-0.0130883
-0.013517
-0.253181
-0.276452
-0.00822047
-0.276659
-0.00845019
-0.276951
-0.0086806
-0.277331
-0.00891032
-0.277802
-0.0091378
-0.278365
-0.00936135
-0.279026
-0.00957915
-0.279789
-0.00978923
-0.280659
-0.0099895
-0.28164
-0.0101775
-0.28274
-0.0103502
-0.283966
-0.0105041
-0.285326
-0.0106373
-0.286825
-0.0107539
-0.288462
-0.0108591
-0.29025
-0.0109327
-0.292238
-0.0108972
-0.294501
-0.0106998
-0.296979
-0.0106102
-0.0111452
-0.29935
-0.309326
-0.00800158
-0.309641
-0.00813571
-0.310053
-0.00826868
-0.310564
-0.00839859
-0.311179
-0.00852335
-0.3119
-0.0086407
-0.31273
-0.00874827
-0.313676
-0.00884362
-0.314741
-0.0089242
-0.315932
-0.00898675
-0.317256
-0.00902654
-0.318722
-0.00903822
-0.320338
-0.00902138
-0.322104
-0.00898793
-0.324012
-0.00895079
-0.326076
-0.00886812
-0.328381
-0.00859222
-0.331044
-0.00803714
-0.333952
-0.00770269
-0.0085703
-0.336526
-0.337574
-0.00775375
-0.337918
-0.00779197
-0.338359
-0.00782718
-0.338901
-0.00785695
-0.339546
-0.0078786
-0.340297
-0.00788928
-0.341159
-0.00788607
-0.342137
-0.00786622
-0.343234
-0.00782706
-0.344456
-0.00776443
-0.345812
-0.00767074
-0.347313
-0.00753735
-0.348967
-0.00736736
-0.350765
-0.0071896
-0.352685
-0.00703131
-0.354743
-0.00680977
-0.357079
-0.00625571
-0.359876
-0.00524073
-0.362929
-0.00464947
-0.00624614
-0.365253
-0.362454
-0.00751234
-0.362779
-0.00746638
-0.363191
-0.00741572
-0.36369
-0.0073574
-0.364281
-0.00728817
-0.364966
-0.00720451
-0.365749
-0.00710292
-0.366634
-0.0069806
-0.367626
-0.00683547
-0.368728
-0.00666272
-0.369949
-0.00644988
-0.371305
-0.00618143
-0.372806
-0.00586592
-0.374432
-0.00556393
-0.376133
-0.00533041
-0.37793
-0.00501184
-0.38005
-0.00413633
-0.382768
-0.00252267
-0.385742
-0.00167506
-0.00463831
-0.38735
-0.384636
-0.00727344
-0.384936
-0.00716607
-0.385299
-0.00705254
-0.385727
-0.00692943
-0.386222
-0.00679302
-0.386788
-0.00663901
-0.387428
-0.00646308
-0.388146
-0.00626236
-0.388945
-0.00603628
-0.389827
-0.00578072
-0.390801
-0.00547642
-0.391888
-0.00509397
-0.393109
-0.00464487
-0.394433
-0.00424032
-0.395772
-0.00399074
-0.397143
-0.00364154
-0.398877
-0.00240191
-0.40139
-9.48483e-06
-0.404167
0.0011018
-0.004156
-0.40465
-0.403871
-0.00702238
-0.404151
-0.00688614
-0.404461
-0.00674255
-0.404802
-0.00658782
-0.405177
-0.0064178
-0.405589
-0.00622751
-0.406041
-0.00601132
-0.406537
-0.00576554
-0.407082
-0.00549146
-0.407675
-0.00518837
-0.408319
-0.00483158
-0.409044
-0.00436946
-0.409885
-0.00380334
-0.410819
-0.0033072
-0.411714
-0.00309513
-0.412543
-0.00281277
-0.41373
-0.00121466
-0.415876
0.00213613
-0.418337
0.00356246
-0.00507121
-0.417421
-0.41941
-0.0067702
-0.41965
-0.00664649
-0.419878
-0.00651445
-0.420096
-0.00636983
-0.420306
-0.00620821
-0.420509
-0.00602415
-0.42071
-0.00581064
-0.420913
-0.00556178
-0.421126
-0.00527932
-0.421345
-0.00496875
-0.421569
-0.00460747
-0.421819
-0.00412001
-0.422148
-0.00347374
-0.422565
-0.00289076
-0.422916
-0.00274361
-0.423077
-0.00265261
-0.423467
-0.000824553
-0.424893
0.00356278
-0.426756
0.00542531
-0.0073237
-0.424504
-0.430781
-0.00657066
-0.430918
-0.0065088
-0.430995
-0.00643745
-0.431013
-0.00635194
-0.430974
-0.00624759
-0.430879
-0.00611893
-0.430731
-0.00595836
-0.430536
-0.00575723
-0.4303
-0.00551467
-0.430027
-0.00524176
-0.429706
-0.00492931
-0.429333
-0.0044923
-0.428963
-0.00384392
-0.428654
-0.00320015
-0.428288
-0.00310907
-0.427623
-0.00331759
-0.426908
-0.0015394
-0.427072
0.00372645
-0.42781
0.00616312
-0.0104608
-0.424673
-0.438287
-0.0065103
-0.438229
-0.00656723
-0.438053
-0.00661284
-0.437763
-0.00664221
-0.43736
-0.00665039
-0.436847
-0.00663226
-0.436224
-0.00658102
-0.435494
-0.00648696
-0.434665
-0.00634443
-0.433742
-0.0061644
-0.432714
-0.00595687
-0.431551
-0.00565569
-0.430268
-0.00512665
-0.428967
-0.00450183
-0.427639
-0.00443702
-0.425986
-0.00497017
-0.423936
-0.00358992
-0.422297
0.00208732
-0.421225
0.005092
-0.0140028
-0.417683
-0.442969
-0.00667741
-0.442616
-0.00692009
-0.44208
-0.00714856
-0.441364
-0.00735789
-0.440472
-0.007543
-0.439405
-0.00769918
-0.438165
-0.00782136
-0.43675
-0.00790182
-0.435162
-0.00793196
-0.433411
-0.0079157
-0.431494
-0.00787368
-0.429368
-0.00778184
-0.426991
-0.0075034
-0.424461
-0.0070323
-0.421929
-0.0069687
-0.419178
-0.00772137
-0.415766
-0.00700192
-0.412098
-0.00158038
-0.408757
0.00175037
-0.0179208
-0.404839
-0.446028
-0.0071172
-0.445322
-0.0076261
-0.444354
-0.00811662
-0.443128
-0.00858425
-0.441647
-0.00902435
-0.439913
-0.00943273
-0.437929
-0.00980578
-0.435692
-0.0101387
-0.4332
-0.0104242
-0.430458
-0.0106576
-0.42748
-0.0108515
-0.424247
-0.0110147
-0.420686
-0.0110643
-0.416831
-0.0108875
-0.412975
-0.0108245
-0.409173
-0.0115233
-0.404672
-0.0115025
-0.399208
-0.00704458
-0.393914
-0.00354404
-0.0227542
-0.38908
-0.447842
-0.00784005
-0.446765
-0.00870348
-0.44534
-0.0095418
-0.443572
-0.0103519
-0.441466
-0.0111306
-0.439024
-0.0118745
-0.43625
-0.0125799
-0.433146
-0.0132426
-0.429714
-0.0138567
-0.425957
-0.0144138
-0.4219
-0.0149089
-0.41757
-0.0153452
-0.412936
-0.0156974
-0.407954
-0.0158696
-0.402883
-0.0158962
-0.398193
-0.0162134
-0.39321
-0.0164855
-0.386321
-0.0139328
-0.379443
-0.0104221
-0.027506
-0.374692
-0.448039
-0.446669
-0.444876
-0.442665
-0.440044
-0.437017
-0.433594
-0.429786
-0.425605
-0.421069
-0.416202
-0.411048
-0.405647
-0.399969
-0.394034
-0.388279
-0.382831
-0.375169
-0.364068
-0.370191
0.204433
-0.0248506
0.2326
-0.0281663
0.263786
-0.0311858
0.297893
-0.034107
0.334921
-0.0370288
0.374258
-0.0393367
0.41519
-0.0409322
0.457134
-0.0419442
0.499516
-0.0423812
0.541723
-0.0422074
0.583144
-0.0414206
0.623195
-0.0400511
0.66134
-0.038145
0.69711
-0.0357704
0.730121
-0.0330109
0.76009
-0.0299686
0.786837
-0.0267472
0.810292
-0.023455
0.830476
-0.0201842
0.847499
-0.0170225
0.861529
-0.0140301
0.872791
-0.0112619
0.881531
-0.00874062
0.888021
-0.00649024
0.892524
-0.00450207
0.895302
-0.00277847
0.896592
-0.00129021
0.896619
-2.71866e-05
0.895571
0.00104828
0.893617
0.00195447
0.890892
0.00272461
0.887504
0.00338804
0.883545
0.00395876
0.87906
0.00448565
0.87411
0.00494983
0.868689
0.00542095
0.86284
0.00584883
0.856558
0.00628179
0.849876
0.00668239
0.00692442
0.133018
-0.0479055
0.159221
-0.0543693
0.188573
-0.0605379
0.220893
-0.0664276
0.256373
-0.0725088
0.293807
-0.0767708
0.33258
-0.0797052
0.372243
-0.081607
0.412259
-0.0823964
0.452062
-0.0820108
0.491096
-0.080455
0.528822
-0.0777769
0.564739
-0.0740617
0.598414
-0.0694456
0.629501
-0.0640976
0.657752
-0.0582202
0.683021
-0.0520156
0.705259
-0.0456933
0.724504
-0.0394288
0.74087
-0.0333894
0.754525
-0.0276846
0.765682
-0.0224193
0.77457
-0.0176281
0.78144
-0.0133604
0.786525
-0.00958754
0.790071
-0.00632412
0.792278
-0.00349657
0.793356
-0.001106
0.793457
0.000947318
0.792748
0.00266352
0.791324
0.00414872
0.789306
0.00540635
0.786741
0.00652349
0.783702
0.00752431
0.780207
0.0084451
0.776281
0.00934735
0.771932
0.0101975
0.767165
0.0110487
0.762006
0.0118416
0.0124072
0.0443912
-0.0710492
0.0703161
-0.0802942
0.0994284
-0.0896502
0.13137
-0.0983689
0.166899
-0.108038
0.203459
-0.113331
0.24101
-0.117256
0.279279
-0.119876
0.317754
-0.120871
0.355894
-0.12015
0.39315
-0.117712
0.428994
-0.11362
0.462951
-0.108019
0.494634
-0.101129
0.523754
-0.0932171
0.550123
-0.0845892
0.573654
-0.0755466
0.594352
-0.0663914
0.612297
-0.0573743
0.627634
-0.0487262
0.640547
-0.0405971
0.651252
-0.0331243
0.659973
-0.0263496
0.666945
-0.0203325
0.672384
-0.0150261
0.676504
-0.0104448
0.679487
-0.00647876
0.68151
-0.00312933
0.682705
-0.000247984
0.68321
0.00215837
0.683108
0.00425138
0.682491
0.00602279
0.681407
0.00760783
0.679897
0.00903405
0.677999
0.0103432
0.675684
0.0116622
0.673027
0.0128545
0.669911
0.0141645
0.666503
0.0152501
0.0162698
-0.0373026
-0.0959061
-0.010463
-0.107134
0.0195467
-0.11966
0.0517552
-0.130577
0.0882188
-0.144502
0.124324
-0.149436
0.16142
-0.154353
0.199115
-0.15757
0.236792
-0.158548
0.27385
-0.157209
0.309712
-0.153573
0.343861
-0.14777
0.375879
-0.140036
0.405446
-0.130697
0.432356
-0.120126
0.456503
-0.108737
0.477883
-0.0969261
0.496569
-0.0850777
0.512701
-0.0735067
0.526465
-0.0624897
0.538073
-0.0522048
0.547752
-0.0428037
0.55573
-0.034328
0.56223
-0.026832
0.567454
-0.0202504
0.571594
-0.0145847
0.574811
-0.00969599
0.577256
-0.00557421
0.579043
-0.00203464
0.580281
0.000919947
0.581041
0.00349162
0.581393
0.00567094
0.581375
0.00762548
0.58101
0.00939893
0.580338
0.0110151
0.5793
0.0127009
0.578002
0.0141528
0.576247
0.0159193
0.574294
0.0172032
0.0187563
-0.107662
-0.123152
-0.0792724
-0.135523
-0.0474938
-0.151439
-0.0150561
-0.163015
0.0228184
-0.182376
0.0590018
-0.185619
0.0964995
-0.191851
0.134265
-0.195336
0.171566
-0.195849
0.207778
-0.193422
0.242358
-0.188153
0.274858
-0.180269
0.304936
-0.170114
0.33236
-0.158121
0.357012
-0.144778
0.378874
-0.130599
0.398022
-0.116074
0.414599
-0.101655
0.428799
-0.0877068
0.440845
-0.0745359
0.450975
-0.062335
0.459426
-0.0512543
0.466426
-0.0413279
0.472186
-0.0325922
0.476899
-0.0249632
0.480734
-0.0184195
0.483837
-0.0127994
0.486335
-0.00807203
0.488328
-0.00402732
0.489902
-0.000654545
0.491118
0.00227627
0.492027
0.00476175
0.492659
0.00699324
0.493027
0.00903126
0.493161
0.0108812
0.492994
0.0128675
0.492634
0.0145131
0.49185
0.016703
0.490941
0.0181124
0.0202354
-0.168153
-0.153336
-0.137394
-0.166283
-0.102575
-0.186258
-0.0700148
-0.195575
-0.0304216
-0.22197
0.00657892
-0.22262
0.0449201
-0.230192
0.0828703
-0.233286
0.119792
-0.232771
0.155134
-0.228764
0.188426
-0.221445
0.219295
-0.211139
0.247479
-0.198298
0.272829
-0.183471
0.295314
-0.167263
0.315
-0.150286
0.332037
-0.133111
0.346629
-0.116246
0.359014
-0.100092
0.369446
-0.0849679
0.378179
-0.0710675
0.385452
-0.0585273
0.39149
-0.0473657
0.396491
-0.0375936
0.400635
-0.0291066
0.40407
-0.0218553
0.406929
-0.0156586
0.409318
-0.0104603
0.411323
-0.00603255
0.413014
-0.00234586
0.414441
0.000849306
0.415645
0.00355848
0.416643
0.00599434
0.417448
0.00822642
0.418073
0.0102564
0.418462
0.0124791
0.418697
0.0142778
0.418555
0.0168449
0.418331
0.0183367
0.0210426
-0.219812
-0.186706
-0.186187
-0.199908
-0.146775
-0.22567
-0.113809
-0.228541
-0.0726811
-0.263097
-0.034304
-0.260997
0.00479697
-0.269293
0.0427984
-0.271287
0.0792513
-0.269223
0.113675
-0.263187
0.145664
-0.253434
0.174916
-0.240391
0.20125
-0.224632
0.224606
-0.206827
0.245037
-0.187694
0.26269
-0.167938
0.277778
-0.148199
0.290556
-0.129025
0.3013
-0.110836
0.310283
-0.0939501
0.317765
-0.0785498
0.323985
-0.0647473
0.329158
-0.0525387
0.333468
-0.0419038
0.337078
-0.0327165
0.34012
-0.0248972
0.342709
-0.0182477
0.344934
-0.0126854
0.34687
-0.00796868
0.348573
-0.0040483
0.350081
-0.000659573
0.351429
0.0022111
0.352624
0.00479922
0.353679
0.00717158
0.354588
0.00934731
0.355314
0.0117529
0.355904
0.0136876
0.356164
0.0165851
0.356357
0.0181441
0.0214351
-0.262858
-0.223198
-0.226872
-0.235894
-0.181737
-0.270805
-0.147203
-0.263075
-0.105178
-0.305122
-0.0651746
-0.301001
-0.0255827
-0.308885
0.0123242
-0.309194
0.0481911
-0.30509
0.0815983
-0.296594
0.112215
-0.28405
0.139823
-0.268
0.164329
-0.249138
0.18576
-0.228258
0.204249
-0.206183
0.220012
-0.183701
0.233317
-0.161505
0.244461
-0.140168
0.253742
-0.120117
0.261444
-0.101652
0.267829
-0.0849355
0.273129
-0.0700472
0.277546
-0.0569555
0.281249
-0.0456064
0.284383
-0.0358508
0.287065
-0.0275788
0.289393
-0.0205764
0.291443
-0.0147352
0.293277
-0.00980251
0.294939
-0.00571014
0.29646
-0.00218029
0.297865
0.000806001
0.299154
0.00351023
0.300341
0.0059841
0.301403
0.00828588
0.302322
0.0108337
0.303105
0.0129043
0.3036
0.0160898
0.304021
0.0177236
0.0215954
-0.296694
-0.263031
-0.259761
-0.272826
-0.209296
-0.32127
-0.171236
-0.301135
-0.128954
-0.347403
-0.0874548
-0.3425
-0.047666
-0.348674
-0.0100485
-0.346812
0.0250436
-0.340182
0.0572781
-0.328829
0.0864171
-0.313189
0.112334
-0.293917
0.135023
-0.271827
0.154593
-0.247828
0.171249
-0.222839
0.185264
-0.197716
0.19695
-0.173192
0.206631
-0.149848
0.214618
-0.128104
0.221199
-0.108234
0.226632
-0.0903684
0.231136
-0.0745508
0.234899
-0.0607182
0.238074
-0.0487814
0.240791
-0.0385678
0.24315
-0.0299383
0.245237
-0.0226638
0.247114
-0.0166119
0.248832
-0.0115204
0.250426
-0.00730373
0.251917
-0.0036719
0.253327
-0.000603548
0.254645
0.00219193
0.255889
0.00474058
0.257016
0.00715861
0.25803
0.00981964
0.258898
0.0120366
0.259514
0.0154734
0.260032
0.0172059
0.0216475
-0.32105
-0.307234
-0.284102
-0.309774
-0.230603
-0.374769
-0.18732
-0.344417
-0.144994
-0.38973
-0.102447
-0.385047
-0.062755
-0.388366
-0.0256894
-0.383877
0.00839413
-0.374266
0.0392753
-0.35971
0.0668194
-0.340733
0.0909934
-0.31809
0.111876
-0.292709
0.129649
-0.2656
0.144578
-0.237768
0.156981
-0.21012
0.167202
-0.183412
0.175578
-0.158225
0.182428
-0.134954
0.188034
-0.11384
0.192644
-0.0949779
0.196462
-0.0783693
0.199662
-0.0639183
0.202381
-0.0515007
0.204734
-0.0409208
0.206808
-0.0320117
0.208675
-0.0245306
0.210385
-0.0183227
0.211982
-0.0131173
0.213492
-0.00881316
0.214929
-0.00510878
0.216308
-0.00198245
0.217612
0.000887252
0.218859
0.00349336
0.219994
0.0060239
0.221035
0.00877858
0.221914
0.0111582
0.222572
0.0148146
0.223099
0.0166795
0.0216713
-0.337208
-0.357377
-0.299168
-0.347813
-0.245662
-0.428276
-0.196942
-0.393137
-0.154346
-0.432326
-0.111332
-0.428061
-0.0720365
-0.427661
-0.0358332
-0.420081
-0.00300728
-0.407092
0.0263386
-0.389056
0.0521761
-0.366571
0.0745634
-0.340478
0.093656
-0.311801
0.109699
-0.281644
0.123006
-0.251075
0.133928
-0.221042
0.142826
-0.19231
0.150044
-0.165443
0.155897
-0.140807
0.160657
-0.1186
0.164557
-0.0988784
0.167788
-0.0815999
0.170505
-0.0666357
0.172832
-0.0538274
0.174869
-0.0429572
0.176689
-0.0338325
0.178356
-0.0261974
0.179911
-0.0198772
0.181386
-0.014593
0.182803
-0.0102294
0.184168
-0.00647448
0.185493
-0.00330679
0.186754
-0.000374415
0.187969
0.00227923
0.189071
0.00492182
0.190091
0.00775842
0.190931
0.0103182
0.191579
0.0141668
0.192056
0.0162024
0.0217152
-0.347544
-0.414482
-0.30561
-0.389748
-0.254033
-0.479853
-0.201251
-0.445919
-0.158104
-0.475473
-0.115197
-0.470968
-0.0766038
-0.466254
-0.0415809
-0.455104
-0.0102522
-0.438421
0.017394
-0.416702
0.0414328
-0.39061
0.0620073
-0.361052
0.0793402
-0.329134
0.0937277
-0.296031
0.105518
-0.262865
0.115083
-0.230607
0.122791
-0.200017
0.128983
-0.171635
0.133964
-0.145788
0.137992
-0.122629
0.141283
-0.10217
0.144011
-0.0843275
0.146315
-0.0689399
0.148304
-0.0558166
0.150066
-0.044719
0.151664
-0.0354305
0.153151
-0.027684
0.154559
-0.0212856
0.155916
-0.0159501
0.157235
-0.0115481
0.158519
-0.00775872
0.159773
-0.00456044
0.160971
-0.00157296
0.162127
0.00112394
0.163169
0.0038795
0.164135
0.00679232
0.164905
0.00954807
0.165507
0.0135653
0.1659
0.0158094
0.0218045
-0.353979
-0.477924
-0.30543
-0.438297
-0.255926
-0.529358
-0.20106
-0.500786
-0.157331
-0.519201
-0.115048
-0.513251
-0.0774641
-0.503838
-0.0439071
-0.488661
-0.0142852
-0.468042
0.0115298
-0.442517
0.0337084
-0.412788
0.0524687
-0.379813
0.0680892
-0.344755
0.0809043
-0.308846
0.0912853
-0.273246
0.0996133
-0.238935
0.106254
-0.206658
0.111541
-0.176921
0.115761
-0.150008
0.119157
-0.126024
0.121925
-0.104938
0.124223
-0.0866247
0.126173
-0.0708907
0.127873
-0.057516
0.129396
-0.0462426
0.130799
-0.0368328
0.132123
-0.0290085
0.133397
-0.022559
0.134639
-0.017193
0.135859
-0.012768
0.137056
-0.00895555
0.138229
-0.00573297
0.139351
-0.00269512
0.14043
4.48474e-05
0.141395
0.00291446
0.142285
0.00590225
0.142967
0.00886613
0.143501
0.0130315
0.143792
0.0155178
0.0219489
-0.357265
-0.545163
-0.300816
-0.494745
-0.252419
-0.577755
-0.197117
-0.556087
-0.153011
-0.563307
-0.111794
-0.554469
-0.0755227
-0.540109
-0.0436664
-0.520517
-0.0159155
-0.495793
0.00797939
-0.466412
0.0282736
-0.433083
0.0452476
-0.396787
0.0592224
-0.358729
0.0705587
-0.320183
0.0796397
-0.282327
0.0868464
-0.246142
0.0925357
-0.212348
0.0970248
-0.18141
0.100584
-0.153567
0.103434
-0.128875
0.105754
-0.107258
0.107684
-0.0885544
0.109333
-0.0725395
0.110783
-0.0589666
0.112101
-0.0475601
0.113331
-0.038063
0.11451
-0.0301878
0.115659
-0.0237081
0.116793
-0.0183272
0.117916
-0.0138901
0.119022
-0.0100623
0.120108
-0.00681842
0.121145
-0.00373283
0.122138
-0.00094737
0.123015
0.00203681
0.123816
0.0051012
0.124402
0.00828055
0.124857
0.0125765
0.125043
0.0153319
0.0221472
-0.357393
-0.612443
-0.293262
-0.558875
-0.244845
-0.626172
-0.190192
-0.61074
-0.146007
-0.607493
-0.106201
-0.594275
-0.0715477
-0.574762
-0.0415825
-0.550482
-0.0158181
-0.521558
0.00611197
-0.488342
0.0245348
-0.451505
0.0397782
-0.41203
0.0521926
-0.371144
0.0621533
-0.330143
0.0700457
-0.29022
0.0762432
-0.252339
0.0810879
-0.217193
0.084878
-0.1852
0.0878627
-0.156551
0.0902437
-0.131256
0.0921805
-0.109195
0.0937965
-0.0901704
0.0951873
-0.0739303
0.0964244
-0.0602036
0.0975632
-0.0486989
0.0986424
-0.0391422
0.0996917
-0.0312371
0.100727
-0.0247432
0.101759
-0.0193588
0.102786
-0.0149171
0.103802
-0.0110788
0.104798
-0.00781431
0.105747
-0.00468217
0.106647
-0.00184735
0.107433
0.00125097
0.108139
0.00439515
0.108628
0.00779219
0.109
0.0122036
0.109085
0.015247
0.0223924
-0.354048
-0.676078
-0.283527
-0.629396
-0.234109
-0.675591
-0.180817
-0.664032
-0.136977
-0.651333
-0.098873
-0.632379
-0.0661375
-0.607498
-0.0382259
-0.578394
-0.0145234
-0.54526
0.00543344
-0.508299
0.0220266
-0.468099
0.0356157
-0.425619
0.0465675
-0.382096
0.0552615
-0.338837
0.0620766
-0.297035
0.0673726
-0.257635
0.0714725
-0.221292
0.074653
-0.188381
0.0771417
-0.15904
0.0791201
-0.133234
0.0807295
-0.110804
0.0820781
-0.091519
0.0832487
-0.0751009
0.0843025
-0.0612575
0.0852867
-0.0496831
0.0862333
-0.0400888
0.0871664
-0.0321702
0.0880975
-0.0256743
0.0890332
-0.0202945
0.089969
-0.015853
0.0908968
-0.0120066
0.0918034
-0.00872082
0.0926636
-0.0055424
0.0934701
-0.0026539
0.094164
0.000557084
0.0947746
0.00378462
0.09517
0.00739678
0.0954627
0.0119109
0.095457
0.0152526
0.0226739
-0.346664
-0.734252
-0.271955
-0.704105
-0.220616
-0.72693
-0.169188
-0.71546
-0.126363
-0.694157
-0.0902708
-0.668471
-0.0597297
-0.638039
-0.0340122
-0.604111
-0.0124171
-0.566855
0.0055835
-0.5263
0.0204065
-0.482921
0.0324278
-0.43764
0.0420189
-0.391687
0.0495538
-0.346372
0.0553985
-0.30288
0.0598935
-0.26213
0.0633399
-0.224739
0.0659913
-0.191032
0.0680534
-0.161102
0.0696875
-0.134868
0.0710182
-0.112135
0.0721394
-0.0926402
0.0731223
-0.0760837
0.0740191
-0.0621543
0.0748693
-0.0505334
0.0756996
-0.0409191
0.076529
-0.0329996
0.0773652
-0.0265105
0.0782115
-0.0211408
0.0790609
-0.0167023
0.079903
-0.0128488
0.0807224
-0.0095402
0.0814953
-0.00631528
0.0822104
-0.00336903
0.0828154
-4.78906e-05
0.0833338
0.00326621
0.0836438
0.00708681
0.0838621
0.0116925
0.0837795
0.0153352
0.0229804
-0.334922
-0.78841
-0.258431
-0.780596
-0.204617
-0.780745
-0.155504
-0.764572
-0.114551
-0.735111
-0.0808051
-0.702217
-0.0526794
-0.666165
-0.0292569
-0.627534
-0.00978157
-0.586331
0.00630393
-0.542385
0.0194305
-0.496048
0.0299766
-0.448186
0.0383079
-0.400018
0.0447861
-0.35285
0.0497584
-0.307852
0.0535431
-0.265915
0.0564169
-0.227613
0.0586097
-0.193225
0.0603051
-0.162798
0.0616455
-0.136209
0.0627392
-0.113229
0.0636672
-0.0935682
0.0644902
-0.0769067
0.0652524
-0.0629165
0.0659868
-0.0512678
0.066715
-0.0416473
0.0674518
-0.0337363
0.0682018
-0.0272606
0.0689654
-0.0219044
0.0697333
-0.0174702
0.070494
-0.0136095
0.07123
-0.0102762
0.0719191
-0.00700438
0.0725471
-0.003997
0.0730683
-0.000569153
0.0735008
0.00283377
0.0737347
0.00685289
0.0738865
0.0115407
0.0737418
0.01548
0.0233012
-0.318684
-0.844418
-0.242777
-0.856503
-0.186714
-0.836808
-0.140498
-0.810789
-0.102121
-0.773487
-0.0709875
-0.73335
-0.0453919
-0.69176
-0.0242821
-0.648643
-0.00688223
-0.603731
0.0073686
-0.556636
0.0188975
-0.507577
0.0280745
-0.457363
0.035252
-0.407196
0.0407737
-0.358372
0.0449655
-0.312044
0.0481213
-0.269071
0.0504932
-0.229985
0.0522876
-0.195019
0.053667
-0.164177
0.0547558
-0.137297
0.0556473
-0.11412
0.0564106
-0.0943315
0.057097
-0.0775931
0.0577436
-0.0635631
0.0583774
-0.0519016
0.0590158
-0.0422857
0.0596698
-0.0343903
0.0603416
-0.0279324
0.0610288
-0.0225916
0.0617208
-0.0181622
0.0624048
-0.0142934
0.0630622
-0.0109337
0.0636724
-0.00761457
0.064219
-0.00454362
0.0646632
-0.00101328
0.0650174
0.00247951
0.0651854
0.00668493
0.0652796
0.0114465
0.0650872
0.0156724
0.0236268
-0.295445
-0.919164
-0.225329
-0.926618
-0.169116
-0.893021
-0.125763
-0.854142
-0.0902067
-0.809044
-0.0616874
-0.76187
-0.0385147
-0.714933
-0.0195774
-0.667581
-0.00410111
-0.619207
0.00847095
-0.569208
0.0185541
-0.51766
0.0265049
-0.465314
0.0326587
-0.413349
0.0373389
-0.363052
0.0408486
-0.315553
0.0434581
-0.27168
0.0453961
-0.231923
0.0468473
-0.196471
0.0479554
-0.165285
0.0488285
-0.13817
0.0495469
-0.114839
0.0501691
-0.0949537
0.0507379
-0.078162
0.0512843
-0.0641094
0.0518301
-0.0524473
0.0523891
-0.0428447
0.0529687
-0.03497
0.0535694
-0.028533
0.0541862
-0.0232084
0.0548077
-0.0187838
0.05542
-0.0149057
0.0560044
-0.0115181
0.0565413
-0.00815144
0.0570132
-0.00501555
0.0573876
-0.00138771
0.057672
0.00219511
0.0577845
0.00657251
0.0578301
0.0114008
0.0576025
0.0159001
0.0239484
0.046784
-0.942627
0.0681598
-0.947994
0.0794303
-0.904291
0.0847455
-0.859457
0.0866109
-0.810909
0.0860468
-0.761306
0.0839588
-0.712845
0.0807248
-0.664347
0.0766102
-0.615092
0.0718276
-0.564425
0.0666095
-0.512442
0.0612107
-0.459915
0.0558795
-0.408018
0.050827
-0.358
0.046208
-0.310934
0.0421159
-0.267588
0.0385896
-0.228396
0.0356262
-0.193507
0.0331947
-0.162854
0.0312476
-0.136223
0.0297301
-0.113321
0.0285863
-0.09381
0.027763
-0.0773387
0.0272111
-0.0635576
0.0268868
-0.052123
0.026751
-0.042709
0.0267689
-0.0349879
0.0269097
-0.0286738
0.0271453
-0.0234439
0.0274503
-0.0190888
0.0278026
-0.0152579
0.0281812
-0.0118967
0.0285692
-0.00853945
0.028951
-0.00539731
0.0293093
-0.00174597
0.0296441
0.00186026
0.029916
0.00630061
0.0301836
0.0111332
0.0303273
0.0157563
0.0238048
0.0546583
-0.972557
0.0701004
-0.963436
0.0799833
-0.914174
0.0838202
-0.863294
0.0850134
-0.812102
0.0840931
-0.760385
0.0818443
-0.710596
0.078587
-0.661089
0.0745273
-0.611033
0.0698583
-0.559756
0.0647966
-0.50738
0.0595833
-0.454702
0.0544524
-0.402887
0.0496013
-0.353149
0.0451732
-0.306506
0.0412537
-0.263668
0.0378772
-0.22502
0.0350391
-0.190669
0.032709
-0.160523
0.0308411
-0.134355
0.0293834
-0.111863
0.0282826
-0.0927093
0.027488
-0.0765441
0.0269531
-0.0630227
0.0266359
-0.0518057
0.026499
-0.0425721
0.0265088
-0.0349977
0.0266353
-0.0288003
0.026851
-0.0236596
0.0271308
-0.0193686
0.0274526
-0.0155798
0.0277956
-0.0122397
0.028143
-0.00888684
0.0284788
-0.00573312
0.0287869
-0.00205412
0.0290665
0.00158069
0.0292805
0.00608661
0.0294871
0.0109267
0.0295661
0.0156773
0.0237177
0.0531617
-1.00025
0.0674404
-0.977715
0.0770321
-0.923766
0.0808243
-0.867086
0.0820207
-0.813299
0.0812513
-0.759616
0.0791605
-0.708505
0.0760876
-0.658017
0.0722173
-0.607162
0.0677449
-0.555284
0.0628869
-0.502522
0.0578828
-0.449698
0.0529619
-0.397966
0.0483152
-0.348502
0.0440792
-0.30227
0.0403335
-0.259923
0.0371089
-0.221795
0.034399
-0.187959
0.0321735
-0.158298
0.0303884
-0.13257
0.0289935
-0.110469
0.0279386
-0.0916543
0.0271753
-0.0757808
0.0266597
-0.0625071
0.0263517
-0.0514977
0.0262157
-0.0424361
0.0262194
-0.0350014
0.0263335
-0.0289145
0.0265312
-0.0238573
0.0267878
-0.0196252
0.0270812
-0.0158732
0.0273907
-0.0125492
0.0276999
-0.00919605
0.0279925
-0.00602569
0.0282536
-0.00231522
0.0284815
0.00135284
0.0286417
0.0059264
0.0287918
0.0107765
0.0288119
0.0156572
0.023682
0.0538155
-1.02703
0.0666563
-0.990556
0.0750249
-0.932135
0.0784212
-0.870482
0.079327
-0.814204
0.0785433
-0.758832
0.0765176
-0.70648
0.0735769
-0.655076
0.0698742
-0.60346
0.0655938
-0.551004
0.0609449
-0.497873
0.0561587
-0.444912
0.0514557
-0.393263
0.0470183
-0.344065
0.0429759
-0.298228
0.0394031
-0.25635
0.0363277
-0.21872
0.0337428
-0.185375
0.0316189
-0.156174
0.0299137
-0.130865
0.0285797
-0.109135
0.027569
-0.0906436
0.0268361
-0.0750479
0.0263393
-0.0620102
0.0260406
-0.051199
0.025906
-0.0423015
0.0259043
-0.0349997
0.0260072
-0.0290174
0.0261883
-0.0240384
0.0264231
-0.01986
0.02669
-0.0161401
0.026968
-0.0128272
0.0272413
-0.00946933
0.0274932
-0.0062776
0.0277102
-0.00253223
0.0278897
0.00117333
0.0280002
0.00581591
0.0280984
0.0106784
0.028065
0.0156906
0.0236925
0.0523693
-1.05153
0.0645943
-1.00278
0.072243
-0.939783
0.0755853
-0.873825
0.0764124
-0.815032
0.0757115
-0.758131
0.0738073
-0.704575
0.0710208
-0.652289
0.0674947
-0.599933
0.063409
-0.546918
0.0589702
-0.493434
0.0544032
-0.440345
0.0499203
-0.38878
0.045695
-0.339839
0.0418486
-0.294381
0.0384502
-0.252952
0.0355249
-0.215794
0.0330651
-0.182915
0.0310423
-0.154151
0.0294162
-0.129239
0.0281421
-0.10786
0.027175
-0.0896765
0.026472
-0.0743449
0.0259938
-0.061532
0.0257045
-0.0509097
0.0255717
-0.0421687
0.0255654
-0.0349934
0.0256581
-0.02911
0.0258238
-0.0242042
0.0260384
-0.0200745
0.0262803
-0.0163821
0.0265287
-0.0130755
0.0267682
-0.00970878
0.0269818
-0.00649128
0.0271576
-0.00270799
0.027292
0.00103888
0.0273567
0.00575122
0.0274071
0.010628
0.0273256
0.0157721
0.0237441
0.0514787
-1.07423
0.0629116
-1.01421
0.0696835
-0.946555
0.072816
-0.876957
0.0735247
-0.81574
0.0728636
-0.75747
0.0710699
-0.702782
0.0684312
-0.649651
0.0650812
-0.596583
0.0611913
-0.543028
0.0569636
-0.489207
0.0526165
-0.435998
0.0483539
-0.384518
0.0443404
-0.335826
0.0406901
-0.290731
0.0374668
-0.249728
0.0346922
-0.21302
0.0323583
-0.180581
0.0304372
-0.15223
0.028891
-0.127693
0.0276774
-0.106647
0.0267544
-0.0887535
0.0260818
-0.0736724
0.0256229
-0.0610731
0.0253438
-0.0506305
0.0252136
-0.0420386
0.0252037
-0.0349835
0.0252873
-0.0291936
0.0254389
-0.0243558
0.0256346
-0.0202702
0.0258533
-0.0166007
0.0260738
-0.0132961
0.0262815
-0.00991646
0.0264593
-0.00666911
0.0265966
-0.00284524
0.0266892
0.000946309
0.0267119
0.00572849
0.0267187
0.0106212
0.0265942
0.0158966
0.0238317
0.0500988
-1.09495
0.0608366
-1.02495
0.0669508
-0.952669
0.0699201
-0.879926
0.0705786
-0.816399
0.0699692
-0.756861
0.0682955
-0.701108
0.0658068
-0.647162
0.0626344
-0.593411
0.0589418
-0.539335
0.0549268
-0.485192
0.0508005
-0.431872
0.0467583
-0.380476
0.0429564
-0.332024
0.0395016
-0.287276
0.0364527
-0.246679
0.0338289
-0.210396
0.0316211
-0.178373
0.0298025
-0.150411
0.028337
-0.126227
0.0271849
-0.105495
0.026307
-0.0878756
0.0256659
-0.0730312
0.0252271
-0.0606344
0.0249592
-0.0503625
0.0248327
-0.0419122
0.0248204
-0.0349711
0.024896
-0.0292692
0.0250349
-0.0244947
0.0252132
-0.0204485
0.02541
-0.0167975
0.0256045
-0.0134907
0.0257824
-0.0100944
0.0259267
-0.00681338
0.0260281
-0.00294664
0.0260819
0.000892508
0.0260664
0.00574401
0.0260336
0.010654
0.0258711
0.0160591
0.0239508
0.0488167
-1.11386
0.058768
-1.0349
0.0642449
-0.958146
0.0669938
-0.882675
0.0676069
-0.817012
0.0670415
-0.756295
0.0654868
-0.699553
0.0631488
-0.644824
0.0601553
-0.590417
0.0566621
-0.535842
0.0528616
-0.481391
0.0489573
-0.427967
0.0451358
-0.376654
0.041545
-0.328433
0.038285
-0.284016
0.0354098
-0.243804
0.0329362
-0.207922
0.0308545
-0.176291
0.0291388
-0.148696
0.0277547
-0.124843
0.0266652
-0.104405
0.0258334
-0.0870438
0.0252248
-0.0724226
0.0248075
-0.060217
0.0245518
-0.0501068
0.0244302
-0.0417906
0.0244165
-0.0349574
0.0244855
-0.0293382
0.0246129
-0.0246221
0.0247751
-0.0206108
0.0249517
-0.0169741
0.0251219
-0.0136608
0.0252719
-0.0102444
0.0253848
-0.00692631
0.025453
-0.00301478
0.025471
0.000874457
0.0254208
0.00579419
0.0253523
0.0107225
0.0251568
0.0162547
0.0240967
0.0473674
-1.13096
0.056532
-1.04407
0.0614687
-0.963083
0.0640049
-0.885211
0.0645937
-0.817601
0.0640771
-0.755779
0.0626431
-0.698119
0.0604579
-0.642639
0.0576453
-0.587605
0.0543538
-0.532551
0.0507699
-0.477807
0.0470889
-0.424286
0.0434885
-0.373054
0.0401086
-0.325053
0.0370425
-0.28095
0.0343401
-0.241102
0.0320159
-0.205598
0.03006
-0.174335
0.0284473
-0.147083
0.0271453
-0.123541
0.0261191
-0.103379
0.0253346
-0.0862593
0.0247597
-0.0718477
0.0243649
-0.0598222
0.0241227
-0.0498646
0.0240072
-0.0416752
0.0239935
-0.0349437
0.024057
-0.0294018
0.0241742
-0.0247393
0.0243218
-0.0207584
0.0244795
-0.0171319
0.024627
-0.0138083
0.024751
-0.0103683
0.0248347
-0.00701006
0.0248721
-0.00305216
0.0248573
0.000889217
0.024776
0.00587552
0.0246755
0.010823
0.0244516
0.0164786
0.024265
0.0458918
-1.14629
0.0542357
-1.05241
0.0586635
-0.967511
0.0609761
-0.887524
0.061544
-0.818169
0.0610786
-0.755313
0.0597654
-0.696806
0.0577352
-0.640609
0.0551058
-0.584975
0.0520188
-0.529464
0.0486538
-0.474442
0.0451974
-0.42083
0.0418188
-0.369675
0.0386494
-0.321884
0.0357764
-0.278077
0.0332457
-0.238571
0.0310701
-0.203423
0.0292393
-0.172505
0.0277295
-0.145573
0.0265099
-0.122322
0.0255478
-0.102417
0.0248116
-0.0855231
0.0242716
-0.0713078
0.0239007
-0.0594513
0.0236732
-0.0496371
0.023565
-0.041567
0.0235524
-0.034931
0.0236118
-0.0294611
0.02372
-0.0248475
0.0238542
-0.0208926
0.0239946
-0.0172723
0.0241209
-0.0139346
0.0242207
-0.010468
0.0242773
-0.00706672
0.0242864
-0.00306121
0.0242417
0.000933924
0.0241325
0.00598464
0.0240038
0.0109517
0.023756
0.0167263
0.0244515
0.0443265
-1.15988
0.0518443
-1.05993
0.0558062
-0.971473
0.0579038
-0.889622
0.0584554
-0.81872
0.0580462
-0.754904
0.0568545
-0.695614
0.054982
-0.638736
0.0525385
-0.582532
0.049659
-0.526584
0.0465152
-0.471299
0.0432852
-0.4176
0.0401288
-0.366519
0.0371696
-0.318925
0.034489
-0.275397
0.032129
-0.236211
0.0301009
-0.201394
0.0283947
-0.170798
0.0269874
-0.144166
0.0258504
-0.121184
0.024953
-0.10152
0.0242659
-0.0848361
0.0237619
-0.0708038
0.023416
-0.0591053
0.0232045
-0.0494257
0.0231049
-0.0414674
0.0230946
-0.0349208
0.023151
-0.0295175
0.0232515
-0.024948
0.0233737
-0.0210148
0.0234981
-0.0173966
0.0236048
-0.0140413
0.023682
-0.0105452
0.0237136
-0.00709833
0.0236967
-0.00304428
0.0236248
0.00100579
0.0234912
0.00611829
0.0233376
0.0111053
0.0230704
0.0169935
0.0246523
0.042711
-1.17174
0.0493904
-1.06661
0.0529071
-0.974989
0.0547947
-0.891509
0.0553299
-0.819255
0.0549809
-0.754555
0.0539117
-0.694545
0.0521996
-0.637024
0.0499452
-0.580278
0.0472764
-0.523916
0.0443564
-0.468379
0.0413543
-0.414598
0.0384208
-0.363585
0.0356717
-0.316176
0.0331826
-0.272908
0.0309922
-0.234021
0.0291107
-0.199513
0.0275281
-0.169216
0.0262231
-0.142861
0.0251685
-0.12013
0.0243362
-0.100687
0.023699
-0.0841989
0.023232
-0.0703367
0.0229122
-0.0587855
0.0227178
-0.0492313
0.022628
-0.0413776
0.0226213
-0.0349141
0.0226759
-0.0295721
0.0227699
-0.0250421
0.0228813
-0.0211262
0.0229911
-0.0175064
0.0230797
-0.0141299
0.023136
-0.0106016
0.0231446
-0.00710687
0.023104
-0.00300368
0.0230076
0.00110211
0.0228526
0.00627332
0.0226776
0.0112803
0.0223951
0.017276
0.0248637
0.0410335
-1.1819
0.0468705
-1.07245
0.0499627
-0.978081
0.0516495
-0.893196
0.0521684
-0.819774
0.0518836
-0.754271
0.0509383
-0.6936
0.0493896
-0.635475
0.0473277
-0.578216
0.0448729
-0.521461
0.0421795
-0.465685
0.0394069
-0.411825
0.0366969
-0.360875
0.0341577
-0.313637
0.0318593
-0.270609
0.0298377
-0.231999
0.0281016
-0.197777
0.0266419
-0.167756
0.0254385
-0.141657
0.0244663
-0.119158
0.0236993
-0.0999203
0.0231127
-0.0836122
0.0226834
-0.0699075
0.0223907
-0.0584927
0.0222147
-0.0490553
0.0221358
-0.0412987
0.0221338
-0.0349121
0.0221878
-0.0296261
0.0222765
-0.0251307
0.0223783
-0.021228
0.0224746
-0.0176027
0.0225466
-0.0142019
0.0225837
-0.0106387
0.0225711
-0.00709427
0.0225091
-0.00294162
0.0223909
0.00122025
0.0222176
0.0064467
0.0220244
0.0114734
0.0217306
0.0175698
0.0250821
0.0393085
-1.19037
0.0442976
-1.07743
0.0469774
-0.980761
0.0484713
-0.89469
0.048973
-0.820276
0.0487554
-0.754053
0.0479358
-0.69278
0.0465536
-0.634093
0.0446879
-0.57635
0.0424505
-0.519223
0.0399864
-0.463221
0.0374452
-0.409284
0.0349593
-0.358389
0.0326298
-0.311307
0.0305215
-0.268501
0.0286675
-0.230145
0.027076
-0.196185
0.0257383
-0.166419
0.024636
-0.140555
0.0237459
-0.118268
0.0230443
-0.0992188
0.0225086
-0.0830764
0.0221178
-0.0695167
0.0218531
-0.0582281
0.0216964
-0.0488985
0.0216294
-0.0412317
0.0216333
-0.0349159
0.0216877
-0.0296806
0.0217722
-0.0252152
0.0218656
-0.0213214
0.0219499
-0.017687
0.0220066
-0.0142586
0.0220262
-0.0106583
0.0219943
-0.00706241
0.021913
-0.00286027
0.0217756
0.00135765
0.0215867
0.00663552
0.0213786
0.0116816
0.0210772
0.0178712
0.0253043
0.0375373
-1.19717
0.0416755
-1.08157
0.0439524
-0.983038
0.0452614
-0.895999
0.0457452
-0.82076
0.0455974
-0.753905
0.0449056
-0.692088
0.0436933
-0.632881
0.0420274
-0.574684
0.0400111
-0.517207
0.0377791
-0.460989
0.035471
-0.406976
0.0332101
-0.356128
0.03109
-0.309187
0.0291712
-0.266582
0.027484
-0.228458
0.026036
-0.194737
0.0248195
-0.165202
0.0238176
-0.139553
0.0230093
-0.11746
0.0223731
-0.0985826
0.0218886
-0.0825919
0.0215369
-0.069165
0.021301
-0.0579922
0.0211644
-0.0487619
0.0211104
-0.0411777
0.0211211
-0.0349265
0.0211771
-0.0297366
0.0212584
-0.0252966
0.0213445
-0.0214075
0.0214179
-0.0177604
0.0214608
-0.0143015
0.0214643
-0.0106619
0.021415
-0.00701314
0.0213165
-0.00276175
0.0211624
0.00151182
0.0209609
0.00683701
0.0207406
0.0119019
0.0204352
0.0181766
0.0255271
0.035728
-1.20232
0.0390122
-1.08486
0.0408915
-0.984918
0.0420217
-0.897129
0.0424869
-0.821225
0.0424109
-0.753829
0.0418493
-0.691527
0.04081
-0.631842
0.039348
-0.573222
0.0375564
-0.515415
0.0355594
-0.458992
0.0334861
-0.404902
0.0314509
-0.354093
0.0295404
-0.307276
0.0278103
-0.264852
0.026289
-0.226937
0.0249837
-0.193432
0.0238876
-0.164106
0.0229854
-0.138651
0.0222586
-0.116733
0.0216877
-0.0980117
0.0212545
-0.0821587
0.0209423
-0.0688528
0.0207359
-0.0577857
0.0206202
-0.0486463
0.0205801
-0.0411376
0.0205984
-0.0349449
0.0206569
-0.0297951
0.0207361
-0.0253758
0.0208161
-0.0214874
0.0208798
-0.0178241
0.0209101
-0.0143318
0.0208992
-0.0106509
0.0208343
-0.00694824
0.0207206
-0.00264811
0.0205521
0.00168037
0.0203406
0.00704849
0.0201112
0.0121313
0.0198051
0.0184827
0.0257478
0.0338841
-1.20585
0.036313
-1.08729
0.0377977
-0.986402
0.0387541
-0.898085
0.0391998
-0.821671
0.0391969
-0.753826
0.038768
-0.691098
0.0379053
-0.630979
0.0366511
-0.571968
0.035088
-0.513852
0.0333289
-0.457233
0.0314924
-0.403066
0.0296836
-0.352284
0.0279826
-0.305575
0.0264408
-0.26331
0.0250846
-0.22558
0.0239211
-0.192269
0.0229445
-0.163129
0.0221416
-0.137848
0.0214958
-0.116087
0.02099
-0.097506
0.0206083
-0.0817769
0.0203359
-0.0685804
0.0201593
-0.0576092
0.0200653
-0.0485523
0.0200397
-0.041112
0.0200667
-0.0349719
0.0201286
-0.029857
0.0202066
-0.0254538
0.0202814
-0.0215622
0.0203366
-0.0178793
0.0203557
-0.0143509
0.0203318
-0.010627
0.020253
-0.00686947
0.0201262
-0.00252132
0.0199456
0.00186097
0.0197267
0.00726743
0.0194908
0.0123672
0.0191872
0.0187863
0.0259637
0.0320079
-1.20776
0.0335824
-1.08886
0.0346745
-0.987494
0.0354606
-0.898871
0.0358858
-0.822096
0.0359568
-0.753897
0.0356631
-0.690804
0.0349805
-0.630296
0.0339382
-0.570925
0.0326073
-0.512522
0.031089
-0.455715
0.0294911
-0.401468
0.0279098
-0.350703
0.0264183
-0.304084
0.0250644
-0.261956
0.0238726
-0.224389
0.0228501
-0.191246
0.0219923
-0.162271
0.021288
-0.137144
0.0207227
-0.115522
0.0202819
-0.0970651
0.0199516
-0.0814466
0.0197192
-0.068348
0.019573
-0.057463
0.0195011
-0.0484805
0.0194908
-0.0411016
0.0195271
-0.0350083
0.0195932
-0.0299231
0.019671
-0.0255316
0.0197416
-0.0216328
0.0197894
-0.0179271
0.0197986
-0.0143601
0.0197631
-0.0105915
0.0196722
-0.00677853
0.0195341
-0.00238331
0.0193437
0.00205139
0.0191197
0.00749142
0.0188799
0.012607
0.0185817
0.0190846
0.0261726
0.0301
-1.20809
0.0308236
-1.08958
0.0315246
-0.988195
0.0321428
-0.89949
0.0325464
-0.822499
0.0326917
-0.754043
0.0325356
-0.690648
0.0320367
-0.629798
0.0312103
-0.570099
0.0301155
-0.511427
0.028841
-0.45444
0.0274837
-0.400111
0.0261306
-0.34935
0.024849
-0.302802
0.0236826
-0.26079
0.0226546
-0.223361
0.0217724
-0.190364
0.0210328
-0.161532
0.0204265
-0.136537
0.0199414
-0.115037
0.0195652
-0.096689
0.0192863
-0.0811677
0.019094
-0.0681557
0.0189784
-0.0573474
0.0189292
-0.0484312
0.0189347
-0.0411071
0.018981
-0.0350546
0.0190521
-0.0299942
0.0191304
-0.0256099
0.0191978
-0.0217002
0.0192392
-0.0179685
0.0192397
-0.0143606
0.0191941
-0.0105459
0.0190927
-0.00667708
0.0189453
-0.00223595
0.0187472
0.00224948
0.0185205
0.00771818
0.0182792
0.0128483
0.0179889
0.0193747
0.0263723
0.0281665
0.0280409
0.0283499
0.028802
0.0291828
0.0294025
0.0293864
0.0290748
0.0284685
0.0276135
0.0265859
0.0254711
0.0243475
0.0232759
0.0222968
0.0214322
0.0206897
0.0200677
0.0195589
0.0191536
0.0188418
0.0186142
0.018462
0.0183772
0.0183509
0.0183726
0.0184296
0.0185063
0.018586
0.0186511
0.0186872
0.0186802
0.0186258
0.0185155
0.0183605
0.0181568
0.0179294
0.017689
0.0174091
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<scalar>
80
(
-0.064125
-0.0689974
-0.0742232
-0.0798399
-0.0858811
-0.0923785
-0.0993659
-0.10688
-0.114961
-0.123651
-0.132997
-0.143047
-0.153856
-0.165481
-0.177985
-0.191435
-0.205903
-0.221469
-0.238217
-0.256239
-0.0353914
-0.0353871
-0.0353829
-0.0353791
-0.0353756
-0.0353726
-0.0353701
-0.0353682
-0.0353669
-0.0353662
-0.0353663
-0.0353671
-0.0353687
-0.035371
-0.0353741
-0.0353779
-0.0353826
-0.0353882
-0.0353953
-0.0354048
-0.0353618
-0.0353769
-0.0353883
-0.0353972
-0.0354043
-0.0354101
-0.0354146
-0.035418
-0.0354203
-0.0354216
-0.035422
-0.0354215
-0.0354201
-0.035418
-0.0354153
-0.0354121
-0.0354084
-0.0354044
-0.0354001
-0.0353957
-0.25564
-0.237633
-0.220881
-0.205304
-0.190823
-0.177366
-0.164862
-0.153247
-0.142456
-0.132433
-0.123121
-0.114469
-0.106429
-0.0989575
-0.0920122
-0.0855558
-0.0795534
-0.0739729
-0.0687862
-0.063975
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
80
(
0.0152536
0.0154217
0.0155239
0.0155555
0.0155138
0.0153979
0.0152095
0.0149544
0.0146433
0.0142929
0.0139274
0.0135788
0.0132867
0.0130966
0.0130556
0.0132068
0.0135815
0.0141923
0.0150292
0.0160665
0.0166668
0.016128
0.015604
0.0150948
0.0146003
0.0141203
0.0136549
0.0132038
0.0127668
0.0123438
0.0119346
0.0115388
0.0111563
0.0107869
0.0104302
0.0100861
0.00975412
0.00943409
0.00912572
0.00882873
0.0304709
0.0296532
0.0288476
0.0280545
0.027274
0.0265065
0.025752
0.0250109
0.0242833
0.0235695
0.0228696
0.0221837
0.0215122
0.020855
0.0202124
0.0195844
0.0189712
0.0183728
0.0177892
0.0172206
0.842951
0.756523
0.66264
0.571807
0.489462
0.417523
0.355964
0.30386
0.25998
0.223075
0.192012
0.16581
0.143648
0.124845
0.10884
0.0951756
0.083473
0.073421
0.0647616
0.0572808
)
;
}
top
{
type symmetryPlane;
value uniform 0;
}
bottom
{
type symmetryPlane;
value uniform 0;
}
cylinder
{
type calculated;
value nonuniform List<scalar>
160
(
-1.26723e-18
-9.49156e-19
-5.76e-18
3.95409e-18
5.56969e-18
1.61938e-17
-1.90059e-18
9.91098e-18
5.91938e-18
-1.03007e-18
-7.136e-18
2.6128e-17
2.27282e-17
1.87405e-17
2.07434e-17
-2.11392e-17
3.67771e-18
1.30912e-17
-2.28083e-17
2.10827e-17
4.46231e-19
1.16545e-19
5.17031e-18
7.23399e-18
6.86264e-18
-7.31934e-18
-5.60609e-18
-1.66175e-17
-3.20008e-17
1.10457e-17
-8.87709e-19
-1.45093e-17
-1.49462e-17
-1.64575e-17
-1.27289e-17
-4.65738e-18
1.70901e-17
-6.47295e-18
-2.8663e-18
-2.69136e-17
6.363e-18
2.8663e-18
8.25451e-19
1.73872e-17
2.03141e-17
2.25532e-17
1.64575e-17
1.49462e-17
4.76025e-17
8.87709e-19
-1.10457e-17
1.32159e-17
1.02476e-17
5.60609e-18
7.31934e-18
-6.86264e-18
-7.23399e-18
-5.17031e-18
-1.16545e-19
2.2359e-19
-6.67982e-19
9.49156e-19
5.76e-18
-3.95409e-18
-5.56969e-18
-1.61938e-17
1.90059e-18
-7.10169e-18
-5.91938e-18
1.03007e-18
7.136e-18
-2.6128e-17
-2.27282e-17
-1.87405e-17
5.38637e-18
-4.88309e-18
-3.61414e-18
-4.00645e-17
-4.94724e-18
-2.10827e-17
4.36443e-17
4.94724e-18
1.30912e-17
3.14969e-17
5.74975e-18
2.07434e-17
1.87405e-17
2.27282e-17
5.02558e-17
-7.136e-18
-1.03007e-18
1.71991e-17
9.91098e-18
-1.90059e-18
1.61938e-17
5.56969e-18
3.95409e-18
-5.76e-18
-9.49156e-19
-6.22162e-19
-2.69136e-17
-2.8663e-18
-3.42285e-17
1.70901e-17
-8.21528e-18
-1.27289e-17
-1.64575e-17
-1.49462e-17
-1.45093e-17
-8.87709e-19
1.10457e-17
-3.20008e-17
-1.02476e-17
-5.60609e-18
-7.31934e-18
6.86264e-18
7.23399e-18
5.17031e-18
1.16545e-19
4.46231e-19
2.2359e-19
-1.16545e-19
-5.17031e-18
-7.23399e-18
-6.86264e-18
7.31934e-18
5.60609e-18
1.02476e-17
3.20008e-17
-1.10457e-17
8.87709e-19
1.45093e-17
1.49462e-17
1.64575e-17
2.25532e-17
8.21528e-18
-3.8124e-17
8.25451e-19
-2.02821e-17
2.69136e-17
-2.10827e-17
-4.94724e-18
1.54467e-17
-3.61414e-18
2.11392e-17
5.38637e-18
-1.87405e-17
-2.27282e-17
-2.6128e-17
7.136e-18
1.03007e-18
-5.91938e-18
-9.91098e-18
1.90059e-18
-1.61938e-17
-5.56969e-18
-3.95409e-18
5.76e-18
9.49156e-19
-6.67982e-19
)
;
}
frontandback
{
type empty;
value nonuniform 0();
}
}
// ************************************************************************* //
| [
"danieler@login3.stampede2.tacc.utexas.edu"
] | danieler@login3.stampede2.tacc.utexas.edu | |
f0b890e880070b7cc13f19d1abf7143d7b6ea47f | 1d5d650014ac3dd142965906cf2b4fdbe34afb63 | /abc132/abc132_d.cpp | 243825a901a0014afbaab0bec2986fe8af82241d | [] | no_license | tks3210/Atcoder | c1b88654762273693bd41db417811169780c0161 | 593dda88e13f703bdb3b4c3e6d795bc425e29416 | refs/heads/master | 2021-07-02T17:46:00.099867 | 2020-12-19T07:57:14 | 2020-12-19T07:57:14 | 146,293,715 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,203 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll calcComb(int a, int b);
ll mod = 1000000007;
ll modpow(ll a, int p);
int main(){
int N, K;
cin >> N >> K;
ll ans;
for (int i = 1; i <= K ; i++)
{
ans = calcComb(N-K+1, i);
ans %= mod;
ans *= calcComb(K-1, i-1);
ans %= mod;
if (N - K + 1 < i) ans = 0;
cout << ans << endl;
}
}
//aCb
ll calcComb(int a, int b){
if (b > a-b) return calcComb(a,a-b);
ll ansMul =1;
ll ansDiv =1;
for(int i = 0; i < b; i++)
{
/* code */
ansMul *= (a-i);
ansDiv *= (i+1);
ansMul %= mod;
ansDiv %= mod;
}
//ansDivの逆元を使う。
ll ans = ansMul * modpow(ansDiv, mod -2) % mod;
return ans;
}
//aのp乗を求めるアルゴリズム
//p=62>31>30>15>14>7>6>3>2>1>0
//計算量はO(logp)になる。
ll modpow(ll a, int p){
if (p == 0) return 1;
if (p%2 == 0){
//p even
int halfP = p/2;
ll half = modpow(a, halfP);
//a^(p/2)をhalfとしてhalf*halfを計算
return half * half % mod;
}
else {
return a * modpow(a, p-1) % mod;
}
} | [
"fujinaga.3210.takashi@gmail.com"
] | fujinaga.3210.takashi@gmail.com |
ab5d24362faed0e80b65c9a2c72e70e00142b50e | 777a75e6ed0934c193aece9de4421f8d8db01aac | /src/Providers/UNIXProviders/DeviceErrorData/UNIX_DeviceErrorData_STUB.hxx | b851fb2d0f667bf621b8d2575c2350a1eba7756c | [
"MIT"
] | permissive | brunolauze/openpegasus-providers-old | 20fc13958016e35dc4d87f93d1999db0eae9010a | b00f1aad575bae144b8538bf57ba5fd5582a4ec7 | refs/heads/master | 2021-01-01T20:05:44.559362 | 2014-04-30T17:50:06 | 2014-04-30T17:50:06 | 19,132,738 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 125 | hxx | #ifdef PEGASUS_OS_STUB
#ifndef __UNIX_DEVICEERRORDATA_PRIVATE_H
#define __UNIX_DEVICEERRORDATA_PRIVATE_H
#endif
#endif
| [
"brunolauze@msn.com"
] | brunolauze@msn.com |
4c714454474c71fe937d228d68bcb5ae6263726e | d4ab7a4da5bb2843ea4737fcc1e1e7f638bad3b3 | /CodenameSideway/Source/Buffers/VertexBufferObject.cpp | cef01405243abc49ba690ababe45f28d00bff827 | [] | no_license | SudsyCoxx/CodenameSideway | c96d3b00f434f93b5bd8c9a3a3514a93d649d12f | 8144a34c6c444aa6e5c51b88dba0d4a8f84f084f | refs/heads/master | 2021-01-19T07:54:17.879576 | 2017-08-17T03:07:18 | 2017-08-17T03:07:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 799 | cpp | #include "VertexBufferObject.hpp"
#include <gl/glew.h>
using namespace Buffers;
VertexBufferObject::VertexBufferObject(unsigned int BufferType)
: m_buffer(0), m_type(BufferType), m_enabled(0)
{
genBuffer();
}
VertexBufferObject::~VertexBufferObject() {
glDeleteBuffers(1, &m_buffer);
}
void VertexBufferObject::bind() {
//if (!m_enabled) {
glBindBuffer(m_type, m_buffer);
m_enabled != m_enabled;
//}
}
void VertexBufferObject::unbind() {
//if (m_enabled) {
glBindBuffer(m_type, m_buffer);
m_enabled != m_enabled;
//}
}
void VertexBufferObject::bufferData(int Count, int SizeOfElement, void* Elements, GLuint DrawType) {
bind();
glBufferData(m_type, Count*SizeOfElement, Elements, DrawType);
unbind();
}
void VertexBufferObject::genBuffer() {
glGenBuffers(1, &m_buffer);
}
| [
"30988894+markclifton@users.noreply.github.com"
] | 30988894+markclifton@users.noreply.github.com |
7b68055d17e01717aff25529cc09470501f6e7b9 | 114669ad7490bb15dc7a0299a14e526bb28b8c1d | /Maths_Operations_Source_Files/math_utilities.cpp | e0265950f55010be39884f429378efc6665ba9ad | [] | no_license | KennyMacheka/MENG | 07705dae11fa97b7dfcbcf69e9d20a4e8c7255e2 | 9e5ea03f7b65786c105fb92561b059755d9e3e13 | refs/heads/master | 2020-04-03T17:00:44.229766 | 2018-10-30T18:03:16 | 2018-10-30T18:03:16 | 155,428,105 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,079 | cpp | #include "math_utilities.h"
#include <cmath>
#include <stdio.h>
//Function checks if number is technically an integer
bool isInteger (double n){
double roundingError = 0.00001;
/**If n is an integer, it will have no fractional part, so floor(n) will be equal to n
However, it's generally not a good idea to directly compare doubles,as there may be a
rounding error so they are not precisely the same at the machine level.
So I subtract the two and see if they are less than the rounding error, which I set
as 0.00001.
**/
if (std::abs(n - floor(n+0.5)) < roundingError)
return true;
return false;
}
//Function computes the highest common factor of two numbers using Euclid's algorithm
long long int gcd (long long int m, long long int n){
if (m < 0)
m *= -1;
if (n < 0)
n *= -1;
if (m<n){
int temp = n;
n = m;
m = temp;
}
if (n == 0)
return m;
//Recursive
return gcd (n, m%n);
}
double roundNumber (double number, int decimalPlaces){
/**
Work out decimal places of the number by increasingly multiplying by 10
Once we have an integer, that's the decimal places
If decimal places is less than target decimal place, return that number
**/
int i;
int decimalPlacesOfNumber = 0;
double temp = number;
double base = 1.0;
long long int rounder;
//Keep multiplying the decimal by 10 so the last unit digits becomes the number we check if it should be rounded
for (i = 0; i < decimalPlaces+1;i++){
temp *= 10;
if (isInteger(temp) && i < decimalPlaces)
return number;
}
rounder = (long long int) (temp) %10;
temp = floor( (temp/10.0) );
double divider = 1;
for (i = 0; i<decimalPlaces;i++){
divider /= 10;
temp /= 10;
}
if (rounder >= 5)
return temp + divider;
else
return temp;
}
| [
"knm512@yahoo.co.uk"
] | knm512@yahoo.co.uk |
95f0f3b96521c92315f8abbe755e9ad31c812335 | 7f3abfeeddec4a552c1d1c61bf433098be8f8fe7 | /UserUtils/PlotUtils/src/Pad1D_Plot.cc | e120e031d6788a8a54021498b44c7943c486fa87 | [
"MIT"
] | permissive | yihui-lai/HGCalTileSim | a2b81f996faf7713c8f7fa57b974947e3335a3d5 | 9e4da5837e47d6522391a30461b54dce360f52cc | refs/heads/master | 2022-06-08T22:10:00.770306 | 2021-06-10T21:35:26 | 2021-06-10T21:35:26 | 249,848,565 | 1 | 1 | null | 2020-03-25T00:23:42 | 2020-03-25T00:23:41 | null | UTF-8 | C++ | false | false | 27,620 | cc | /**
* @file Pad1D_Plot.cc
* @brief Implementing the data plotting functions.
* @author [Yi-Mu "Enoch" Chen](https://github.com/yimuchen)
*/
#ifdef CMSSW_GIT_HASH
#include "UserUtils/Common/interface/Maths.hpp"
#include "UserUtils/Common/interface/STLUtils/StringUtils.hpp"
#include "UserUtils/MathUtils/interface/Miscellaneous.hpp"
#include "UserUtils/PlotUtils/interface/Pad1D.hpp"
#else
#include "UserUtils/Common/Maths.hpp"
#include "UserUtils/Common/STLUtils/StringUtils.hpp"
#include "UserUtils/MathUtils/Miscellaneous.hpp"
#include "UserUtils/PlotUtils/Pad1D.hpp"
#endif
#include <limits>
#include <random>
#include "CmdSetAttr.hpp"
#include "TDecompChol.h"
#include "TFitResult.h"
#include "TGraphErrors.h"
#include "TList.h"
// static variables for new object generation
static const std::string genaxisname = "axishist";
namespace usr {
namespace plt {
/**
* Plotting 1D histograms accepts these options:
* - PlotType: Defining how the binned data should be represented on the pad,
* following types are supported
* - plottype::hist (default) - standard square curve/block diagram for
* displaying a diagram, equivalent to the `"HIST"` options provided in the
* TH1 object.
* - plottype::scatter - Plotting points with error bars. Complying to the CMS
* plotting convention with the horizontal error bar being suppressed for
* fixed bin-width data.
* - plottype::histstack - Stacking this histogram into the histogram stack on
* the Pad. If the stack doesn't already exist, a new stack is created. Note
* that all histograms in the stack will be plotted with the hist style and
* cannot be changed. Notice that the stack must be plotted consecutively,
* meaning that any non histstack options would cause the stack to be
* finalized and plotted onto the Pad.
* - plottype::histnewstack - Force the creation of the new histogram stack,
* used only if you are plotting two histogram stacks in the same Pad.
* - plottype::histerr - Drawing histogram uncertainty as a shaded box region.
* - Raw string: The user can use the ROOT style string options to define how
* the Histogram options should be plotted. The strings `"SAME"` and `"HIST"`
* would be handed by the functions and will be stripped.
*
* - EntryText: String to add in the legend entry. If this options is not
* present, then this object will NOT appear in the generated legend. Notice
* that the attributes to display in the legend would be generated from the
* PlotType used.
*
* - TrackY: Whether or not the y-axis range should be adjusted according to the
* newly added histogram. By default, only the max values of the histogram
* would be used.
*
* - PlotUnder: Specifying the that plot object be plotted underneath a specific
* object. Not that if the object specified in PlotUnder is not found in the
* pad, this option will have no effect and will raise no excpetions.
*
* One side note is that fitted functions will have its DrawOptions cleared from
* the histogram! The user should be the one explicitly invoking the plotting
* behavior, given more freedom to what the final plot will look like (See the
* Pad1D::PlotFunc() method for more details). This design aspect is in stark
* contrast with the design of ROOT objects. So beware of unwanted behaviour.
*/
TH1D&
Pad1D::PlotHist( TH1D& obj, const std::vector<RooCmdArg>& arglist )
{
// If TProfile is given, send to PlotProfile function instead
if( obj.InheritsFrom( TProfile::Class() ) ){
return PlotProfile( dynamic_cast<TProfile&>( obj ), arglist );
}
// Getting the flags
const RooArgContainer args( arglist, {
PlotType( hist ),
TrackY( TrackY::max ),
FillColor( 0, 0 )
} );
if( !GetAxisObject() ){
// MUST ust a clone, otherwise messes with THStack
TH1D& axisobj = MakeObj<TH1D>( obj );
axisobj.Reset();
axisobj.SetStats( 0 );
axisobj.SetTitle( "" );
axisobj.SetName( ( genaxisname+RandomString( 6 ) ).c_str() );
PlotObj( axisobj, "AXIS" );
this->SetAxisFont();
}
// Forcing no statistics. and wiping title
obj.SetStats( 0 );
obj.SetTitle( "" );
// Removing the poly marker from TSpectrum search function
TObject* polymarker = obj.GetListOfFunctions()->FindObject( "TPolyMarker" );
obj.GetListOfFunctions()->RecursiveRemove( polymarker );
// Forcing fit functions to not be drawn
for( const auto&& func : *( obj.GetListOfFunctions() ) ){
func->SetBit( TF1::kNotDraw, true );
}
// Running the draw commands.
const int pt = args.Get<PlotType>();
// Flushing the _working stack if hist is no longer used
if( pt != histstack && _workingstack ){
PlotObj( _workingstack, "HIST SAME NOCLEAR" );
_workingstack = nullptr;
}
// Plot case for different plot types
switch( pt ){
case plottype::hist:
PlotObj( obj, "HIST SAME" );
break;
case plottype::scatter:
obj.GetXaxis()->IsVariableBinSize() ?
PlotObj( obj, "P L E SAME" ) :
PlotObj( obj, "P E X0 SAME" );
break;
case plottype::histerr:
PlotObj( obj, "E2 SAME" );
break;
case plottype::histstack:
if( _workingstack == 0 ){
_workingstack = &MakeObj<THStack>(
( "stack" + RandomString( 12 ) ).c_str(), "" );
}
_workingstack->Add( &obj, "HIST" );
break;
case plottype::histnewstack:
_workingstack = &MakeObj<THStack>(
( "stack" + RandomString( 12 ) ).c_str(), "" );
_workingstack->Add( &obj, "HIST" );
break;
case plottype::plottype_dummy:
PlotObj( obj, ( args.Get<PlotType>().str()+" SAME" ).c_str() );
break;
default:
std::cerr << "Skipping over invalid value ("<< pt <<")" << std::endl;
}
if( _workingstack ){
TrackObjectY( *_workingstack, args.Get<TrackY>() );
} else {
TrackObjectY( obj, args.Get<TrackY>() );
}
// Adding legend
if( args.Has<EntryText>() ){
AddLegendEntry( obj, args.Get<EntryText>(), args.Get<PlotType>() );
}
// Moving to under something
if( args.Has<PlotUnder>() ){
if( _workingstack ){
PadBase::MoveTargetToBefore( *_workingstack, args.Get<PlotUnder>() );
} else {
PadBase::MoveTargetToBefore( obj, args.Get<PlotUnder>() );
}
}
SetLineAttr( obj, args );
SetFillAttr( obj, args );
SetMarkAttr( obj, args );
return obj;
}
/**
* @brief Plotting a TProfile object
*
* Due to inheritance between TProfile and the TH1D, the original PlotHist
* doesn't work with TProfile. Instead, this functions generates a new TH1D from
* the TProfile using the ProjectionX function. The return value would then be
* the newly generated histogram. So beware of unexpected behaviour.
*/
TH1D&
Pad1D::PlotProfile( TProfile& obj, const std::vector<RooCmdArg>& args )
{
// Generating new profile objects
TH1D* _newhist = obj.ProjectionX( usr::RandomString( 6 ).c_str(), "E" );
ClaimObject( _newhist );
return PlotHist( _newhist, args );
}
/**
* Plotting of the TGraph object has the following supporting options:
*
* - `PlotType`: Defining how the data should be represented on the Pad. The
* supported types are:
* - `plottype::simplefunc`(default): single polyline joining the data points.
* This is used if the graph represents a function sample.
* - `plottype::fittedfunc`: a polyline joining the data points with the Y
* error represented with a shaded region. This is used if the graph
* represents a function sample with additional sampling for fitting
* uncertainties
* - `plottype::scatter`: plotting the data as data points with error bars.
* Unlike the histograms, this would not attempt to adjust the x error bars.
*
* - EntryText: String to add in the legend entry. If this options is not
* present, then this object will NOT appear in the generated legend. Notice
* that the attributes to display in the legend would be generated from the
* PlotType used.
*
* - TrackY: Whether or not the y-axis range should be adjusted according to the
* newly added graph. By default, both the maximum and minimum will be tracked
* if this graph is the first thing to be plotted on the pad (excluding the
* histogram used for handling the axis), otherwise, nothing will be tracked.
*
* - PlotUnder: Specifying the that plot object be plotted underneath a specific
* object. Not that if the object specified in PlotUnder is not found in the
* pad, this option will have no effect and will raise no excpetions.
*
* One side note is that fitted functions will have its DrawOptions cleared from
* the histogram! The user should be the one explicitly invoking the plotting
*/
TGraph&
Pad1D::PlotGraph( TGraph& obj, const std::vector<RooCmdArg>& arglist )
{
// Early Exit for Graphs without any data points
if( obj.GetN() <= 0 ){
std::cerr << "Cannot plot TGraphs with no data points!" << std::endl;
return obj;
}
// Getting the flags
const RooArgContainer args( arglist,
{
PlotType( simplefunc ),
!GetAxisObject() ? TrackY( TrackY::both ) : TrackY( TrackY::none ),
FillColor( 0, 0 )
} );
// If no axis are available. Generating a TH1 object for axis:
if( !GetAxisObject() ){
auto& axishist = MakeObj<TH1D>(
( genaxisname + RandomString( 6 ) ).c_str(),
"",
10, GetXmin( obj ), GetXmax( obj ) );
axishist.SetStats( 0 );
PadBase::PlotObj( axishist, "AXIS" );
SetAxisFont();
}
// Object fixing
obj.SetTitle( "" );// Forcing clear title. This should be handled by Canvas.
// Forcing fit functions to not be drawn
for( const auto&& func : *( obj.GetListOfFunctions() ) ){
func->SetBit( TF1::kNotDraw, true );
}
const int pt = args.Get<PlotType>();
switch( pt ){
case simplefunc:
PadBase::PlotObj( obj, "LX" );
break;
case fittedfunc:
PadBase::PlotObj( obj, "3" );// Draw Error with fill region and then
PadBase::PlotObj( obj, "LX" );// Draw the central line. All errors disabled.
break;
case scatter:
// Points, no error bar end ticks, show error bar for points outside range.
PadBase::PlotObj( obj, "PZ0" );
break;
case plottype_dummy:
PlotObj( obj, args.Get<PlotType>().c_str() );
break;
default:
std::cerr << "Skipping over invalid value" << std::endl;
break;
}
TrackObjectY( obj, args.Get<TrackY>() );
// Adding legend
if( args.Has<EntryText>() ){
AddLegendEntry( obj, args.Get<EntryText>(), args.Get<PlotType>() );
}
// Moving to under something
if( args.Has<PlotUnder>() ){
PadBase::MoveTargetToBefore( obj, args.Get<PlotUnder>() );
}
// Setting styling attributes
SetLineAttr( obj, args );
SetFillAttr( obj, args );
SetMarkAttr( obj, args );
return obj;
}
/**
* Plotting a TF1 object is done by generating a TGraph with 300 samples points
* across the x axis, and plotting the TGraph instead. All TGraph plotting
* options will be available for the TF1 plotting. There is a new plotting
* options VisualizeError, which generates a TGraphErrors graph by randomly
* sampling the parameter space according to the correlation matrix given by a
* @ROOT{TFitResult}.
*/
TGraph&
Pad1D::PlotFunc( TF1& func, const std::vector<RooCmdArg>& arglist )
{
const RooArgContainer args(
arglist,
{
PlotType(// Inserting default plotting style
RooArgContainer::CheckList( arglist, VisualizeError::CmdName ) ?
fittedfunc : simplefunc ),
RooFit::Precision( 1e-3 )
}
);
// If no axis are available. Generating a TH1 object for axis:
if( !GetAxisObject() ){
auto& axishist = MakeObj<TH1D>(
( genaxisname + RandomString( 10 ) ).c_str(),
"",
10, func.GetXmin(), func.GetXmax() );
axishist.SetStats( 0 );
PadBase::PlotObj( axishist, "AXIS" );
SetAxisFont();
}
return PlotGraph( MakeTF1Graph( func, args ), args );
}
/**
* @brief Generating a graph representation of the TF1 object.
*/
TGraph&
Pad1D::MakeTF1Graph( TF1& func, const RooArgContainer& args )
{
static const unsigned psample = 300;
const std::string graphname = func.GetName()
+ std::string( "_gengraph" )
+ RandomString( 6 );
const double xmax = func.GetXmax();
const double xmin = func.GetXmin();
const double xspace = args.Get( "Precision" ).getDouble( 0 );
const unsigned xsample = 1 / ( xspace ) + 1;
std::vector<double> x( xsample );
std::vector<double> y( xsample );
std::vector<double> yerrhi( xsample );
std::vector<double> yerrlo( xsample );
std::vector<double> zero( xsample );
// Getting common elements for graph generation
for( unsigned i = 0; i < xsample; ++i ){
const double xval = xmin + i * ( xmax-xmin ) * xspace;
const double yval = func.Eval( xval );
x[i] = xval;
y[i] = yval;
yerrlo[i] = 0;
yerrhi[i] = 0;
zero[i] = 0;
}
if( !args.Has<VisualizeError>() ){
TGraph& graph = MakeObj<TGraph>( x.size(), x.data(), y.data() );
graph.SetName( graphname.c_str() );
return graph;
} else {
const auto cmd = args.Get<VisualizeError>();
const auto& fit = cmd.GetTFitResult();
const double zval = cmd.getDouble( 0 );
const std::vector<double> bestfit_param = fit.Parameters();
// Getting matrix for random parameter generation
const TMatrixDSym cormatrix = fit.GetCovarianceMatrix();
const TMatrixD tmatrix = usr::DecompCorvariance( cormatrix );
TVectorD vec( tmatrix.GetNrows() );
std::mt19937 gen;
std::normal_distribution pdf( 0.0, 1.0 );
// Random sample for parameter space
for( unsigned i = 0; i < psample; ++i ){
// Generating random variation using gaussian
for( int j = 0; j < vec.GetNrows(); ++j ){
vec[j] = pdf( gen );
}
// Forcing the vector onto unit sphere, then transforming according to
// the covariance matrix
vec = ( zval /sqrt( vec.Norm2Sqr() ) ) * vec;
vec = tmatrix * vec;
// Shifting to central value of function.
for( int j = 0; j < vec.GetNrows(); ++j ){
func.SetParameter( j, vec[j] + bestfit_param[j] );
}
// Finding evelope of randomly generated parameter values
for( unsigned j = 0; j < xsample; ++j ){
const double xval = x.at( j );
const double yerr = func.Eval( xval ) - y.at( j );
yerrhi[j] = std::max( yerr, yerrhi.at( j ) );
yerrlo[j] = std::max( -yerr, yerrlo.at( j ) );
}
}
// Reseting the function parameters to best value
func.SetParameters( bestfit_param.data() );
TGraphAsymmErrors& graph = MakeObj<TGraphAsymmErrors>( x.size(),
x.data(), y.data(),
zero.data(), zero.data(),
yerrlo.data(), yerrhi.data() );
graph.SetName( graphname.c_str() );
return graph;
}
}
/**
* Function for plotting all of the RooAbsData objects, the supported options
* allowed include:
* - *Any* RooCmdArg supported by the RooAbsData::plotOn function. These will
* take precedence to custom defined options. With the excpetion of
* RooFit::DrawOptions.
*
* - PlotType: Specifying the representation for the data object on the Pad. Any
* of the types valid for the PlotGraph functions would be valid. By default,
* the scatter plot method would be used.
*
* - EntryText: String to add in the legend entry. If this options is not
* present, then this object will NOT appear in the generated legend. Notice
* that the attributes to display in the legend would be generated from the
* PlotType used. Notice that this method is overwritten by the
* RooFit::Invisible option, which forces the object to be hidden.
*
* - TrackY: Whether or not the y-axis range should be adjusted according to the
* newly added graph. By default, only the maximum value would be used.
*
* Additional automation of options include suppressing the X error bars of the
* generated graph if an equal binning is used for the data set and the
* RooFit::XErrorSize is not specified. This is to align the plotting style
* conventions within the CMS collaboration. Another change to the graphs is that
* the y uncertainties in the zero bins are suppressed, again, to align with the
* plotting style conventions.
*
* The function returns a reference to the generated TGraph object by the
* underlying RooPlot object, The object would be owned by the RooPlot and be
* destroyed when the Pad1D goes out of scope.
*/
TGraphAsymmErrors&
Pad1D::PlotData(
RooAbsData& data,
const std::vector<RooCmdArg>& arglist
)
{
const RooArgContainer args(
arglist,
{
PlotType( scatter ),
TrackY( TrackY::max )
}
);
TGraphAsymmErrors& ans = MakeDataGraph( data, args );
if( !args.Has( "Invisible" ) ){
if( _prevrangetype == rangetype::aut ){
// Forcing the range type to be histogram like.
_prevrangetype = rangetype::hist;
}
PlotGraph( ans, args );
}
return ans;
}
/**
* @brief Helper method for generating the a TGraph representing a RooAbsData
* plot.
*
* This will detect the binning method specified by the various options (using
* the present binning of the RooFrame variable otherwise), and in the case of
* uniform binning, suppress the x axis error bars, as specified by the CMS
* publication conventions. Additionally, Bins with zero entires would have their
* y error bars suppressed.
*/
TGraphAsymmErrors&
Pad1D::MakeDataGraph( RooAbsData& data,
const RooArgContainer& args )
{
// RooCmdArg for suppressing the X errors in the final graph
static const RooCmdArg suppressxerror = RooFit::XErrorSize( 0 );
// Generating the requirements for actual RooFit PlotOn calls
RooLinkedList oplist = args.MakeRooList();
auto IsUniform
= [this]( const RooCmdArg& cmd ) -> bool {
// Double assignment will always be uniform
if( cmd.getDouble( 0 ) != cmd.getDouble( 1 ) ){ return true;}
// Getting plot variable bining scheme
if( cmd.getString( 0 ) ){
const auto binname = cmd.getString( 0 );
const auto plotvar = this->_frame.getPlotVar();
if( plotvar->hasBinning( binname ) ){
return plotvar->getBinning( binname ).isUniform();
}
} else if( cmd.getObject( 0 ) ){
auto binobj = dynamic_cast<const RooAbsBinning*>( cmd.getObject( 0 ) );
if( binobj ){
return binobj->isUniform();
}
}
return true;// Returning true by default
};
// Option for suppressing x error bars
if( !args.Has( "Binning" ) ){
if( _frame.getPlotVar()->getBinning().isUniform() ){
oplist.Add( suppressxerror.Clone() );
}
} else if( IsUniform( args.Get( "Binning" ) ) ){
oplist.Add( suppressxerror.Clone() );
}
// Generating the object via RooFit
TGraphAsymmErrors& ans = GenGraph( data, oplist );
// Additional Fixes for RooFit generated objects
for( int i = 0; i < ans.GetN(); ++i ){
if( ans.GetY()[i] == 0 ){// Suppressing errors in zero bins
ans.SetPointError( i, 0, 0, 0, 0 );
}
}
return ans;
}
/**
* Plotting of RooAbsPdf objects by generating the TGraphs using a RooPlot object
* and plotting the graphs onto the TPad. The supported options are:
*
* - *Any* RooCmdArg supported by the RooAbsData::plotOn function. These will
* take precedence to custom defined options, with the excpetion of the
* RooFit::DrawOptions method.
*
* - PlotType: Specifying the representation for the data object on the Pad. Any
* of the types valid for the PlotGraph functions would be valid. If not
* specified, the simplefunc or fittedfunc methods will be used, depending on
* if the RooFit::VisualizeError is used.
*
* - EntryText: String to add in the legend entry. If this options is not
* present, then this object will NOT appear in the generated legend. Notice
* that the attributes to display in the legend would be generated from the
* PlotType used.
*
* - TrackY: Whether or not the y-axis range should be adjusted according to the
* newly added graph. By default, RooPdf objects would not be used to adjust
* the axis range.
*
* Additional automation of options include additional generation for
* RooFit::VisualizeError. The stock RooPlot generates are contour line for the
* uncertainty range rather than a line with error, making styling of a PDF with
* uncertainty rather tedious. This functions takes the generated TGraphs by the
* RooPlot and recalculated a TGraph with uncertainty. The newly calculated graph
* will be placed under the ownership of the Pad.
*/
TGraph&
Pad1D::PlotPdf( RooAbsPdf& pdf, const std::vector<RooCmdArg>& arglist )
{
const RooArgContainer args( arglist,
{// Defining default arguments
TrackY( TrackY::max ),// Default track y: only top
RooArgContainer::CheckList( arglist, VisualizeError::CmdName ) ?
PlotType( fittedfunc ) : PlotType( simplefunc )// default plot style.
}
);
TGraph& ans = MakePdfGraph( pdf, arglist );
if( !args.Has( "Invisible" ) ){// Allow for invisible stuff to exist
if( _prevrangetype == rangetype::aut ){
// Forcing the range type to be histogram like.
_prevrangetype = rangetype::hist;
}
PlotGraph( ans, args );
}
return ans;
}
/**
* @brief Helper function for generating a TGraph representation of a RooAbsPdf
* plot
*
* In the case the RooFit::Visualization is used, this function generates two
* graphs via the in-built RooFit methods , one for the central plot, and the
* other the contor of the uncertainty. This function then recalculates the two
* graphs into a single TGraph with uncertainty, which is makes manipulating the
* the plot results of a single RooAbsPdf instance more intuitive (changing the
* plot style of a single object, rather than two).
*/
TGraph&
Pad1D::MakePdfGraph( RooAbsPdf& pdf, const RooArgContainer& args )
{
// Augmenting the Visualize Error command. We have to manually insert a
// RooArgSet containing all the floating variables directly in the
// VisualizeError instance. Otherwise the generation of the error band might
// fail.
auto CorrectVisError
= [this]( const RooAbsPdf& pdf,
const usr::RooArgContainer& args ) -> RooCmdArg
{
if( args.Has<VisualizeError>() ){
auto& cmd = args.Get<VisualizeError>();
if( cmd.has_set() ){
// If Visualized Parameter set is already specified, then simply
// return the original parameter
return cmd;
} else {
RooCmdArg ans( cmd );
const auto& fit = cmd.GetRooFitResult();
// Memory leak??
RooArgSet* cloneParams = pdf.getObservables( fit.floatParsFinal() );
ans.setSet( 0, *cloneParams );
this->ClaimObject( cloneParams );
return ans;
}
} else {
return RooCmdArg::none();
}
};
const RooCmdArg viscmd = CorrectVisError( pdf, args );
RooLinkedList roolist = args.MakeRooList( {VisualizeError::CmdName} );
if( !args.Has<VisualizeError>() ){
// Nothing special needs to be done for simple plotting.
return GenGraph( pdf, roolist );
} else {
TGraph& centralgraph = GenGraph( pdf, roolist );
roolist.Add( viscmd.Clone() );
TGraph& errorgraph = GenGraph( pdf, roolist );
// Map for storing uncertainty
std::map<double, std::pair<double, double> > fiterr;
for( int i = 0; i < errorgraph.GetN(); ++i ){
const double x = errorgraph.GetX()[i];
const double y = errorgraph.GetY()[i];
if( !fiterr.count( x ) ){
fiterr[x] = std::make_pair( 1e10, -1e10 );
}
fiterr.at( x ).first = std::min( fiterr.at( x ).first, y );
fiterr.at( x ).second = std::max( fiterr.at( x ).second, y );
}
// The new TGraphAsymmErrors to store the results.
TGraphAsymmErrors& ans = MakeObj<TGraphAsymmErrors>( fiterr.size() );
unsigned i = 0;// index for looping
for( const auto& fiterrval : fiterr ){
const double x = fiterrval.first;
const double y = centralgraph.Eval( x );
const double ylo = fiterrval.second.first;
const double yhi = fiterrval.second.second;
ans.SetPoint( i, x, y );
ans.SetPointError( i, 0, 0, y-ylo, yhi-y );
++i;
}
return ans;
}
}
// ------------------------------------------------------------------------------
// Private Helper functions
// ------------------------------------------------------------------------------
/**
* @brief Helper function for generating RooAbsPdf plots onto a Pad.
*
* Throws and invalid_argument exception when the plotting call fails.
*/
TGraph&
Pad1D::GenGraph( RooAbsPdf& pdf, RooLinkedList& arglist )
{
// Suppressing plotting messages
RooMsgService::instance().setGlobalKillBelow( RooFit::WARNING );
RooPlot* test = pdf.plotOn( &_frame, arglist );
if( !test ){
throw std::invalid_argument(
"Bad argument list or object, plotting failed" );
}
auto& graph = _frame.LastPlot<TGraph>();
graph.SetName( ( pdf.GetName() + RandomString( 6 ) ).c_str() );
// Since this is a PDF and there is no weighting issue, we
// enforce the fact that the graph should be positive definite.
for( int i = 0; i < graph.GetN(); ++i ){
const double x = graph.GetX()[i];
const double y = graph.GetY()[i];
if( y <= 0.0 ){
graph.SetPoint( i, x, 1e-50 );
}
}
return graph;
}
/**
* @brief Helper function for generating RooAbsData plots onto a Pad.
*
* Throws an invalid_argument exception when the plotting call fails.
*/
TGraphAsymmErrors&
Pad1D::GenGraph( RooAbsData& data, RooLinkedList& arglist )
{
// Suppressing plotting messages
RooMsgService::instance().setGlobalKillBelow( RooFit::WARNING );
// Generating plotting information
RooPlot* test = data.plotOn( &_frame, arglist );
if( !test ){
throw std::invalid_argument(
"Bad argument list or object, plotting failed" );
}
return _frame.LastPlot<TGraphAsymmErrors>();
}
/**
* @brief Changing the stored _datamin, and _datamax variable according to object
*
* Moving to a private helper function to reduce verbosity in main implementation
* function
*/
void
Pad1D::TrackObjectY( const TObject& obj, const int tracky )
{
// Perfroming the axis range setting
if( tracky == TrackY::min || tracky == TrackY::both ){
if( obj.InheritsFrom( TH1D::Class() ) ){
_datamin = std::min( _datamin,
GetYmin( &dynamic_cast<const TH1D&>( obj ) ) );
}
if( obj.InheritsFrom( TGraph::Class() ) ){
_datamin = std::min( _datamin,
GetYmin( &dynamic_cast<const TGraph&>( obj ) ) );
}
if( obj.InheritsFrom( THStack::Class() ) ){
_datamin = std::min( _datamin,
GetYmin( &dynamic_cast<const THStack&>( obj ) ) );
}
}
if( tracky == TrackY::max || tracky == TrackY::both ){
if( obj.InheritsFrom( TH1D::Class() ) ){
_datamax = std::max( _datamax,
GetYmax( &dynamic_cast<const TH1D&>( obj ) ) );
}
if( obj.InheritsFrom( TGraph::Class() ) ){
_datamax = std::max( _datamax,
GetYmax( &dynamic_cast<const TGraph&>( obj ) ) );
}
if( obj.InheritsFrom( THStack::Class() ) ){
_datamax = std::max( _datamax,
GetYmax( &dynamic_cast<const THStack&>( obj ) ) );
}
}
AutoSetYRange();
}
}/* plt */
}/* usr */
| [
"yihui.lai@cern.ch"
] | yihui.lai@cern.ch |
8d824006868b42a472d5d99e81632f2c1ac1b98d | 711e5c8b643dd2a93fbcbada982d7ad489fb0169 | /XPSP1/NT/inetcore/outlookexpress/inetcomm/mimeole/bytebuff.cpp | a070e26c2cd1057a8d1ac60026fe70594e85e2b3 | [] | no_license | aurantst/windows-XP-SP1 | 629a7763c082fd04d3b881e0d32a1cfbd523b5ce | d521b6360fcff4294ae6c5651c539f1b9a6cbb49 | refs/heads/master | 2023-03-21T01:08:39.870106 | 2020-09-28T08:10:11 | 2020-09-28T08:10:11 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,196 | cpp | // --------------------------------------------------------------------------------
// ByteBuff.cpp
// Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
// Steven J. Bailey
// --------------------------------------------------------------------------------
#include "pch.hxx"
#include "bytebuff.h"
// --------------------------------------------------------------------------------
// CByteBuffer::CByteBuffer
// --------------------------------------------------------------------------------
CByteBuffer::CByteBuffer(LPBYTE pb /* =NULL */, ULONG cbAlloc /* =0 */, ULONG cb /* =0 */, ULONG i /* =0 */)
{
m_cRef = 1;
m_dwState = 0;
m_cbGrow = BYTEBUFF_GROW;
m_buffer.pb = pb;
m_buffer.pbStatic = pb;
m_buffer.cbAlloc = cbAlloc;
m_buffer.cb = cb;
m_buffer.i = i;
}
// --------------------------------------------------------------------------------
// CByteBuffer::CByteBuffer
// --------------------------------------------------------------------------------
void CByteBuffer::Init(LPBYTE pb, ULONG cbAlloc, ULONG cb, ULONG i)
{
m_buffer.pb = pb;
m_buffer.cb = cb;
m_buffer.i = i;
m_buffer.cbAlloc = cbAlloc;
m_buffer.pbStatic = pb;
}
// --------------------------------------------------------------------------------
// CByteBuffer::CByteBuffer
// --------------------------------------------------------------------------------
CByteBuffer::~CByteBuffer(void)
{
// Free memory if not equal to static
if (m_buffer.pb != m_buffer.pbStatic)
g_pMalloc->Free(m_buffer.pb);
}
// --------------------------------------------------------------------------------
// CByteBuffer::Release
// --------------------------------------------------------------------------------
STDMETHODIMP_(ULONG) CByteBuffer::Release(void)
{
if (0 != --m_cRef)
return m_cRef;
delete this;
return 0;
}
// --------------------------------------------------------------------------------
// CByteBuffer::_HrRealloc
// --------------------------------------------------------------------------------
HRESULT CByteBuffer::_HrRealloc(DWORD cbAlloc)
{
// Locals
HRESULT hr=S_OK;
LPBYTE pbAlloc=NULL;
// This should have been checked
Assert(cbAlloc > m_buffer.cbAlloc);
// Currently using static ?
if (m_buffer.pb == m_buffer.pbStatic)
{
// Allocate
CHECKALLOC(pbAlloc = (LPBYTE)g_pMalloc->Alloc(cbAlloc));
// Copy Data into pbAlloc
CopyMemory(pbAlloc, m_buffer.pb, m_buffer.cb);
}
// Otherwise, realloc
else
{
// Reallocate
CHECKALLOC(pbAlloc = (LPBYTE)g_pMalloc->Realloc(m_buffer.pb, cbAlloc));
}
// Save pbAlloc
m_buffer.pb = pbAlloc;
// Save cbAlloc
m_buffer.cbAlloc = cbAlloc;
exit:
// Done
return hr;
}
// --------------------------------------------------------------------------------
// CByteBuffer::Append
// --------------------------------------------------------------------------------
HRESULT CByteBuffer::Append(LPBYTE pbData, ULONG cbData)
{
// Locals
HRESULT hr=S_OK;
// Get Bigger and need to allocate
if (m_buffer.cb + cbData > m_buffer.cbAlloc)
{
// Realloc
CHECKHR(hr = _HrRealloc(m_buffer.cb + cbData + m_cbGrow));
}
// Append the data
CopyMemory(m_buffer.pb + m_buffer.cb, pbData, cbData);
// Save Size
m_buffer.cb += cbData;
exit:
// Done
return hr;
}
// --------------------------------------------------------------------------------
// CByteBuffer::SetSize
// --------------------------------------------------------------------------------
HRESULT CByteBuffer::SetSize(DWORD cb)
{
// Locals
HRESULT hr=S_OK;
// Get Bigger and need to allocate
if (cb > m_buffer.cb && cb > m_buffer.cbAlloc)
{
// Realloc
CHECKHR(hr = _HrRealloc(cb + m_cbGrow));
}
// Save Size
m_buffer.cb = cb;
// Adjust Index
if (m_buffer.i > cb)
m_buffer.i = cb;
exit:
// Done
return hr;
}
| [
"112426112@qq.com"
] | 112426112@qq.com |
df6a849d52a5aa3f9037f9eb937a2397f642c213 | eeab0e407e3e015b51fd874991e47adba6564898 | /test/fp_util_test.cpp | 3e77b3b0527e9b2f299d168dd192d0ca1986ae43 | [
"BSD-3-Clause"
] | permissive | SatoshiRobatoFujimoto/mcl | be4d193d56cecca429a8e3d00b1bf3973da04254 | 6b29693b6423791fb1590c2b7e8f307bcb5de09d | refs/heads/master | 2020-03-18T10:55:50.693376 | 2018-05-23T07:18:49 | 2018-05-23T07:18:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,850 | cpp | #define PUT(x) std::cout << #x "=" << (x) << std::endl
#include <cybozu/test.hpp>
#include <mcl/conversion.hpp>
#include <mcl/gmp_util.hpp>
#include <mcl/fp.hpp>
CYBOZU_TEST_AUTO(arrayToHex)
{
const struct {
uint32_t x[4];
size_t n;
const char *str;
} tbl[] = {
{ { 0, 0, 0, 0 }, 0, "0" },
{ { 0x123, 0, 0, 0 }, 1, "123" },
{ { 0x12345678, 0xaabbcc, 0, 0 }, 2, "aabbcc12345678" },
{ { 0, 0x12, 0x234a, 0 }, 3, "234a0000001200000000" },
{ { 1, 2, 0xffffffff, 0x123abc }, 4, "123abcffffffff0000000200000001" },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
char buf[64];
size_t n = mcl::fp::arrayToHex(buf, sizeof(buf), tbl[i].x, tbl[i].n, false);
CYBOZU_TEST_ASSERT(n > 0);
CYBOZU_TEST_EQUAL_ARRAY(buf + sizeof(buf) - n, tbl[i].str, n);
n = mcl::fp::arrayToHex(buf, sizeof(buf), tbl[i].x, tbl[i].n, true);
CYBOZU_TEST_ASSERT(n > 0);
CYBOZU_TEST_EQUAL_ARRAY(buf + sizeof(buf) - n, (std::string("0x") + tbl[i].str).c_str(), n);
}
}
CYBOZU_TEST_AUTO(arrayToBin)
{
const struct {
uint32_t x[4];
size_t n;
const char *str;
} tbl[] = {
{ { 0, 0, 0, 0 }, 0, "0" },
{ { 0x123, 0, 0, 0 }, 1, "100100011" },
{ { 0x12345678, 0xaabbcc, 0, 0 }, 2, "10101010101110111100110000010010001101000101011001111000" },
{ { 0, 0x12, 0x234a, 0 }, 3, "100011010010100000000000000000000000000001001000000000000000000000000000000000" },
{ { 1, 2, 0xffffffff, 0x123abc }, 4, "100100011101010111100111111111111111111111111111111110000000000000000000000000000001000000000000000000000000000000001" },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
char buf[512];
size_t n = mcl::fp::arrayToBin(buf, sizeof(buf), tbl[i].x, tbl[i].n, false);
CYBOZU_TEST_ASSERT(n > 0);
CYBOZU_TEST_EQUAL_ARRAY(buf + sizeof(buf) - n, tbl[i].str, n);
n = mcl::fp::arrayToBin(buf, sizeof(buf), tbl[i].x, tbl[i].n, true);
CYBOZU_TEST_ASSERT(n > 0);
CYBOZU_TEST_EQUAL_ARRAY(buf + sizeof(buf) - n, (std::string("0b") + tbl[i].str).c_str(), n);
}
}
// CYBOZU_TEST_AUTO(verifyStr) // QQQ
CYBOZU_TEST_AUTO(hexToArray)
{
const struct {
const char *str;
uint64_t x[4];
} tbl[] = {
{ "0", { 0, 0, 0, 0 } },
{ "5", { 5, 0, 0, 0 } },
{ "123", { 0x123, 0, 0, 0 } },
{ "123456789012345679adbc", { uint64_t(0x789012345679adbcull), 0x123456, 0, 0 } },
{ "ffffffff26f2fc170f69466a74defd8d", { uint64_t(0x0f69466a74defd8dull), uint64_t(0xffffffff26f2fc17ull), 0, 0 } },
{ "100000000000000000000000000000033", { uint64_t(0x0000000000000033ull), 0, 1, 0 } },
{ "11ee12312312940000000000000000000000000002342343", { uint64_t(0x0000000002342343ull), uint64_t(0x0000000000000000ull), uint64_t(0x11ee123123129400ull), 0 } },
{ "1234567890abcdefABCDEF123456789aba32134723424242424", { uint64_t(0x2134723424242424ull), uint64_t(0xDEF123456789aba3ull), uint64_t(0x4567890abcdefABCull), 0x123 } },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
const size_t xN = 4;
uint64_t x[xN];
size_t n = mcl::fp::hexToArray(x, xN, tbl[i].str, strlen(tbl[i].str));
CYBOZU_TEST_ASSERT(n > 0);
CYBOZU_TEST_EQUAL_ARRAY(x, tbl[i].x, n);
}
}
CYBOZU_TEST_AUTO(compareArray)
{
const struct {
uint32_t a[4];
uint32_t b[4];
size_t n;
int expect;
} tbl[] = {
{ { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0 },
{ { 1, 0, 0, 0 }, { 0, 0, 0, 0 }, 1, 1 },
{ { 0, 0, 0, 0 }, { 1, 0, 0, 0 }, 1, -1 },
{ { 1, 0, 0, 0 }, { 1, 0, 0, 0 }, 1, 0 },
{ { 3, 1, 1, 0 }, { 2, 1, 1, 0 }, 4, 1 },
{ { 9, 2, 1, 1 }, { 1, 3, 1, 1 }, 4, -1 },
{ { 1, 7, 8, 4 }, { 1, 7, 8, 9 }, 3, 0 },
{ { 1, 7, 8, 4 }, { 1, 7, 8, 9 }, 4, -1 },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
int e = mcl::fp::compareArray(tbl[i].a, tbl[i].b, tbl[i].n);
CYBOZU_TEST_EQUAL(e, tbl[i].expect);
}
}
CYBOZU_TEST_AUTO(isLessArray)
{
const struct {
uint32_t a[4];
uint32_t b[4];
size_t n;
bool expect;
} tbl[] = {
{ { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, false },
{ { 1, 0, 0, 0 }, { 0, 0, 0, 0 }, 1, false },
{ { 0, 0, 0, 0 }, { 1, 0, 0, 0 }, 1, true },
{ { 1, 0, 0, 0 }, { 1, 0, 0, 0 }, 1, false },
{ { 3, 1, 1, 0 }, { 2, 1, 1, 0 }, 4, false },
{ { 3, 1, 2, 0 }, { 2, 2, 2, 0 }, 4, true },
{ { 9, 2, 1, 1 }, { 1, 3, 1, 1 }, 4, true },
{ { 1, 7, 8, 4 }, { 1, 7, 8, 9 }, 3, false },
{ { 1, 7, 8, 4 }, { 1, 7, 8, 9 }, 4, true },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
bool e = mcl::fp::isLessArray(tbl[i].a, tbl[i].b, tbl[i].n);
CYBOZU_TEST_EQUAL(e, tbl[i].expect);
e = mcl::fp::isGreaterArray(tbl[i].b, tbl[i].a, tbl[i].n);
CYBOZU_TEST_EQUAL(e, tbl[i].expect);
}
}
CYBOZU_TEST_AUTO(isLessOrEqualArray)
{
const struct {
uint32_t a[4];
uint32_t b[4];
size_t n;
bool expect;
} tbl[] = {
{ { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, true },
{ { 1, 0, 0, 0 }, { 0, 0, 0, 0 }, 1, false },
{ { 0, 0, 0, 0 }, { 1, 0, 0, 0 }, 1, true },
{ { 1, 0, 0, 0 }, { 1, 0, 0, 0 }, 1, true },
{ { 3, 1, 1, 0 }, { 2, 1, 1, 0 }, 4, false },
{ { 3, 1, 2, 0 }, { 2, 2, 2, 0 }, 4, true },
{ { 9, 2, 1, 1 }, { 1, 3, 1, 1 }, 4, true },
{ { 1, 7, 8, 4 }, { 1, 7, 8, 9 }, 3, true },
{ { 1, 7, 8, 4 }, { 1, 7, 8, 9 }, 4, true },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
bool e = mcl::fp::isLessOrEqualArray(tbl[i].a, tbl[i].b, tbl[i].n);
CYBOZU_TEST_EQUAL(e, tbl[i].expect);
e = mcl::fp::isGreaterOrEqualArray(tbl[i].b, tbl[i].a, tbl[i].n);
CYBOZU_TEST_EQUAL(e, tbl[i].expect);
}
}
struct Rand {
std::vector<uint32_t> v;
const uint8_t *p;
size_t pos;
size_t endPos;
void read(void *x, size_t n)
{
if (pos + n > endPos) throw cybozu::Exception("Rand:get:bad n") << pos << n << endPos;
uint8_t *dst = (uint8_t*)x;
memcpy(dst, p + pos, n);
pos += n;
}
uint32_t operator()()
{
char buf[4];
read(buf, 4);
uint32_t v;
memcpy(&v, buf, 4);
return v;
}
Rand(const uint32_t *x, size_t n)
: p(0)
, pos(0)
{
for (size_t i = 0; i < n; i++) {
v.push_back(x[i]);
}
p = (uint8_t*)&v[0];
endPos = v.size() * 4;
}
};
CYBOZU_TEST_AUTO(getRandVal)
{
const size_t rn = 8;
const struct {
uint32_t r[rn];
uint32_t mod[2];
size_t bitSize;
uint32_t expect[2];
} tbl[] = {
{ { 1, 2, 3, 4, 5, 6, 7, 8 }, { 5, 6 }, 64, { 1, 2 } },
{ { 0xfffffffc, 0x7, 3, 4, 5, 6, 7, 8 }, { 0xfffffffe, 0x3 }, 34, { 0xfffffffc, 0x3 } },
{ { 0xfffffffc, 0x7, 3, 4, 5, 6, 7, 8 }, { 0xfffffffb, 0x3 }, 34, { 3, 0 } },
{ { 2, 3, 5, 7, 4, 3, 0, 3 }, { 1, 0x3 }, 34, { 0, 3 } },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
Rand rg(tbl[i].r, rn);
#if CYBOZU_OS_BIT == 64
uint64_t out[1];
#else
uint32_t out[2];
#endif
mcl::fp::RandGen wrg(rg);
#if CYBOZU_OS_BIT == 64
uint64_t mod = tbl[i].mod[0] | (uint64_t(tbl[i].mod[1]) << 32);
mcl::fp::getRandVal(out, wrg, &mod, tbl[i].bitSize);
uint64_t expect = tbl[i].expect[0] | (uint64_t(tbl[i].expect[1]) << 32);
CYBOZU_TEST_EQUAL(out[0], expect);
#else
mcl::fp::getRandVal(out, wrg, tbl[i].mod, tbl[i].bitSize);
CYBOZU_TEST_EQUAL(out[0], tbl[i].expect[0]);
CYBOZU_TEST_EQUAL(out[1], tbl[i].expect[1]);
#endif
}
}
CYBOZU_TEST_AUTO(maskArray)
{
#if 1
const size_t n = 2;
uint32_t org[n] = { 0xabce1234, 0xffffef32 };
for (size_t i = 0; i <= sizeof(org) * 8; i++) {
uint32_t x[n];
memcpy(x, org, sizeof(org));
mcl::fp::maskArray(x, n, i);
mpz_class t;
mcl::gmp::setArray(t, org, n);
t &= (mpz_class(1) << i) - 1;
uint32_t y[n];
mcl::gmp::getArray(y, n, t);
CYBOZU_TEST_EQUAL_ARRAY(x, y, n);
}
#else
const size_t n = 4;
uint16_t org[n] = { 0x1234, 0xabce, 0xef32, 0xffff };
for (size_t i = 0; i <= sizeof(org) * 8; i++) {
uint16_t x[n];
memcpy(x, org, sizeof(org));
mcl::fp::maskArray(x, n, i);
mpz_class t;
mcl::gmp::setArray(t, org, n);
t &= (mpz_class(1) << i) - 1;
uint16_t y[n];
mcl::gmp::getArray(y, n, t);
CYBOZU_TEST_EQUAL_ARRAY(x, y, n);
}
#endif
}
CYBOZU_TEST_AUTO(stream)
{
const char *nulTbl[] = { "", " ", " \t\t\n\n " };
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(nulTbl); i++) {
const char *p = nulTbl[i];
cybozu::MemoryInputStream is(p, strlen(p));
std::string w = "abc";
mcl::fp::local::loadWord(w, is);
CYBOZU_TEST_ASSERT(w.empty());
}
const struct {
const char *buf;
const char *expect[2];
size_t n;
} tbl[] = {
{ "\t\t \n\rabc\r\r\n def", { "abc", "def" }, 2 },
{ "123", { "123" }, 1 },
{ "123\n", { "123" }, 1 },
{ "123 456", { "123", "456" }, 2 },
};
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
const char *buf = tbl[i].buf;
{
cybozu::MemoryInputStream is(buf, strlen(buf));
for (size_t j = 0; j < tbl[i].n; j++) {
std::string w;
mcl::fp::local::loadWord(w, is);
CYBOZU_TEST_EQUAL(w, tbl[i].expect[j]);
}
}
{
std::istringstream is(buf);
for (size_t j = 0; j < tbl[i].n; j++) {
std::string w;
mcl::fp::local::loadWord(w, is);
CYBOZU_TEST_EQUAL(w, tbl[i].expect[j]);
}
}
}
}
| [
"herumi@nifty.com"
] | herumi@nifty.com |
a1d820a1811995f28cb6a098daa9b3e2c97b175b | 9f4ce6b021c6887ade816602fbfcb17a9fde3f54 | /robotussin_0316.ino | d10bbc0f857e5a70d9cb185b99b74b13d1844dbb | [] | no_license | mwixted2/Robotussin | 4ab6858771b2fc487221b1d1cb1769a2afe98f4b | 5f80e2681176204aa98b899fafe92b62365d7dc7 | refs/heads/master | 2021-01-22T19:49:30.204316 | 2017-03-16T23:13:01 | 2017-03-16T23:13:01 | 85,248,838 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,498 | ino | #include <Servo.h>
#include <LiquidCrystal.h>
/*
* The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
*/
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int BUZZER_PIN = 6;
int tempo = 300;
int buttonPin = 2;
int buttonState = 0;
int sensorpin = 0;
int val = 0;
int led = 11;
int counter = 0;
int avg = 0;
int finalAvg = 0;
Servo servoLeft;
Servo servoRight;
void setup() {
servoLeft.attach(9);
servoRight.attach(10);
pinMode(led, OUTPUT);
pinMode(BUZZER_PIN, OUTPUT);
pinMode(buttonPin, INPUT);
Serial.begin(9600);
lcd.begin(16, 2);
}
bool running = true;
void loop() {
if(running)
{
forward(15);
running = false;
}
}
/*int main()
{
//setup();
//forward(5);
return 0;
}
*/
void robotMovement()
{
//add functions for robot movement
/*
* functions for students to use:
*
* printMessage( char inputString[] )
* ledOn( int seconds )
* turnLeft( int seconds )
* turnRights( int seconds )
* reverse( int secodns )
* forward( int seconds )
* playMusic( char notes[], int beats[], int length )
* buttonMusic( char notes[], int beats[], int length )
* buttonLed()
*/
forward(5);
}
//LCD functions
int printMessage(char str[])
{
lcd.setCursor(0, 1);
lcd.print(str);
delay(50);
return 0;
}
//LED functions
int ledOn(int seconds)
{
analogWrite(led, 200);
digitalWrite(6, HIGH);
delay(seconds * 1000);
ledOff();
return 0;
}
void ledOff()
{
analogWrite(led, 0);
digitalWrite(6, LOW);
delay(50);
}
// Motion routines for forward, reverse, turns, and stop
float read_gp2d12_range(byte pin)
{
int tmp;
tmp = analogRead(pin);
if (tmp < 3)return -1;
return (6787.0 /((float)tmp - 3.0)) - 4.0;
}
int turnLeft(int seconds)
{
int time = seconds * 1000;
counter = 0;
avg = 0;
finalAvg = 0;
val = analogRead(sensorpin); // reads the value of the sharp sensor
Serial.println(val); // prints the value of the sensor to the serial monitor
while(time > 0)
{
if(counter < 9)
{
avg += val;
counter++;
}
else
{
finalAvg = avg / 10;
avg = 0;
counter = 0;
}
time = time - 25;
delay(25);
if (finalAvg > 300) {
stopRobot();
return 0;
}
else if (finalAvg <= 300) {
left();
}
}
stopRobot();
delay(50);
return 0;
}
void left() {
servoLeft.write(60);
servoRight.write(60);
}
int turnRight(int seconds)
{
int time = seconds * 1000;
counter = 0;
avg = 0;
finalAvg = 0;
val = analogRead(sensorpin); // reads the value of the sharp sensor
Serial.println(val); // prints the value of the sensor to the serial monitor
while(time > 0)
{
if(counter < 9)
{
avg += val;
counter++;
}
else
{
finalAvg = avg / 10;
avg = 0;
counter = 0;
}
time = time - 25;
delay(25);
if (finalAvg > 300) {
stopRobot();
return 0;
}
else if (finalAvg <= 300) {
right();
}
}
stopRobot();
delay(50);
return 0;
}
void right() {
servoLeft.write(120);
servoRight.write(120);
}
int reverse(int seconds)
{
int time = seconds * 1000;
counter = 0;
avg = 0;
finalAvg = 0;
val = analogRead(sensorpin); // reads the value of the sharp sensor
Serial.println(val); // prints the value of the sensor to the serial monitor
while(time > 0)
{
if(counter < 9)
{
avg += val;
counter++;
}
else
{
finalAvg = avg / 10;
avg = 0;
counter = 0;
}
time = time - 25;
delay(25);
if (finalAvg > 300) {
stopRobot();
return 0;
}
else if (finalAvg <= 300) {
reverseRobot();
}
}
stopRobot();
delay(50);
return 0;
}
void reverseRobot() {
servoLeft.write(60);
servoRight.write(120);
}
int forward(int seconds)
{
int time = seconds * 1000;
counter = 0;
avg = 0;
finalAvg = 0;
val = analogRead(sensorpin); // reads the value of the sharp sensor
//Serial.println("ir sensor: " + val); // prints the value of the sensor to the serial monitor
while(time > 0)
{
Serial.println(time);
if(counter < 9)
{
avg += val;
counter++;
}
else
{
finalAvg = avg / 10;
avg = 0;
counter = 0;
}
time = time - 25;
delay(25);
if (finalAvg > 300) {
stopRobot();
return 0;
}
else if (finalAvg <= 300) {
forwardRobot();
}
}
stopRobot();
delay(50);
return 0;
}
void forwardRobot() {
servoLeft.write(120);
servoRight.write(60);
}
void stopRobot() {
servoLeft.write(90);
servoRight.write(90);
}
//Music functions
void playMusic(char notes[], int beats[], int length)
{
for(int i = 0; i < length; i++) {
if(notes[i] == ' ') {
delay(beats[i] * tempo);
} else {
playNote(notes[i], beats[i] * tempo);
}
delay(tempo / 2); /* delay between notes */
}
}
/* play tone */
void playTone(int tone, int duration) {
for (long i = 0; i < duration * 1000L; i += tone * 2) {
digitalWrite(BUZZER_PIN, HIGH);
delayMicroseconds(tone);
digitalWrite(BUZZER_PIN, LOW);
delayMicroseconds(tone);
}
}
void playNote(char note, int duration) {
char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
// play the tone corresponding to the note name
for (int i = 0; i < 8; i++) {
if (names[i] == note) {
playTone(tones[i], duration);
}
}
}
//Button code
int buttonMusic(char notes[], int beats[], int length)
{
buttonState = digitalRead(buttonPin);
if(buttonState == HIGH)
{
playMusic(notes, beats, length);
return 0;
}
else
{
digitalWrite(6, LOW);
return 0;
}
}
int buttonLed()
{
buttonState = digitalRead(buttonPin);
if(buttonState == HIGH)
{
ledOn(5);
return 0;
}
else if(buttonState == LOW)
{
ledOff();
return 0;
}
}
| [
"noreply@github.com"
] | mwixted2.noreply@github.com |
8e27e5f74e16bc14ae5f98f7c359baa9cdcc90c3 | 419df7453270e916dcc82b32243f65466d6d77cb | /ex1/code/buildings.cpp | 1fedb695b7bd9da5f2ab82b952c7c5f7b09845af | [
"MIT",
"CC-BY-3.0"
] | permissive | dionyziz/ntua-algo | bf7214c2b25a6545d340c31d430dfd78f4638e9d | ed42637aef153f75a7d080170ff98369be90a5b3 | refs/heads/master | 2016-09-06T18:37:30.585514 | 2012-02-27T12:27:10 | 2012-02-27T12:27:10 | 2,938,529 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 739 | cpp | #include<cstdio>
#include<stack>
const int N = 8;
using namespace std;
int main() {
int A[ N + 1 ] = { 10000, 8, 13, 10, 6, 3, 5, 8, 2 };
int B[ N + 1 ];
stack< int > bullets;
int bullet;
for ( int i = N; i >= 1; --i ) {
B[ i ] = 0;
}
for ( int i = N; i >= 1; --i ) {
while ( !bullets.empty() ) {
bullet = bullets.top();
if ( A[ bullet ] < A[ i ] ) {
B[ bullet ] = i;
bullets.pop();
}
else {
break;
}
}
bullets.push( i );
}
printf( "Array B: " );
for ( int i = 1; i <= N; ++i ) {
printf( "%i ", B[ i ] );
}
printf( "\n" );
return 0;
}
| [
"dionyziz@gmail.com"
] | dionyziz@gmail.com |
91c378890add5958059076d2edfcc975a93bfe37 | 703f48a08b9dd06907174f69fd621d4990e9aa30 | /ProcessNetRateDemo/traffic-src/TrafficSource.h | 2ad71f5a4a5b592ed4f93cc5747601445baf33d0 | [] | no_license | yhc166188/ProcessNetRateDemo | 8d11ee3ef7447ca09be73a8995e861a51c2c771c | 3a7e074c1dfa27c8fb0c61762be15d325331d093 | refs/heads/master | 2021-07-13T01:52:44.918347 | 2017-10-18T05:11:33 | 2017-10-18T05:11:33 | 107,360,967 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,668 | h | #ifndef TRAFFIC_SOURCE_H
#define TRAFFIC_SOURCE_H
#include "../utils/Packet.h"
#pragma region Protocol Headers
#pragma pack(1)
// MACv2 Header
typedef struct tagMacHeader
{
unsigned char dst[6];
unsigned char src[6];
unsigned short protocol;
} MacHeader;
/*
00 26 18 b1 cb d3 dc d2 fc 98 64 f9 88 64 11 00 21 6c 05 ca 00 21
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~ ~~ ~~ ~~~~~ ~~~~~ ~~~~~
Destination Addr Source Address Ethernet Type PPP Protocol: 0x0021* (IP)
0x8862 / 0x8864*
---------- MAC Packet ---------------------+-- PPPoE Packet -+-----
Version / Type: 0x11*
Code: 0x00*
Session ID
Length (1482)
*/
// PPPOE Header
typedef struct tagPppoeHeader
{
unsigned ver : 4;
unsigned type : 4;
unsigned code : 8;
unsigned session : 16;
unsigned length : 16;
unsigned protocol : 16;
} PppoeHeader;
// IPv4 Header
typedef struct tagIpHeader
{
unsigned ver : 4;
unsigned hdr_len : 4;
unsigned : 8;
unsigned len : 16;
unsigned : 16;
unsigned : 3;
unsigned : 13;
unsigned : 8;
unsigned protocol : 8;
unsigned : 16;
unsigned src : 32;
unsigned dst : 32;
} IpHeader;
// UDP Header
typedef struct tagUdpHeader
{
unsigned short src_port;
unsigned short dst_port;
unsigned short len;
unsigned short checksum;
} UdpHeader;
// TCP Header
typedef struct tagTcpHeader
{
unsigned src_port : 16;
unsigned dst_port : 16;
unsigned : 32;
unsigned : 32;
unsigned data_offset : 4;
unsigned : 6;
unsigned flags : 6;
unsigned window : 16;
unsigned checksum : 16;
unsigned emergency_ptr : 16;
} TcpHeader;
#pragma pack()
#pragma endregion
class TrafficSource
{
public:
virtual bool Initialize() = 0;
virtual ~TrafficSource() {};
virtual int EnumDevices() = 0;
virtual void GetDeviceName(int index, TCHAR *buf, int cchLen) = 0;
virtual bool SelectDevice(int index) = 0;
// Return value
// 1. Returns true and timeout = false, if a packet has been captured
// 2. Returns false and timeout = true, if no packet captured in this period, should call again
// 3. Returns false and timeout = false, if some error occurred
virtual bool Capture(PacketInfo *pi, bool *timeout) = 0;
};
#endif
| [
"739884701@qq.com"
] | 739884701@qq.com |
e1db7643c26f2dcdb4aef606420f392e457c04d8 | e1d786aadc8dc96f20006ace284f8fa158e0c26b | /src/qt/multisenddialog.cpp | 67be749839b2e0e5688eb5dbca7826cc4829af63 | [
"MIT"
] | permissive | crypt0rick/liberta-dirty | aa47d53c008821e9738c8ed22a2ac9d269ebec4f | 0d864008f4d012b8e0e106149693be13d82869f3 | refs/heads/liberta | 2021-01-24T12:11:20.097809 | 2018-03-03T08:11:57 | 2018-03-03T08:11:57 | 123,121,501 | 0 | 0 | MIT | 2018-03-03T07:38:17 | 2018-02-27T11:45:58 | C++ | UTF-8 | C++ | false | false | 7,611 | cpp | #include "multisenddialog.h"
#include "addressbookpage.h"
#include "base58.h"
#include "init.h"
#include "platformstyle.h"
#include "ui_multisenddialog.h"
#include "walletmodel.h"
#include <QLineEdit>
#include <QMessageBox>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
MultiSendDialog::MultiSendDialog(const PlatformStyle *platformStyle,QWidget* parent) : QDialog(parent),
ui(new Ui::MultiSendDialog),
model(0),
platformStyle(platformStyle)
{
ui->setupUi(this);
updateCheckBoxes();
}
MultiSendDialog::~MultiSendDialog()
{
delete ui;
}
void MultiSendDialog::setModel(WalletModel* model)
{
this->model = model;
}
void MultiSendDialog::setAddress(const QString& address)
{
setAddress(address, ui->multiSendAddressEdit);
}
void MultiSendDialog::setAddress(const QString& address, QLineEdit* addrEdit)
{
addrEdit->setText(address);
addrEdit->setFocus();
}
void MultiSendDialog::updateCheckBoxes()
{
ui->multiSendStakeCheckBox->setChecked(pwalletMain->fMultiSendStake);
ui->multiSendMasternodeCheckBox->setChecked(pwalletMain->fMultiSendMasternodeReward);
}
void MultiSendDialog::on_addressBookButton_clicked()
{
if (model && model->getAddressTableModel()) {
//AddressBookPage dlg(AddressBookPage::ForSelection, AddressBookPage::SendingTab, this);
AddressBookPage dlg(platformStyle, AddressBookPage::ForSelection, AddressBookPage::SendingTab, this);
dlg.setModel(model->getAddressTableModel());
if (dlg.exec())
setAddress(dlg.getReturnValue(), ui->multiSendAddressEdit);
}
}
void MultiSendDialog::on_viewButton_clicked()
{
std::pair<std::string, int> pMultiSend;
std::string strMultiSendPrint = "";
if (pwalletMain->isMultiSendEnabled()) {
if (pwalletMain->fMultiSendStake)
strMultiSendPrint += "MultiSend Active for Stakes\n";
else if (pwalletMain->fMultiSendStake)
strMultiSendPrint += "MultiSend Active for Masternode Rewards\n";
} else
strMultiSendPrint += "MultiSend Not Active\n";
for (int i = 0; i < (int)pwalletMain->vMultiSend.size(); i++) {
pMultiSend = pwalletMain->vMultiSend[i];
strMultiSendPrint += pMultiSend.first.c_str();
strMultiSendPrint += " - ";
strMultiSendPrint += boost::lexical_cast<string>(pMultiSend.second);
strMultiSendPrint += "% \n";
}
ui->message->setProperty("status", "ok");
ui->message->style()->polish(ui->message);
ui->message->setText(QString(strMultiSendPrint.c_str()));
return;
}
void MultiSendDialog::on_addButton_clicked()
{
bool fValidConversion = false;
std::string strAddress = ui->multiSendAddressEdit->text().toStdString();
if (!CLibertaAddress(strAddress).IsValid()) {
ui->message->setProperty("status", "error");
ui->message->style()->polish(ui->message);
ui->message->setText(tr("The entered address:\n") + ui->multiSendAddressEdit->text() + tr(" is invalid.\nPlease check the address and try again."));
ui->multiSendAddressEdit->setFocus();
return;
}
int nMultiSendPercent = ui->multiSendPercentEdit->text().toInt(&fValidConversion, 10);
int nSumMultiSend = 0;
for (int i = 0; i < (int)pwalletMain->vMultiSend.size(); i++)
nSumMultiSend += pwalletMain->vMultiSend[i].second;
if (nSumMultiSend + nMultiSendPercent > 100) {
ui->message->setProperty("status", "error");
ui->message->style()->polish(ui->message);
ui->message->setText(tr("The total amount of your MultiSend vector is over 100% of your stake reward\n"));
ui->multiSendAddressEdit->setFocus();
return;
}
if (!fValidConversion || nMultiSendPercent > 100 || nMultiSendPercent <= 0) {
ui->message->setProperty("status", "error");
ui->message->style()->polish(ui->message);
ui->message->setText(tr("Please Enter 1 - 100 for percent."));
ui->multiSendPercentEdit->setFocus();
return;
}
std::pair<std::string, int> pMultiSend;
pMultiSend.first = strAddress;
pMultiSend.second = nMultiSendPercent;
pwalletMain->vMultiSend.push_back(pMultiSend);
ui->message->setProperty("status", "ok");
ui->message->style()->polish(ui->message);
std::string strMultiSendPrint = "";
for (int i = 0; i < (int)pwalletMain->vMultiSend.size(); i++) {
pMultiSend = pwalletMain->vMultiSend[i];
strMultiSendPrint += pMultiSend.first.c_str();
strMultiSendPrint += " - ";
strMultiSendPrint += boost::lexical_cast<string>(pMultiSend.second);
strMultiSendPrint += "% \n";
}
CWalletDB walletdb(pwalletMain->strWalletFile);
walletdb.WriteMultiSend(pwalletMain->vMultiSend);
ui->message->setText(tr("MultiSend Vector\n") + QString(strMultiSendPrint.c_str()));
return;
}
void MultiSendDialog::on_deleteButton_clicked()
{
std::vector<std::pair<std::string, int> > vMultiSendTemp = pwalletMain->vMultiSend;
std::string strAddress = ui->multiSendAddressEdit->text().toStdString();
bool fRemoved = false;
for (int i = 0; i < (int)pwalletMain->vMultiSend.size(); i++) {
if (pwalletMain->vMultiSend[i].first == strAddress) {
pwalletMain->vMultiSend.erase(pwalletMain->vMultiSend.begin() + i);
fRemoved = true;
}
}
CWalletDB walletdb(pwalletMain->strWalletFile);
if (!walletdb.EraseMultiSend(vMultiSendTemp))
fRemoved = false;
if (!walletdb.WriteMultiSend(pwalletMain->vMultiSend))
fRemoved = false;
if (fRemoved)
ui->message->setText(tr("Removed ") + QString(strAddress.c_str()));
else
ui->message->setText(tr("Could not locate address\n"));
updateCheckBoxes();
return;
}
void MultiSendDialog::on_activateButton_clicked()
{
std::string strRet = "";
if (pwalletMain->vMultiSend.size() < 1)
strRet = "Unable to activate MultiSend, check MultiSend vector\n";
else if (!(ui->multiSendStakeCheckBox->isChecked() || ui->multiSendMasternodeCheckBox->isChecked())) {
strRet = "Need to select to send on stake and/or masternode rewards\n";
} else if (CLibertaAddress(pwalletMain->vMultiSend[0].first).IsValid()) {
pwalletMain->fMultiSendStake = ui->multiSendStakeCheckBox->isChecked();
pwalletMain->fMultiSendMasternodeReward = ui->multiSendMasternodeCheckBox->isChecked();
CWalletDB walletdb(pwalletMain->strWalletFile);
if (!walletdb.WriteMSettings(pwalletMain->fMultiSendStake, pwalletMain->fMultiSendMasternodeReward, pwalletMain->nLastMultiSendHeight))
strRet = "MultiSend activated but writing settings to DB failed";
else
strRet = "MultiSend activated";
} else
strRet = "First Address Not Valid";
ui->message->setProperty("status", "ok");
ui->message->style()->polish(ui->message);
ui->message->setText(tr(strRet.c_str()));
return;
}
void MultiSendDialog::on_disableButton_clicked()
{
std::string strRet = "";
pwalletMain->setMultiSendDisabled();
CWalletDB walletdb(pwalletMain->strWalletFile);
if (!walletdb.WriteMSettings(false, false, pwalletMain->nLastMultiSendHeight))
strRet = "MultiSend deactivated but writing settings to DB failed";
else
strRet = "MultiSend deactivated";
ui->message->setProperty("status", "");
ui->message->style()->polish(ui->message);
ui->message->setText(tr(strRet.c_str()));
return;
}
| [
"noreply@github.com"
] | crypt0rick.noreply@github.com |
1d0f9a68a01b51dd000e7ce7bf48e2c3f27a6eba | 948f4e13af6b3014582909cc6d762606f2a43365 | /testcases/juliet_test_suite/testcases/CWE194_Unexpected_Sign_Extension/s02/CWE194_Unexpected_Sign_Extension__negative_memcpy_74b.cpp | d9cf8fd1b4bd71f3f27e5e69b8223e95f9bebac9 | [] | no_license | junxzm1990/ASAN-- | 0056a341b8537142e10373c8417f27d7825ad89b | ca96e46422407a55bed4aa551a6ad28ec1eeef4e | refs/heads/master | 2022-08-02T15:38:56.286555 | 2022-06-16T22:19:54 | 2022-06-16T22:19:54 | 408,238,453 | 74 | 13 | null | 2022-06-16T22:19:55 | 2021-09-19T21:14:59 | null | UTF-8 | C++ | false | false | 2,035 | cpp | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE194_Unexpected_Sign_Extension__negative_memcpy_74b.cpp
Label Definition File: CWE194_Unexpected_Sign_Extension.label.xml
Template File: sources-sink-74b.tmpl.cpp
*/
/*
* @description
* CWE: 194 Unexpected Sign Extension
* BadSource: negative Set data to a fixed negative number
* GoodSource: Positive integer
* Sinks: memcpy
* BadSink : Copy strings using memcpy() with the length of data
* Flow Variant: 74 Data flow: data passed in a map from one function to another in different source files
*
* */
#include "std_testcase.h"
#include <map>
using namespace std;
namespace CWE194_Unexpected_Sign_Extension__negative_memcpy_74
{
#ifndef OMITBAD
void badSink(map<int, short> dataMap)
{
/* copy data out of dataMap */
short data = dataMap[2];
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign extension could result in a very large number */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B uses the GoodSource with the BadSink */
void goodG2BSink(map<int, short> dataMap)
{
short data = dataMap[2];
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign extension could result in a very large number */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
}
#endif /* OMITGOOD */
} /* close namespace */
| [
"yzhang0701@gmail.com"
] | yzhang0701@gmail.com |
4dc8a209feed2f7617261c04ba262888592c439b | 7e2901a8408d580bc1676a6c52a0990ef38e9528 | /corrade/src/Corrade/Containers/BigEnumSet.h | 580a567e608fd947d8ddb600462a58ce9dc8fef7 | [
"MIT",
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | sspike2/MagnumTest | a5aadf70a02fec6f1f45bebd980deccc5cce9d8a | b07aa0daf22978c85e352e81585e748d44c32638 | refs/heads/main | 2023-03-05T08:08:04.434333 | 2021-02-19T19:00:21 | 2021-02-19T19:00:21 | 340,454,325 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,696 | h | #ifndef Corrade_Containers_BigEnumSet_h
#define Corrade_Containers_BigEnumSet_h
/*
This file is part of Corrade.
Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017, 2018, 2019, 2020, 2021
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
/** @file
* @brief Class @ref Corrade::Containers::BigEnumSet
* @m_since_latest
*
* @see @ref Corrade/Containers/BigEnumSet.hpp
*/
#include <cstdint>
#include "Corrade/Containers/EnumSet.h" /* reusing the macros */
#include "Corrade/Containers/sequenceHelpers.h"
#include "Corrade/Utility/Assert.h"
namespace Corrade { namespace Containers {
namespace Implementation {
template<class T> constexpr std::uint64_t bigEnumSetElementValue(std::size_t i, T value) {
return static_cast<typename std::underlying_type<T>::type>(value)/64 == i ? (1ull << (static_cast<typename std::underlying_type<T>::type>(value) % 64)) : 0;
}
}
/**
@brief Set of more than 64 enum values
@tparam T Enum type
@tparam size How many 64-bit integers to use to store the value
@m_since_latest
A variant of @ref EnumSet that is able to handle sets of more than 64 values
(which is the largest standard integer type) by treating the @cpp enum @ce
values as bit positions instead of bit values. Internally an array is used for
storage and the class doesn't provide any equivalent to
@ref EnumSet::operator UnderlyingType().
While it's *theoretically* possible to store up to @f$ 2^{64} @f$ different
values, the storage is artificially limited to 8192 values, which fits into
1 kB. With a 16-bit @p T and larger, you're expected to set the @p size
template parameter to a reasonable upper bound, not larger than @cpp 128 @ce.
On construction, the enum value is checked against this limit to ensure no
bits are ignored by accident.
Below is a side-by-side comparison of an equivalent enum set implementation in
@ref EnumSet and @ref BigEnumSet --- the only difference is enum values being
specified as @cpp i @ce instead of @cpp 1 << i @ce and the @cpp typedef @ce,
the @ref CORRADE_ENUMSET_OPERATORS() / @ref CORRADE_ENUMSET_FRIEND_OPERATORS()
macro is the same:
@m_class{m-row m-container-inflate}
@parblock
@m_div{m-col-m-6}
@snippet Containers.cpp BigEnumSet-usage1
@m_enddiv
@m_div{m-col-m-6}
@snippet Containers.cpp BigEnumSet-usage2
@m_enddiv
@endparblock
@see @ref bigEnumSetDebugOutput()
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
template<class T, std::size_t size = (1 << (sizeof(T)*8 - 6))>
#else
template<class T, std::size_t size>
#endif
class BigEnumSet {
static_assert(std::is_enum<T>::value, "BigEnumSet type must be a strongly typed enum");
static_assert(size && size <= std::uint64_t{1} << (sizeof(T)*8 - 6), "size out of range for given underlying type");
static_assert(size <= 128, "BigEnumSet size is capped at 1 kB (8192 different values) to prevent accidents");
public:
typedef T Type; /**< @brief Enum type */
enum: std::size_t {
Size = size /**< Count of 64-bit integers storing this set */
};
/** @brief Create an empty set */
constexpr /*implicit*/ BigEnumSet(): _data{} {}
/** @brief Create a set from one value */
constexpr /*implicit*/ BigEnumSet(T value): BigEnumSet<T, size>{
(CORRADE_CONSTEXPR_ASSERT(static_cast<typename std::underlying_type<T>::type>(value) < size*64,
"Containers::BigEnumSet: value" << static_cast<typename std::underlying_type<T>::type>(value) << "too large for a" << size*64 << Utility::Debug::nospace << "-bit storage"
), nullptr),
value, typename Implementation::GenerateSequence<Size>::Type{}} {}
/**
* @brief Create an uninitialized set
*
* The contents are left in an undefined state.
*/
explicit BigEnumSet(NoInitT) {}
/** @brief Equality comparison */
constexpr bool operator==(const BigEnumSet<T, size>& other) const {
return equalsInternal(other, typename Implementation::GenerateSequence<Size>::Type{});
}
/** @brief Non-equality comparison */
constexpr bool operator!=(const BigEnumSet<T, size>& other) const {
return !operator==(other);
}
/**
* @brief Stored data
*
* Returns an array of size @ref Size.
*/
constexpr const std::uint64_t* data() const { return +_data; }
/**
* @brief Whether @p other is a subset of this (@f$ a \supseteq o @f$)
*
* Equivalent to @cpp (a & other) == other @ce.
*/
constexpr bool operator>=(const BigEnumSet<T, size>& other) const {
return (*this & other) == other;
}
/**
* @brief Whether @p other is a superset of this (@f$ a \subseteq o @f$)
*
* Equivalent to @cpp (a & other) == a @ce.
*/
constexpr bool operator<=(const BigEnumSet<T, size>& other) const {
return (*this & other) == *this;
}
/** @brief Union of two sets */
constexpr BigEnumSet<T, size> operator|(const BigEnumSet<T, size>& other) const {
return orInternal(other, typename Implementation::GenerateSequence<Size>::Type{});
}
/** @brief Union two sets and assign */
BigEnumSet<T, size>& operator|=(const BigEnumSet<T, size>& other) {
for(std::size_t i = 0; i != Size; ++i)
_data[i] |= other._data[i];
return *this;
}
/** @brief Intersection of two sets */
constexpr BigEnumSet<T, size> operator&(const BigEnumSet<T, size>& other) const {
return andInternal(other, typename Implementation::GenerateSequence<Size>::Type{});
}
/** @brief Intersect two sets and assign */
BigEnumSet<T, size>& operator&=(const BigEnumSet<T, size>& other) {
for(std::size_t i = 0; i != Size; ++i)
_data[i] &= other._data[i];
return *this;
}
/** @brief XOR of two sets */
constexpr BigEnumSet<T, size> operator^(const BigEnumSet<T, size>& other) const {
return xorInternal(other, typename Implementation::GenerateSequence<Size>::Type{});
}
/** @brief XOR two sets and assign */
BigEnumSet<T, size>& operator^=(const BigEnumSet<T, size>& other) {
for(std::size_t i = 0; i != Size; ++i)
_data[i] ^= other._data[i];
return *this;
}
/** @brief Set complement */
constexpr BigEnumSet<T, size> operator~() const {
return inverseInternal(typename Implementation::GenerateSequence<Size>::Type{});
}
/**
* @brief Boolean conversion
*
* Returns @cpp true @ce if at least one bit is set, @cpp false @ce
* otherwise.
*/
constexpr explicit operator bool() const {
return nonZeroInternal(typename Implementation::GenerateSequence<Size>::Type{});
}
private:
/* Used by the BigEnumSet(T) constructor, void* to avoid accidental
matches by users */
template<std::size_t ...sequence> constexpr explicit BigEnumSet(void*, T value, Implementation::Sequence<sequence...>): _data{Implementation::bigEnumSetElementValue(sequence, value)...} {}
/* Used by the *Internal() functions below, void* to avoid accidental
matches by users */
template<class First, class ...Next> constexpr explicit BigEnumSet(void*, First first, Next... next): _data{first, next...} {
static_assert(sizeof...(Next) + 1 == Size, "improper value count for construction");
}
constexpr bool nonZeroInternal(Implementation::Sequence<>) const {
return false;
}
template<std::size_t first, std::size_t ...next> constexpr bool nonZeroInternal(Implementation::Sequence<first, next...>) const {
return _data[first] || nonZeroInternal(Implementation::Sequence<next...>{});
}
constexpr bool equalsInternal(const BigEnumSet<T, size>&, Implementation::Sequence<>) const {
return true;
}
template<std::size_t first, std::size_t ...next> constexpr bool equalsInternal(const BigEnumSet<T, size>& other, Implementation::Sequence<first, next...>) const {
return _data[first] == other._data[first] && equalsInternal(other, Implementation::Sequence<next...>{});
}
template<std::size_t ...sequence> constexpr BigEnumSet<T, size> orInternal(const BigEnumSet<T, size>& other, Implementation::Sequence<sequence...>) const {
return BigEnumSet<T, size>{nullptr, (_data[sequence] | other._data[sequence])...};
}
template<std::size_t ...sequence> constexpr BigEnumSet<T, size> andInternal(const BigEnumSet<T, size>& other, Implementation::Sequence<sequence...>) const {
return BigEnumSet<T, size>{nullptr, (_data[sequence] & other._data[sequence])...};
}
template<std::size_t ...sequence> constexpr BigEnumSet<T, size> xorInternal(const BigEnumSet<T, size>& other, Implementation::Sequence<sequence...>) const {
return BigEnumSet<T, size>{nullptr, (_data[sequence] ^ other._data[sequence])...};
}
template<std::size_t ...sequence> constexpr BigEnumSet<T, size> inverseInternal(Implementation::Sequence<sequence...>) const {
return BigEnumSet<T, size>{nullptr, ~_data[sequence]...};
}
std::uint64_t _data[Size];
};
}}
#endif
| [
"mail.sushrut@gmail.com"
] | mail.sushrut@gmail.com |
db876be3d1d9b569e57368726ec73b0a9d3bcd7a | c14500adc5ce57e216123138e8ab55c3e9310953 | /Plugin/Annotate.cpp | 47792b14a8c5d065ad9425eba1c2b4926b478d27 | [
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.0-or-later",
"LicenseRef-scancode-generic-exception",
"GPL-1.0-or-later",
"LicenseRef-scancode-proprietary-license",
"GPL-2.0-only",
"GPL-2.0-or-later",
"LicenseRef-scancode-other-copyleft",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ResonanceGroup/GMSH304 | 8c8937ed3839c9c85ab31c7dd2a37568478dc08e | a07a210131ee7db8c0ea5e22386270ceab44a816 | refs/heads/master | 2020-03-14T23:58:48.751856 | 2018-05-02T13:51:09 | 2018-05-02T13:51:09 | 131,857,142 | 0 | 1 | MIT | 2018-05-02T13:51:10 | 2018-05-02T13:47:05 | null | UTF-8 | C++ | false | false | 8,321 | cpp | // Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
#include <vector>
#include "GmshConfig.h"
#include "Annotate.h"
#include "Context.h"
#if defined(HAVE_OPENGL)
#include "drawContext.h"
#endif
StringXNumber AnnotateOptions_Number[] = {
{GMSH_FULLRC, "X", GMSH_AnnotatePlugin::callbackX, 50.},
{GMSH_FULLRC, "Y", GMSH_AnnotatePlugin::callbackY, 30.},
{GMSH_FULLRC, "Z", GMSH_AnnotatePlugin::callbackZ, 0.},
{GMSH_FULLRC, "ThreeD", GMSH_AnnotatePlugin::callback3D, 0.},
{GMSH_FULLRC, "FontSize", GMSH_AnnotatePlugin::callbackFontSize, 14.},
{GMSH_FULLRC, "View", NULL, -1.}
};
StringXString AnnotateOptions_String[] = {
{GMSH_FULLRC, "Text", GMSH_AnnotatePlugin::callbackText, "My Text"},
{GMSH_FULLRC, "Font", GMSH_AnnotatePlugin::callbackFont, "Helvetica"},
{GMSH_FULLRC, "Align", GMSH_AnnotatePlugin::callbackAlign, "Left"}
};
extern "C"
{
GMSH_Plugin *GMSH_RegisterAnnotatePlugin()
{
return new GMSH_AnnotatePlugin();
}
}
static double getStyle()
{
int fontsize = (int)AnnotateOptions_Number[4].def, font = 0, align = 0;
#if defined(HAVE_OPENGL)
font = drawContext::global()->getFontIndex
(AnnotateOptions_String[1].def.c_str());
align = drawContext::global()->getFontAlign
(AnnotateOptions_String[2].def.c_str());
#endif
return (double)((align<<16)|(font<<8)|(fontsize));
}
void GMSH_AnnotatePlugin::draw(void *context)
{
#if defined(HAVE_OPENGL)
double X = AnnotateOptions_Number[0].def;
double Y = AnnotateOptions_Number[1].def;
double Z = AnnotateOptions_Number[2].def;
double style = getStyle();
drawContext *ctx = (drawContext*)context;
glColor4ubv((GLubyte *) & CTX::instance()->color.fg);
if(AnnotateOptions_Number[3].def){ // 3D
ctx->drawString(AnnotateOptions_String[0].def, X, Y, Z, style);
// draw 10-pixel marker
double d = 10 * ctx->pixel_equiv_x / ctx->s[0];
glBegin(GL_LINES);
glVertex3d(X-d,Y,Z); glVertex3d(X+d,Y,Z);
glVertex3d(X,Y-d,Z); glVertex3d(X,Y+d,Z);
glVertex3d(X,Y,Z-d); glVertex3d(X,Y,Z+d);
glEnd();
}
else{
double modelview[16], projection[16];
glGetDoublev(GL_PROJECTION_MATRIX, projection);
glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho((double)ctx->viewport[0], (double)ctx->viewport[2],
(double)ctx->viewport[1], (double)ctx->viewport[3], -1., 1.);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
ctx->fix2dCoordinates(&X, &Y);
ctx->drawString(AnnotateOptions_String[0].def, X, Y, 0., style);
// draw 10-pixel marker
glBegin(GL_LINES);
glVertex2d(X-10,Y); glVertex2d(X+10,Y);
glVertex2d(X,Y-10); glVertex2d(X,Y+10);
glEnd();
glMatrixMode(GL_PROJECTION);
glLoadMatrixd(projection);
glMatrixMode(GL_MODELVIEW);
glLoadMatrixd(modelview);
}
#endif
}
double GMSH_AnnotatePlugin::callback(int num, int action, double value, double *opt,
double step, double min, double max)
{
switch(action){ // configure the input field
case 1: return step;
case 2: return min;
case 3: return max;
default: break;
}
*opt = value;
GMSH_Plugin::setDrawFunction(draw);
return 0.;
}
std::string GMSH_AnnotatePlugin::callbackStr(int num, int action, std::string value,
std::string &opt)
{
opt = value;
GMSH_Plugin::setDrawFunction(draw);
return opt;
}
double GMSH_AnnotatePlugin::callbackX(int num, int action, double value)
{
// not perfect: the change will only take place if we reopen the dialog...
int dim3 = (int)AnnotateOptions_Number[3].def;
return callback(num, action, value, &AnnotateOptions_Number[0].def,
dim3 ? CTX::instance()->lc/200. : 0.5,
dim3 ? -CTX::instance()->lc : -100.,
dim3 ? CTX::instance()->lc : 100000.);
}
double GMSH_AnnotatePlugin::callbackY(int num, int action, double value)
{
// not perfect: the change will only take place if we reopen the dialog...
int dim3 = (int)AnnotateOptions_Number[3].def;
return callback(num, action, value, &AnnotateOptions_Number[1].def,
dim3 ? CTX::instance()->lc/200. : 0.5,
dim3 ? -CTX::instance()->lc : -100.,
dim3 ? CTX::instance()->lc : 100000.);
}
double GMSH_AnnotatePlugin::callbackZ(int num, int action, double value)
{
// not perfect: the change will only take place if we reopen the dialog...
int dim3 = (int)AnnotateOptions_Number[3].def;
return callback(num, action, value, &AnnotateOptions_Number[2].def,
dim3 ? CTX::instance()->lc/200. : 0.5,
dim3 ? -CTX::instance()->lc : -100.,
dim3 ? CTX::instance()->lc : 100000.);
}
double GMSH_AnnotatePlugin::callback3D(int num, int action, double value)
{
return callback(num, action, value, &AnnotateOptions_Number[3].def,
1, 0, 1);
}
double GMSH_AnnotatePlugin::callbackFontSize(int num, int action, double value)
{
return callback(num, action, value, &AnnotateOptions_Number[4].def,
1, 5, 100);
}
std::string GMSH_AnnotatePlugin::callbackText(int num, int action, std::string value)
{
return callbackStr(num, action, value, AnnotateOptions_String[0].def);
}
std::string GMSH_AnnotatePlugin::callbackFont(int num, int action, std::string value)
{
return callbackStr(num, action, value, AnnotateOptions_String[1].def);
}
std::string GMSH_AnnotatePlugin::callbackAlign(int num, int action, std::string value)
{
return callbackStr(num, action, value, AnnotateOptions_String[2].def);
}
std::string GMSH_AnnotatePlugin::getHelp() const
{
return "Plugin(Annotate) adds the text string `Text', "
"in font `Font' and size `FontSize', in the view "
"`View'. The string is aligned according to `Align'.\n\n"
"If `ThreeD' is equal to 1, the plugin inserts "
"the string in model coordinates at the position "
"(`X',`Y',`Z'). If `ThreeD' is equal to 0, the plugin "
"inserts the string in screen coordinates at "
"the position (`X',`Y').\n\n"
"If `View' < 0, the plugin is run on the current view.\n\n"
"Plugin(Annotate) is executed in-place for list-based "
"datasets or creates a new view for other datasets.";
}
int GMSH_AnnotatePlugin::getNbOptions() const
{
return sizeof(AnnotateOptions_Number) / sizeof(StringXNumber);
}
StringXNumber *GMSH_AnnotatePlugin::getOption(int iopt)
{
return &AnnotateOptions_Number[iopt];
}
int GMSH_AnnotatePlugin::getNbOptionsStr() const
{
return sizeof(AnnotateOptions_String) / sizeof(StringXString);
}
StringXString *GMSH_AnnotatePlugin::getOptionStr(int iopt)
{
return &AnnotateOptions_String[iopt];
}
PView *GMSH_AnnotatePlugin::execute(PView *v)
{
double X = AnnotateOptions_Number[0].def;
double Y = AnnotateOptions_Number[1].def;
double Z = AnnotateOptions_Number[2].def;
int dim3 = (int)AnnotateOptions_Number[3].def;
int iView = (int)AnnotateOptions_Number[5].def;
std::string text = AnnotateOptions_String[0].def;
double style = getStyle();
PView *v1 = getView(iView, v);
if(!v1) return v;
PViewData *data1 = v1->getData();
PView *v2 = v1;
PViewDataList *data2 = getDataList(v2, false);
if(!data2){
v2 = new PView();
data2 = getDataList(v2);
}
if(dim3){
data2->T3D.push_back(X);
data2->T3D.push_back(Y);
data2->T3D.push_back(Z);
data2->T3D.push_back(style);
data2->T3D.push_back(data2->T3C.size());
for(unsigned int i = 0; i < text.size(); i++)
data2->T3C.push_back(text[i]);
data2->T3C.push_back('\0');
data2->NbT3++;
}
else{
data2->T2D.push_back(X);
data2->T2D.push_back(Y);
data2->T2D.push_back(style);
data2->T2D.push_back(data2->T2C.size());
for(unsigned int i = 0; i < text.size(); i++)
data2->T2C.push_back(text[i]);
data2->T2C.push_back('\0');
data2->NbT2++;
}
if(v2 != v1){
for(int i = 0; i < data1->getNumTimeSteps(); i++)
data2->Time.push_back(data1->getTime(i));
data2->setName(data1->getName() + "_Annotate");
data2->setFileName(data1->getName() + "_Annotate.pos");
}
data2->finalize();
return v2;
}
| [
"=phillipmobley2@gmail.com"
] | =phillipmobley2@gmail.com |
86a2ad164fa3130ed1c4f96f990a67d8dbc14396 | b53b561b41e8b14ecbd5d3ddd38cd740b48a6321 | /10_more_recursion/subseq.cc | d506034d13b35a5629590f7118e9c99fe87586a0 | [] | no_license | Aashutosh97/Launchpad17-Fasttrack | d53d8be33c17e7ae2bc86aac3bcf86d653c4993f | 975cd5054666404f8ed1a37885d3d5982f88af20 | refs/heads/master | 2020-03-23T03:23:16.631264 | 2018-01-21T10:32:17 | 2018-01-21T10:32:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 616 | cc | // Deepak Aggarwal, Coding Blocks
// deepak@codingblocks.com
#include <iostream>
#include <cstring>
using namespace std;
void printSubSeq(char s[], int be, int en, char decision[], int i) {
if (be == en) {
decision[i] = '\0';
cout << decision << endl;
return;
}
// lets fix 'a'
decision[i] = s[be];
printSubSeq(s, be + 1, en, decision, i + 1);
// lets ignore 'a'
printSubSeq(s, be + 1, en, decision, i);
}
int main() {
char str[100];
cin >> str;
int len = strlen(str);
char decision[100] = "";
printSubSeq(str, 0, len, decision, 0);
} | [
"daggarwal77@gmail.com"
] | daggarwal77@gmail.com |
810a4960f629456b3343e341ed4a7402babda64a | 6b660cb96baa003de9e18e332b048c0f1fa67ab9 | /External/SDK/Title_GoldenBenefactor_functions.cpp | c72c8c68ef89f4e49e91634f82ab4eb65b4fefb1 | [] | no_license | zanzo420/zSoT-SDK | 1edbff62b3e12695ecf3969537a6d2631a0ff36f | 5e581eb0400061f6e5f93b3affd95001f62d4f7c | refs/heads/main | 2022-07-30T03:35:51.225374 | 2021-07-07T01:07:20 | 2021-07-07T01:07:20 | 383,634,601 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 550 | cpp | // Name: SoT, Version: 2.2.0.2
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------
void UTitle_GoldenBenefactor_C::AfterRead()
{
UTitleDesc::AfterRead();
}
void UTitle_GoldenBenefactor_C::BeforeDelete()
{
UTitleDesc::BeforeDelete();
}
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"Massimo.linker@gmail.com"
] | Massimo.linker@gmail.com |
2334bd6cba189985da5c282d8cdbc72fb4ecc5b7 | ec204c2ea3bad317692d264fb6543fd6c3e5ece1 | /Exercises_02/Es02/randomwalk.h | ca029acf29677c1b7b669d06bcabf027a4b24370 | [] | no_license | LeonardoPalchetti/LSN_LeonardoPalchetti | 37e71f7810d1f68d0a9cb6d156cd02f2ea30db91 | 3637378a1ec870c2cbdcbfb6adc4eb4ff09d0a2f | refs/heads/master | 2022-11-08T20:33:49.013381 | 2020-06-23T17:02:33 | 2020-06-23T17:02:33 | 274,459,109 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,108 | h | #ifndef __Integrale__
#define __Integrale__
#include <cmath>
#include "random.h"
#include <fstream>
#include <iostream>
using namespace std;
struct point {
double x, y, z; // cordinate punto
};
struct vector{
double r;
double theta, phi;
};
class RandomWalk {
protected:
point *_x;
int _P;
double *_dist;
Random rnd;
public:
RandomWalk(int); //genera un randomwalk lungo P passi dall'origine
~RandomWalk();
void Passo_lattice(); //esegue P passi nel reticolo
void Passo_space(); //esegue P passi nello spazio
void AnalisiDist(); //esegue l'Analisi delle distanze
double GetDist(int i){return _dist[i];}; //restituisce la i-esima distanza
void New();
double dist2( point); // funzione calcola distanza al quadrato dall'origine del punto p
point passo_lattice(point, int, double); //funzione randomwalk nel reticolo unitario
point passo_space(point, vector); //funzione randomwalk nello spazio
double funzionetheta(); //funzione calcola componente theta dell'angolo solido
};
#endif
| [
"palchetti3@gmail.com"
] | palchetti3@gmail.com |
346e9d0d7d85a4d68fed6bf6d740649abc3e17f5 | 955ef01de0d355ddced3579f9d1b26419c494bd8 | /AGT_TEMPLATE/engine/src/pch.h | 5c7f874779a07c0ec1e5661d35eaca2f698716d4 | [
"MIT"
] | permissive | Luke-Pixel/Advanced-Games-Technology-C---Project | fc76565c7ef9989364981dc8d82f7d85aee02927 | 17e210ab0e97c1a2359039c4dbf3a834c56c9598 | refs/heads/master | 2022-12-04T13:04:18.872399 | 2020-08-26T14:32:56 | 2020-08-26T14:32:56 | 290,520,511 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 540 | h | #pragma once
#include <iostream>
#include <memory>
#include <utility>
#include <algorithm>
#include <functional>
#include <string>
#include <sstream>
#include <array>
#include <vector>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include "engine/core/logger.h"
#ifdef ENGINE_PLATFORM_WIN
#include <Windows.h>
#endif
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_ptr.hpp"
#include "engine/utils/glm_extension.h"
| [
"Luke1014@live.co.uk"
] | Luke1014@live.co.uk |
07fba08172f0c6614cd5556ef06d22942070348e | 1d2ba792308d055713245364fcc293d1a0070d56 | /src/qt/qtipcserver.cpp | be875e760a988e21e1f957ef3fbef4bfff23c7c1 | [
"MIT"
] | permissive | mrk-9/GirlsToken | e962eabcf7539909e41701f675327ec931102340 | 9b56eb94e204b4e53ca360178088219ff6952fa2 | refs/heads/master | 2020-03-21T05:48:13.082275 | 2018-06-21T14:33:52 | 2018-06-21T14:33:52 | 138,181,578 | 2 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 4,931 | cpp | // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/version.hpp>
#if defined(WIN32) && BOOST_VERSION == 104900
#define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME
#define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
#endif
#include "qtipcserver.h"
#include "guiconstants.h"
#include "ui_interface.h"
#include "util.h"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>
#include <boost/version.hpp>
#if defined(WIN32) && (!defined(BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME) || !defined(BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME) || BOOST_VERSION < 104900)
#warning Compiling without BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME and BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME uncommented in boost/interprocess/detail/tmp_dir_helpers.hpp or using a boost version before 1.49 may have unintended results see svn.boost.org/trac/boost/ticket/5392
#endif
using namespace boost;
using namespace boost::interprocess;
using namespace boost::posix_time;
#if defined MAC_OSX || defined __FreeBSD__
// URI handling not implemented on OSX yet
void ipcScanRelay(int argc, char *argv[]) { }
void ipcInit(int argc, char *argv[]) { }
#else
static void ipcThread2(void* pArg);
static bool ipcScanCmd(int argc, char *argv[], bool fRelay)
{
// Check for URI in argv
bool fSent = false;
for (int i = 1; i < argc; i++)
{
if (boost::algorithm::istarts_with(argv[i], "GirlsToken:"))
{
const char *strURI = argv[i];
try {
boost::interprocess::message_queue mq(boost::interprocess::open_only, BITCOINURI_QUEUE_NAME);
if (mq.try_send(strURI, strlen(strURI), 0))
fSent = true;
else if (fRelay)
break;
}
catch (boost::interprocess::interprocess_exception &ex) {
// don't log the "file not found" exception, because that's normal for
// the first start of the first instance
if (ex.get_error_code() != boost::interprocess::not_found_error || !fRelay)
{
printf("main() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what());
break;
}
}
}
}
return fSent;
}
void ipcScanRelay(int argc, char *argv[])
{
if (ipcScanCmd(argc, argv, true))
exit(0);
}
static void ipcThread(void* pArg)
{
// Make this thread recognisable as the GUI-IPC thread
RenameThread("GirlsToken-gui-ipc");
try
{
ipcThread2(pArg);
}
catch (std::exception& e) {
PrintExceptionContinue(&e, "ipcThread()");
} catch (...) {
PrintExceptionContinue(NULL, "ipcThread()");
}
printf("ipcThread exited\n");
}
static void ipcThread2(void* pArg)
{
printf("ipcThread started\n");
message_queue* mq = (message_queue*)pArg;
char buffer[MAX_URI_LENGTH + 1] = "";
size_t nSize = 0;
unsigned int nPriority = 0;
while (true)
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
{
uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize));
MilliSleep(1000);
}
if (fShutdown)
break;
}
// Remove message queue
message_queue::remove(BITCOINURI_QUEUE_NAME);
// Cleanup allocated memory
delete mq;
}
void ipcInit(int argc, char *argv[])
{
message_queue* mq = NULL;
char buffer[MAX_URI_LENGTH + 1] = "";
size_t nSize = 0;
unsigned int nPriority = 0;
try {
mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH);
// Make sure we don't lose any bitcoin: URIs
for (int i = 0; i < 2; i++)
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
{
uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize));
}
else
break;
}
// Make sure only one bitcoin instance is listening
message_queue::remove(BITCOINURI_QUEUE_NAME);
delete mq;
mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH);
}
catch (interprocess_exception &ex) {
printf("ipcInit() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what());
return;
}
if (!NewThread(ipcThread, mq))
{
delete mq;
return;
}
ipcScanCmd(argc, argv, false);
}
#endif
| [
"chuch@chuchs-Mac-mini.local"
] | chuch@chuchs-Mac-mini.local |
5ad5649c89715b59fa1653c9a4ec5aa406c8cb86 | 0aca9ec0a5e9e450bf54195aeec03428762c27d2 | /src/zuwm/accumulators.h | 1e67c59dc87a2949a5f74ce0132dc9781b805377 | [
"MIT"
] | permissive | unitedworldmoney/unitedworldmoney-source | 1bc593a348376555979f00bdb8dfe13c3d2661a3 | 4229d64f48ac7c7e622595cf9ffe9a08878c9252 | refs/heads/main | 2023-07-18T06:31:02.082512 | 2021-09-06T14:26:43 | 2021-09-06T14:26:43 | 403,652,373 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,460 | h | // Copyright (c) 2017-2019 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef UnitedWorldMoney_ACCUMULATORS_H
#define UnitedWorldMoney_ACCUMULATORS_H
#include "libzerocoin/Accumulator.h"
#include "libzerocoin/Coin.h"
#include "libzerocoin/Denominations.h"
#include "zuwm/zerocoin.h"
#include "accumulatormap.h"
#include "chain.h"
#include "uint256.h"
#include "bloom.h"
#include "witness.h"
class CBlockIndex;
std::map<libzerocoin::CoinDenomination, int> GetMintMaturityHeight();
/**
* Calculate the acc witness for a single coin.
* @return true if the witness was calculated well
*/
bool CalculateAccumulatorWitnessFor(
const libzerocoin::ZerocoinParams* params,
int startingHeight,
int maxCalculationRange,
libzerocoin::CoinDenomination den,
const CBloomFilter& filter,
libzerocoin::Accumulator& accumulator,
libzerocoin::AccumulatorWitness& witness,
int& nMintsAdded,
string& strError,
list<CBigNum>& ret,
int &heightStop
);
bool GenerateAccumulatorWitness(
const libzerocoin::PublicCoin &coin,
libzerocoin::Accumulator& accumulator,
libzerocoin::AccumulatorWitness& witness,
int& nMintsAdded,
string& strError,
CBlockIndex* pindexCheckpoint = nullptr);
bool GenerateAccumulatorWitness(CoinWitnessData* coinWitness, AccumulatorMap& mapAccumulators, CBlockIndex* pindexCheckpoint);
list<libzerocoin::PublicCoin> GetPubcoinFromBlock(const CBlockIndex* pindex);
bool GetAccumulatorValueFromDB(uint256 nCheckpoint, libzerocoin::CoinDenomination denom, CBigNum& bnAccValue);
bool GetAccumulatorValue(int& nHeight, const libzerocoin::CoinDenomination denom, CBigNum& bnAccValue);
bool GetAccumulatorValueFromChecksum(uint32_t nChecksum, bool fMemoryOnly, CBigNum& bnAccValue);
void AddAccumulatorChecksum(const uint32_t nChecksum, const CBigNum &bnValue, bool fMemoryOnly);
bool CalculateAccumulatorCheckpoint(int nHeight, uint256& nCheckpoint, AccumulatorMap& mapAccumulators);
void DatabaseChecksums(AccumulatorMap& mapAccumulators);
bool LoadAccumulatorValuesFromDB(const uint256 nCheckpoint);
bool EraseAccumulatorValues(const uint256& nCheckpointErase, const uint256& nCheckpointPrevious);
uint32_t ParseChecksum(uint256 nChecksum, libzerocoin::CoinDenomination denomination);
uint32_t GetChecksum(const CBigNum &bnValue);
int GetChecksumHeight(uint32_t nChecksum, libzerocoin::CoinDenomination denomination);
bool InvalidCheckpointRange(int nHeight);
bool ValidateAccumulatorCheckpoint(const CBlock& block, CBlockIndex* pindex, AccumulatorMap& mapAccumulators);
// Exceptions
class NotEnoughMintsException : public std::exception {
public:
std::string message;
NotEnoughMintsException(const string &message) : message(message) {}
};
class GetPubcoinException : public std::exception {
public:
std::string message;
GetPubcoinException(const string &message) : message(message) {}
};
class ChecksumInDbNotFoundException : public std::exception {
public:
std::string message;
ChecksumInDbNotFoundException(const string &message) : message(message) {}
};
class searchMintHeightException : public std::exception {
public:
std::string message;
searchMintHeightException(const string &message) : message(message) {}
};
#endif //UnitedWorldMoney_ACCUMULATORS_H
| [
"34356906+unitedworldmoney@users.noreply.github.com"
] | 34356906+unitedworldmoney@users.noreply.github.com |
a984c3b4b7f78ad4a579a34cd972e5eca97c573f | 9fac9857fb1a674f02df4dbaa97d4c05aec1d0d4 | /src/FlatWorld/Engine/Core/Timer.cpp | 0a2b936b16871f1d9c743b3b19ba88322f8ea7dd | [] | no_license | KiraIsL/Time-Travel-Platformer | e0b7dfedd7bb61503c83fcba9e4a987b27fd3548 | b5b55b4b89f71efa170fdb56467bd0c199349252 | refs/heads/master | 2020-12-14T04:43:19.718960 | 2011-07-21T09:53:05 | 2011-07-21T09:53:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,264 | cpp | #include "Timer.h"
CTimer::CTimer(void)
{
Init(30.f);
}
CTimer::CTimer(float timeCount)
{
Init(timeCount);
}
void CTimer::Init(float timeCount)
{
//****************** INITIALISATIONS **************************
// Awesome accurate timings are available from the CPU
if (QueryPerformanceFrequency((LARGE_INTEGER *) &perfFrequ))
{
perfCount = true;
this->timeCount = (DWORD)(perfFrequ / timeCount);
QueryPerformanceCounter((LARGE_INTEGER *) &timeLast);
timeScale = 1.0 / perfFrequ;
}
else // Can't be awesomely accurate :(
{
timeLast = timeGetTime();//Set the initial time
timeScale = 0.001;//millisecond time scale
this->timeCount = 33;//number of milliseconds between frames
}
timeNext = timeLast + this->timeCount;//set time update interval
//*************************************************************
}
CTimer::~CTimer(void)
{
}
void CTimer::Update()
{
timeLast = timeNow;
if (perfCount)
{
QueryPerformanceCounter((LARGE_INTEGER *) &timeNow);
}
else
{
timeNow = timeGetTime();
}
}
bool CTimer::Ready()
{
Update();
if (timeNow > timeNext) {
timeNext = timeNow + timeCount; //Reset the timer
return true;
}
else
{
return false;
}
}
float CTimer::DT()
{
return (float)((timeNow - timeLast) * timeScale);
}
| [
"tyranicmoron@gmail.com"
] | tyranicmoron@gmail.com |
a1916bb986e7f8937a5bb46ce7b328311abd3f2e | 09106a153473f7486f122e63c02a944fc721eb65 | /thread/base_thread/destruct_thread.cpp | cded049f00788a06bcd1ef83528de784741e2757 | [] | no_license | gripex90088/cpp_example | 9f6ee09d6b0068ece38a62c24e52691dd9f7b068 | ddd3f1ac635feb608738e1c90c10e4f3790dd60f | refs/heads/master | 2020-12-10T23:48:06.309404 | 2020-04-02T08:30:22 | 2020-04-02T08:30:22 | 233,744,109 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 266 | cpp | /*
* destruct_thread.cpp
*
* Created on: Jul 19, 2019
* Author: xuxing
*/
/*
* 竟态条件 (race condition)
* 当一个对象能被多个线程同时看到时,那么对象的销毁时机会变的模糊不清,可能出现各种竟态条件
*/
| [
"1355039189@qq.com"
] | 1355039189@qq.com |
8bf5cbf7c5c8f0edcfe365eea2ffde85286c5a13 | 2375d1860be18179b934334e9ea884fd73ee87b7 | /cpp_basic/39-bankingExample.cpp | c036a498dfb71f24b65a971f8bd09000a9b0d6bc | [] | no_license | kosan-tospa/hello-world | 28deb907a8c4759c92ebf704f5f0b024ef4738da | 776cffd7536ca932f74685eb5351b04b3ebe75ac | refs/heads/main | 2023-07-16T03:33:57.017482 | 2021-09-07T19:20:55 | 2021-09-07T19:20:55 | 404,094,914 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,067 | cpp | #include <iostream>
#include <fstream>
#include <cstdlib>
#include <vector>
#include <map>
using namespace std;
#define MIN_BALANCE 500
class InsufficientFunds
{
};
class Account
{
private:
long accountNumber;
string firstName;
string lastName;
float balance;
static long NextAccountNumber;
public:
Account() {}
Account(string fname, string lname, float balance);
long getAccNo() { return accountNumber; }
string getFirstName() { return firstName; }
string getLastName() { return lastName; }
float getBalance() { return balance; }
void Deposit(float amount);
void Withdraw(float amount);
static void setLastAccountNumber(long accountNumber);
static long getLastAccountNumber();
friend ofstream &operator<<(ofstream &ofs, Account &acc);
friend ifstream &operator>>(ifstream &ifs, Account &acc);
friend ostream &operator<<(ostream &os, Account &acc);
};
long Account::NextAccountNumber = 0;
class Bank
{
private:
map<long, Account> accounts;
public:
Bank();
Account OpenAccount(string fname, string lname, float balance);
Account BalanceEnquiry(long accountNumber);
Account Deposit(long accountNumber, float amount);
Account Withdraw(long accountNumber, float amount);
void CloseAccount(long accountNumber);
void ShowAllAccounts();
~Bank();
};
int main()
{
Bank b;
Account acc;
int choice;
string fname, lname;
long accountNumber;
float balance;
float amount;
cout << "***Banking System***" << endl;
do
{
cout << "\n\tSelect one option below ";
cout << "\n\t1 Open an Account";
cout << "\n\t2 Balance Enquiry";
cout << "\n\t3 Deposit";
cout << "\n\t4 Withdrawal";
cout << "\n\t5 Close an Account";
cout << "\n\t6 Show All Accounts";
cout << "\n\t7 Quit";
cout << "\nEnter your choice: ";
cin >> choice;
switch (choice)
{
case 1:
cout << "Enter First Name: ";
cin >> fname;
cout << "Enter Last Name: ";
cin >> lname;
cout << "Enter initil Balance: ";
cin >> balance;
acc = b.OpenAccount(fname, lname, balance);
cout << endl
<< "Congradulation Account is Created" << endl;
cout << acc;
break;
case 2:
cout << "Enter Account Number:";
cin >> accountNumber;
acc = b.BalanceEnquiry(accountNumber);
cout << endl
<< "Your Account Details" << endl;
cout << acc;
break;
case 3:
cout << "Enter Account Number:";
cin >> accountNumber;
cout << "Enter Balance:";
cin >> amount;
acc = b.Deposit(accountNumber, amount);
cout << endl
<< "Amount is Deposited" << endl;
cout << acc;
break;
case 4:
cout << "Enter Account Number:";
cin >> accountNumber;
cout << "Enter Balance:";
cin >> amount;
acc = b.Withdraw(accountNumber, amount);
cout << endl
<< "Amount Withdrawn" << endl;
cout << acc;
break;
case 5:
cout << "Enter Account Number:";
cin >> accountNumber;
b.CloseAccount(accountNumber);
cout << endl
<< "Account is Closed" << endl;
cout << acc;
case 6:
b.ShowAllAccounts();
break;
case 7:
break;
default:
cout << "\nEnter corret choice";
exit(0);
}
} while (choice != 7);
return 0;
}
Account::Account(string fname, string lname, float balance)
{
NextAccountNumber++;
accountNumber = NextAccountNumber;
firstName = fname;
lastName = lname;
this->balance = balance;
}
void Account::Deposit(float amount)
{
balance += amount;
}
void Account::Withdraw(float amount)
{
if (balance - amount < MIN_BALANCE)
throw InsufficientFunds();
balance -= amount;
}
void Account::setLastAccountNumber(long accountNumber)
{
NextAccountNumber = accountNumber;
}
long Account::getLastAccountNumber()
{
return NextAccountNumber;
}
ofstream &operator<<(ofstream &ofs, Account &acc)
{
ofs << acc.accountNumber << endl;
ofs << acc.firstName << endl;
ofs << acc.lastName << endl;
ofs << acc.balance << endl;
return ofs;
}
ifstream &operator>>(ifstream &ifs, Account &acc)
{
ifs >> acc.accountNumber;
ifs >> acc.firstName;
ifs >> acc.lastName;
ifs >> acc.balance;
return ifs;
}
ostream &operator<<(ostream &os, Account &acc)
{
os << "First Name:" << acc.getFirstName() << endl;
os << "Last Name:" << acc.getLastName() << endl;
os << "Account Number:" << acc.getAccNo() << endl;
os << "Balance:" << acc.getBalance() << endl;
return os;
}
Bank::Bank()
{
Account account;
ifstream infile;
infile.open("Bank.data");
if (!infile)
{
//cout<<"Error in Opening! File Not Found!!"<<endl;
return;
}
while (!infile.eof())
{
infile >> account;
accounts.insert(pair<long, Account>(account.getAccNo(), account));
}
Account::setLastAccountNumber(account.getAccNo());
infile.close();
}
Account Bank::OpenAccount(string fname, string lname, float balance)
{
ofstream outfile;
Account account(fname, lname, balance);
accounts.insert(pair<long, Account>(account.getAccNo(), account));
outfile.open("Bank.data", ios::trunc);
map<long, Account>::iterator itr;
for (itr = accounts.begin(); itr != accounts.end(); itr++)
{
outfile << itr->second;
}
outfile.close();
return account;
}
Account Bank::BalanceEnquiry(long accountNumber)
{
map<long, Account>::iterator itr = accounts.find(accountNumber);
return itr->second;
}
Account Bank::Deposit(long accountNumber, float amount)
{
map<long, Account>::iterator itr = accounts.find(accountNumber);
itr->second.Deposit(amount);
return itr->second;
}
Account Bank::Withdraw(long accountNumber, float amount)
{
map<long, Account>::iterator itr = accounts.find(accountNumber);
itr->second.Withdraw(amount);
return itr->second;
}
void Bank::CloseAccount(long accountNumber)
{
map<long, Account>::iterator itr = accounts.find(accountNumber);
cout << "Account Deleted" << itr->second;
accounts.erase(accountNumber);
}
void Bank::ShowAllAccounts()
{
map<long, Account>::iterator itr;
for (itr = accounts.begin(); itr != accounts.end(); itr++)
{
cout << "Account " << itr->first << endl
<< itr->second << endl;
}
}
Bank::~Bank()
{
ofstream outfile;
outfile.open("Bank.data", ios::trunc);
map<long, Account>::iterator itr;
for (itr = accounts.begin(); itr != accounts.end(); itr++)
{
outfile << itr->second;
}
outfile.close();
} | [
"kosan.tospa@yandex.com"
] | kosan.tospa@yandex.com |
20410b069efa600949182194315d5f80bddd7dcc | aa924bbb174676c00dfef9b976790a01506bd37e | /Sources/NodeEngine/NE_OrderedMap.hpp | 178c764695c698cb113079b8b03ed753cb9d3481 | [
"MIT"
] | permissive | kovacsv/VisualScriptEngine | 5b3b8b7b6999082b0f916034a83d6e9675510ed6 | 185a451e2391fbff0bb4dd5929e8634517382c4e | refs/heads/master | 2023-03-15T19:00:48.535709 | 2021-12-17T15:47:51 | 2021-12-17T15:47:51 | 113,492,822 | 156 | 32 | MIT | 2023-02-24T16:07:36 | 2017-12-07T19:57:56 | C++ | UTF-8 | C++ | false | false | 5,884 | hpp | #ifndef NE_ORDEREDMAP_HPP
#define NE_ORDEREDMAP_HPP
#include "NE_Debug.hpp"
#include <utility>
#include <list>
#include <unordered_map>
#include <functional>
#include <algorithm>
namespace NE
{
template <typename Key, typename Value>
class OrderedMap
{
public:
OrderedMap ();
OrderedMap (const OrderedMap& rhs);
OrderedMap (OrderedMap&& rhs);
~OrderedMap ();
OrderedMap& operator= (const OrderedMap& rhs);
OrderedMap& operator= (OrderedMap&& rhs);
bool IsEmpty () const;
bool Contains (const Key& key) const;
size_t Count () const;
Value& GetValue (const Key& key);
const Value& GetValue (const Key& key) const;
bool Insert (const Key& key, const Value& value);
bool InsertBefore (const Key& key, const Value& value, const Key& nextKey);
bool InsertAfter (const Key& key, const Value& value, const Key& prevKey);
void MakeSorted ();
bool Erase (const Key& key);
void Clear ();
void Enumerate (const std::function<bool (Value&)>& processor);
void Enumerate (const std::function<bool (const Value&)>& processor) const;
private:
using KeyValue = std::pair<Key, Value>;
using List = std::list<KeyValue>;
using Iterator = typename List::iterator;
List valueList;
std::unordered_map<Key, Iterator> keyToValueMap;
};
template <typename Key, typename Value>
OrderedMap<Key, Value>::OrderedMap () :
valueList (),
keyToValueMap ()
{
}
template <typename Key, typename Value>
OrderedMap<Key, Value>::OrderedMap (const OrderedMap& rhs) :
valueList (rhs.valueList),
keyToValueMap ()
{
for (auto it = valueList.begin (); it != valueList.end (); ++it) {
const KeyValue& keyValue = *it;
keyToValueMap.insert ({ keyValue.first, it });
}
}
template <typename Key, typename Value>
OrderedMap<Key, Value>::OrderedMap (OrderedMap&& rhs) :
valueList (std::move (rhs.valueList)),
keyToValueMap (std::move (rhs.keyToValueMap))
{
}
template <typename Key, typename Value>
OrderedMap<Key, Value>::~OrderedMap ()
{
}
template <typename Key, typename Value>
OrderedMap<Key, Value>& OrderedMap<Key, Value>::operator= (const OrderedMap& rhs)
{
if (this != &rhs) {
valueList = rhs.valueList;
keyToValueMap.clear ();
for (auto it = valueList.begin (); it != valueList.end (); ++it) {
const KeyValue& keyValue = *it;
keyToValueMap.insert ({ keyValue.first, it });
}
}
return *this;
}
template <typename Key, typename Value>
OrderedMap<Key, Value>& OrderedMap<Key, Value>::operator= (OrderedMap&& rhs)
{
if (this != &rhs) {
valueList = std::move (rhs.valueList);
keyToValueMap = std::move (rhs.keyToValueMap);
}
return *this;
}
template <typename Key, typename Value>
bool OrderedMap<Key, Value>::IsEmpty () const
{
return keyToValueMap.empty ();
}
template <typename Key, typename Value>
bool OrderedMap<Key, Value>::Contains (const Key& key) const
{
return keyToValueMap.find (key) != keyToValueMap.end ();
}
template <typename Key, typename Value>
size_t OrderedMap<Key, Value>::Count () const
{
return keyToValueMap.size ();
}
template <typename Key, typename Value>
Value& OrderedMap<Key, Value>::GetValue (const Key& key)
{
Iterator& iterator = keyToValueMap.at (key);
KeyValue& keyValue = *iterator;
return keyValue.second;
}
template <typename Key, typename Value>
const Value& OrderedMap<Key, Value>::GetValue (const Key& key) const
{
const Iterator& iterator = keyToValueMap.at (key);
const KeyValue& keyValue = *iterator;
return keyValue.second;
}
template <typename Key, typename Value>
bool OrderedMap<Key, Value>::Insert (const Key& key, const Value& value)
{
if (DBGERROR (keyToValueMap.find (key) != keyToValueMap.end ())) {
return false;
}
auto inserted = valueList.insert (valueList.end (), { key, value } );
keyToValueMap.insert ({ key, inserted });
return true;
}
template <typename Key, typename Value>
bool OrderedMap<Key, Value>::InsertBefore (const Key& key, const Value& value, const Key& nextKey)
{
if (DBGERROR (keyToValueMap.find (key) != keyToValueMap.end ())) {
return false;
}
auto foundNextValue = keyToValueMap.find (nextKey);
if (DBGERROR (foundNextValue == keyToValueMap.end ())) {
return false;
}
auto inserted = valueList.insert (foundNextValue->second, { key, value });
keyToValueMap.insert ({ key, inserted });
return true;
}
template <typename Key, typename Value>
bool OrderedMap<Key, Value>::InsertAfter (const Key& key, const Value& value, const Key& prevKey)
{
if (DBGERROR (keyToValueMap.find (key) != keyToValueMap.end ())) {
return false;
}
auto foundPrevValue = keyToValueMap.find (prevKey);
if (DBGERROR (foundPrevValue == keyToValueMap.end ())) {
return false;
}
auto inserted = valueList.insert (std::next (foundPrevValue->second), { key, value });
keyToValueMap.insert ({ key, inserted });
return true;
}
template <typename Key, typename Value>
void OrderedMap<Key, Value>::MakeSorted ()
{
valueList.sort ([&] (const KeyValue& a, const KeyValue& b) {
return a.first < b.first;
});
}
template <typename Key, typename Value>
bool OrderedMap<Key, Value>::Erase (const Key& key)
{
auto foundInMap = keyToValueMap.find (key);
if (DBGERROR (foundInMap == keyToValueMap.end ())) {
return false;
}
valueList.erase (foundInMap->second);
keyToValueMap.erase (key);
return true;
}
template <typename Key, typename Value>
void OrderedMap<Key, Value>::Clear ()
{
valueList.clear ();
keyToValueMap.clear ();
}
template <typename Key, typename Value>
void OrderedMap<Key, Value>::Enumerate (const std::function<bool (Value&)>& processor)
{
for (KeyValue& keyValue : valueList) {
if (!processor (keyValue.second)) {
break;
}
}
}
template <typename Key, typename Value>
void OrderedMap<Key, Value>::Enumerate (const std::function<bool (const Value&)>& processor) const
{
for (const KeyValue& keyValue : valueList) {
if (!processor (keyValue.second)) {
break;
}
}
}
}
#endif
| [
"viktorkovacs@gmail.com"
] | viktorkovacs@gmail.com |
10c6188983942d280ffea4e6741fd5b2b71988e1 | cefd6c17774b5c94240d57adccef57d9bba4a2e9 | /WebKit/Source/WebCore/platform/graphics/glx/GLContextGLX.h | edefc04c26556aa29bf66dc45b2440017848649c | [
"BSL-1.0",
"BSD-2-Clause",
"LGPL-2.0-only",
"LGPL-2.1-only"
] | permissive | adzhou/oragle | 9c054c25b24ff0a65cb9639bafd02aac2bcdce8b | 5442d418b87d0da161429ffa5cb83777e9b38e4d | refs/heads/master | 2022-11-01T05:04:59.368831 | 2014-03-12T15:50:08 | 2014-03-12T15:50:08 | 17,238,063 | 0 | 1 | BSL-1.0 | 2022-10-18T04:23:53 | 2014-02-27T05:39:44 | C++ | UTF-8 | C++ | false | false | 2,250 | h | /*
* Copyright (C) 2012 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef GLContextGLX_h
#define GLContextGLX_h
#if USE(GLX)
#include "GLContext.h"
typedef struct __GLXcontextRec* GLXContext;
typedef unsigned long GLXPbuffer;
typedef unsigned long GLXPixmap;
typedef unsigned char GLubyte;
typedef unsigned long Pixmap;
typedef unsigned long XID;
typedef void* ContextKeyType;
namespace WebCore {
class GLContextGLX : public GLContext {
WTF_MAKE_NONCOPYABLE(GLContextGLX);
public:
static PassOwnPtr<GLContextGLX> createContext(XID window, GLContext* sharingContext);
static PassOwnPtr<GLContextGLX> createWindowContext(XID window, GLContext* sharingContext);
virtual ~GLContextGLX();
virtual bool makeContextCurrent();
virtual void swapBuffers();
virtual void waitNative();
virtual bool canRenderToDefaultFramebuffer();
virtual IntSize defaultFrameBufferSize();
virtual cairo_device_t* cairoDevice();
#if USE(3D_GRAPHICS)
virtual PlatformGraphicsContext3D platformContext();
#endif
private:
static PassOwnPtr<GLContextGLX> createPbufferContext(GLXContext sharingContext);
static PassOwnPtr<GLContextGLX> createPixmapContext(GLXContext sharingContext);
GLContextGLX(GLXContext);
GLContextGLX(GLXContext, Pixmap, GLXPixmap);
GLXContext m_context;
XID m_window;
GLXPbuffer m_pbuffer;
Pixmap m_pixmap;
GLXPixmap m_glxPixmap;
cairo_device_t* m_cairoDevice;
};
} // namespace WebCore
#endif // USE(GLX)
#endif // GLContextGLX_h
| [
"adzhou@hp.com"
] | adzhou@hp.com |
a5dcd107e4a24b02ebaa6a6c2e603eb7ad4c5353 | 7119554f4726c4c3cd46823ee695ae3e433eccc7 | /test/unittest/unittest_nntrainer_internal.cpp | ba569f50094da3348a27c2e54fadab1175509f30 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | myungjoo/nntrainer | 7fdc88cdec3e9bd12916b8892a137672bcbb0d39 | 4813b20d869b33d00a9e098d6955072858286533 | refs/heads/master | 2023-08-17T01:41:32.521247 | 2022-03-16T07:56:56 | 2022-03-20T03:32:51 | 249,907,471 | 0 | 0 | Apache-2.0 | 2020-03-25T06:52:04 | 2020-03-25T06:52:03 | null | UTF-8 | C++ | false | false | 2,816 | cpp | /**
* Copyright (C) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file unittest_nntrainer_internal.cpp
* @date 10 April 2020
* @brief Unit test utility.
* @see https://github.com/nnstreamer/nntrainer
* @author Jijoong Moon <jijoong.moon@samsung.com>
* @bug No known bugs
*/
#include <gtest/gtest.h>
#include <fstream>
#include <neuralnet.h>
#include <nntrainer_error.h>
#include <optimizer.h>
#include <util_func.h>
#include <nntrainer_test_util.h>
/**
* @brief Optimizer create
*/
TEST(nntrainer_Optimizer, create_01_p) {
std::unique_ptr<ml::train::Optimizer> op;
auto &ac = nntrainer::AppContext::Global();
EXPECT_NO_THROW(op = ac.createObject<ml::train::Optimizer>("adam", {}));
}
/**
* @brief Optimizer create
*/
TEST(nntrainer_Optimizer, setType_02_p) {
std::unique_ptr<ml::train::Optimizer> op;
auto &ac = nntrainer::AppContext::Global();
EXPECT_NO_THROW(op = ac.createObject<ml::train::Optimizer>("sgd", {}));
}
/**
* @brief Optimizer create
*/
TEST(nntrainer_Optimizer, setType_03_n) {
std::unique_ptr<ml::train::Optimizer> op;
auto &ac = nntrainer::AppContext::Global();
EXPECT_ANY_THROW(
op = ac.createObject<ml::train::Optimizer>("non-existing type", {}));
}
TEST(nntrainer_throw_if, throw_invalid_arg_p) {
try {
NNTR_THROW_IF(1 == 1, std::invalid_argument) << "error msg";
} catch (std::invalid_argument &e) {
EXPECT_STREQ("error msg", e.what());
}
try {
NNTR_THROW_IF(true, std::invalid_argument) << "error msg";
} catch (std::invalid_argument &e) {
EXPECT_STREQ("error msg", e.what());
}
bool hit = false;
auto cleanup = [&hit] { hit = true; };
try {
NNTR_THROW_IF_CLEANUP(true, std::invalid_argument, cleanup) << "error msg";
} catch (std::invalid_argument &e) {
EXPECT_STREQ("error msg", e.what());
EXPECT_TRUE(hit);
}
}
/**
* @brief Main gtest
*/
int main(int argc, char **argv) {
int result = -1;
try {
testing::InitGoogleTest(&argc, argv);
} catch (...) {
std::cerr << "Error duing IniGoogleTest" << std::endl;
return 0;
}
try {
result = RUN_ALL_TESTS();
} catch (...) {
std::cerr << "Error duing RUN_ALL_TSETS()" << std::endl;
}
return result;
}
| [
"jijoong.moon@samsung.com"
] | jijoong.moon@samsung.com |
49b65172171a2ac99c7c09e3096697602cbb1b51 | b2857a7190c6d2c69739863d0fbe3efacfe19b6b | /engine_project/src/applications/tangram.cpp | a0f2a925491afab3fffe8f61a3570489a0fcc0b1 | [] | no_license | Zuchis/computer_graphics | 22db0c993a0f35c91462ca4359b2ef2f21ed7f01 | f113a84e35acbeae9bb7553c5fabb1f256fd5dbd | refs/heads/master | 2023-07-21T23:40:53.856951 | 2023-07-05T15:35:02 | 2023-07-05T15:35:02 | 42,215,409 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 9,440 | cpp | #include "../shaderprogram.h"
#define CAPTION "Badass Squirrel"
int WinX = 640, WinY = 480;
int WindowHandle = 0;
unsigned int FrameCount = 0;
GLuint VaoId[3], VboId[2];
GLuint squareVboId[2];
GLuint paralelVboId[2];
ShaderProgram program = ShaderProgram();
/////////////////////////////////////////////////////////////////////// ERRORS
bool isOpenGLError() {
bool isError = false;
GLenum errCode;
const GLubyte *errString;
while ((errCode = glGetError()) != GL_NO_ERROR) {
isError = true;
errString = gluErrorString(errCode);
std::cerr << "OpenGL ERROR [" << errString << "]." << std::endl;
}
return isError;
}
void checkOpenGLError(std::string error)
{
if(isOpenGLError()) {
std::cerr << error << std::endl;
exit(EXIT_FAILURE);
}
}
/////////////////////////////////////////////////////////////////////// SHADERs
void createShaderProgram()
{
program.compileShaderFromFile("shaders/vertexShader.vert",ShaderType::VERTEX);
program.compileShaderFromFile("shaders/fragmentShader.frag",ShaderType::FRAGMENT);
program.bindAttribLocation(VERTICES,"in_Position");
program.link();
checkOpenGLError("ERROR: Could not create shaders.");
}
void destroyShaderProgram()
{
glUseProgram(0);
checkOpenGLError("ERROR: Could not destroy shaders.");
}
const GLfloat triangle[] =
{
0.00f, 0.00f, 0.0f, 1.0f ,
0.25f, 0.00f, 0.0f, 1.0f ,
0.25f, 0.25f, 0.0f, 1.0f
};
const GLuint triangleIndices[] =
{
0,1,2
};
const GLfloat square[] =
{
0.00f, 0.00f, 0.0f, 1.0f,
0.25f, 0.00f, 0.0f, 1.0f,
0.25f, 0.25f, 0.0f, 1.0f,
0.00f, 0.25f, 0.0f, 1.0f
};
const GLuint squareIndices[] =
{
0,1,2,
2,3,0,
};
const GLfloat paralel[] =
{
0.25f, 0.00f, 0.0f, 1.0f,
0.50f, 0.00f, 0.0f, 1.0f,
0.25f, 0.25f, 0.0f, 1.0f,
0.00f, 0.25f, 0.0f, 1.0f,
-0.25f,0.25f, 0.0f, 1.0f,
0.00f, 0.00f, 0.0f, 1.0f,
};
const GLuint paralelIndices[] =
{
0,1,2,
2,3,0,
3,4,5,
5,0,3
};
//Object triangle = Object(0);
//Object square = Object(1);
void createBufferObjects()
{
glGenVertexArrays(3, VaoId);
glBindVertexArray(VaoId[0]);
{
glGenBuffers(2, VboId);
glBindBuffer(GL_ARRAY_BUFFER, VboId[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(triangle), triangle, GL_STATIC_DRAW);
glEnableVertexAttribArray(VERTICES);
glVertexAttribPointer(VERTICES, 4, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, VboId[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(triangleIndices), triangleIndices, GL_STATIC_DRAW);
}
glBindVertexArray(VaoId[1]);
{
glGenBuffers(2, squareVboId);
glBindBuffer(GL_ARRAY_BUFFER, squareVboId[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(square), square, GL_STATIC_DRAW);
glEnableVertexAttribArray(VERTICES);
glVertexAttribPointer(VERTICES, 4, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, squareVboId[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(squareIndices), squareIndices, GL_STATIC_DRAW);
}
glBindVertexArray(VaoId[2]);
{
glGenBuffers(2, paralelVboId);
glBindBuffer(GL_ARRAY_BUFFER, paralelVboId[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(paralel), paralel, GL_STATIC_DRAW);
glEnableVertexAttribArray(VERTICES);
glVertexAttribPointer(VERTICES, 4, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, paralelVboId[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(paralelIndices), paralelIndices, GL_STATIC_DRAW);
}
glBindVertexArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
//triangle.sendDataToBuffers();
//square.sendDataToBuffers();
checkOpenGLError("ERROR: Could not create VAOs and VBOs.");
}
void destroyBufferObjects()
{
glBindVertexArray(VaoId[0]);
glDisableVertexAttribArray(VERTICES);
glDeleteBuffers(2, VboId);
glDeleteVertexArrays(2, VaoId);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glBindVertexArray(0);
checkOpenGLError("ERROR: Could not destroy VAOs and VBOs.");
}
// big triangles
Matrix4 _M0 = MatrixFactory::CreateTransformMatrix( -0.15f,-0.2f,0.0f,170.0f,2.0f);
const float* M0 = _M0.getData();
Matrix4 _M3 = MatrixFactory::CreateTransformMatrix( 0.35f,-0.28f,0.0,125.0f,2.0f);
const float* M3 = _M3.getData();
// medium triangle
Matrix4 _M4 = MatrixFactory::CreateTransformMatrix( -0.13f,0.40f,0.0,78.0f,1.5f);
const float* M4 = _M4.getData();
// small triangles
Matrix4 _M5 = MatrixFactory::CreateTransformMatrix( 0.15f,-0.55f,0.0,80.0f,1.2f);
const float* M5 = _M5.getData();
Matrix4 _M6 = MatrixFactory::CreateTransformMatrix( -0.97f,-0.2f,0.0f,-12.0f,1.2f);
const float* M6 = _M6.getData();
// square
Matrix4 _M1 = MatrixFactory::CreateTransformMatrix(-0.51f,0.41f,0.0f,33.0f,1.25f);
const float* M1 = _M1.getData();
// pararelogram
Matrix4 _M2 = MatrixFactory::CreateTransformMatrix(-0.12f,0.4f,0.0f,-56.0f,1.0f);
const float* M2 = _M2.getData();
void drawScene()
{
//test.print();
program.use();
// triangles
glBindVertexArray(VaoId[0]);
// big triangles
program.setUniform("Matrix",M0);
program.setUniform("ex_Color",1,0,0,0);
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, (GLvoid*)0);
program.setUniform("Matrix",M3);
program.setUniform("ex_Color",1,1,1,0);
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, (GLvoid*)0);
// medium triangle
program.setUniform("Matrix",M4);
program.setUniform("ex_Color",0.4,0,0.25,0);
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, (GLvoid*)0);
//small triangles
program.setUniform("Matrix",M5);
program.setUniform("ex_Color",1,0.5,0,0);
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, (GLvoid*)0);
program.setUniform("Matrix",M6);
program.setUniform("ex_Color",0.7,0.7,0.7,0);
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, (GLvoid*)0);
// square
glBindVertexArray(VaoId[1]);
program.setUniform("Matrix",M1);
program.setUniform("ex_Color",0,0,1,0);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, (GLvoid*)0);
// pararelogram
glBindVertexArray(VaoId[2]);
program.setUniform("Matrix",M2);
program.setUniform("ex_Color",0,1,0,0);
glDrawElements(GL_TRIANGLES, 12, GL_UNSIGNED_INT, (GLvoid*)0);
glUseProgram(0);
glBindVertexArray(0);
checkOpenGLError("ERROR: Could not draw scene.");
}
void cleanup()
{
destroyShaderProgram();
destroyBufferObjects();
}
void display()
{
++FrameCount;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
drawScene();
glutSwapBuffers();
}
void idle()
{
glutPostRedisplay();
}
void reshape(int w, int h)
{
WinX = w;
WinY = h;
glViewport(0, 0, WinX, WinY);
}
void timer(int value)
{
std::ostringstream oss;
oss << CAPTION << ": " << FrameCount << " FPS @ (" << WinX << "x" << WinY << ")";
std::string s = oss.str();
glutSetWindow(WindowHandle);
glutSetWindowTitle(s.c_str());
FrameCount = 0;
glutTimerFunc(1000, timer, 0);
}
/////////////////////////////////////////////////////////////////////// SETUP
void setupCallbacks()
{
glutCloseFunc(cleanup);
glutDisplayFunc(display);
glutIdleFunc(idle);
glutReshapeFunc(reshape);
glutTimerFunc(0,timer,0);
}
void checkOpenGLInfo()
{
const GLubyte *renderer = glGetString(GL_RENDERER);
const GLubyte *vendor = glGetString(GL_VENDOR);
const GLubyte *version = glGetString(GL_VERSION);
const GLubyte *glslVersion = glGetString(GL_SHADING_LANGUAGE_VERSION);
std::cerr << "OpenGL Renderer: " << renderer << " (" << vendor << ")" << std::endl;
std::cerr << "OpenGL version " << version << std::endl;
std::cerr << "GLSL version " << glslVersion << std::endl;
}
void setupOpenGL()
{
checkOpenGLInfo();
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glDepthMask(GL_TRUE);
glDepthRange(0.0, 1.0);
glClearDepth(1.0);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
glFrontFace(GL_CCW);
}
void setupGLEW()
{
glewExperimental = GL_TRUE;
GLenum result = glewInit() ;
if (result != GLEW_OK) {
std::cerr << "ERROR glewInit: " << glewGetString(result) << std::endl;
exit(EXIT_FAILURE);
}
GLenum err_code = glGetError();
}
void setupGLUT(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitContextVersion(3, 3);
glutInitContextFlags(GLUT_FORWARD_COMPATIBLE);
glutInitContextProfile(GLUT_CORE_PROFILE);
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_GLUTMAINLOOP_RETURNS);
glutInitWindowSize(WinX, WinY);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
WindowHandle = glutCreateWindow(CAPTION);
if(WindowHandle < 1) {
std::cerr << "ERROR: Could not create a new rendering window." << std::endl;
exit(EXIT_FAILURE);
}
}
void init(int argc, char* argv[])
{
setupGLUT(argc, argv);
setupGLEW();
setupOpenGL();
createShaderProgram();
createBufferObjects();
setupCallbacks();
}
int main(int argc, char* argv[])
{
init(argc, argv);
glutMainLoop();
exit(EXIT_SUCCESS);
}
| [
"liquimaster@gmail.com"
] | liquimaster@gmail.com |
1b31538288814b15cd259ce21b898f345f2b649e | 3c72563f2ccb845fc4837ae03832cdf684ea67aa | /cl13nt-l4gg3r/main.h | 893dce11197e248c4f64be81b2e1d666a0b35c65 | [] | no_license | mr-nv/cl13nt-l4gg3r | 1efca603c1125c76002b922032debe2329fd7366 | 89ec7f436f7cdf7b27c91dbd014564be9e11c6fe | refs/heads/master | 2020-03-11T19:40:08.640249 | 2018-04-21T17:23:47 | 2018-04-21T17:23:47 | 130,214,478 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 594 | h | /* includes and shit */
#pragma once
#include <Windows.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <process.h>
#include <assert.h>
#include <Mmsystem.h>
#include <cstdint>
#include <cstddef>
#include <cstring>
#include <memory>
#include <Psapi.h>
#pragma comment( lib, "Winmm.lib" )
#define WIN32_LEAN_AND_MEAN
#pragma optimize("gsy",on)
#include "crc32.h"
#include "sdk.h"
#include "vmt.h"
extern std::uint8_t* PatternScan(void* module, const char* signature); | [
"noreply@github.com"
] | mr-nv.noreply@github.com |
20b4367b5aba808a7c448dfb8fc966cfdd0d1d08 | 344db7c30f7bf34d8ae20d5ed040280a8c038f9c | /The_sword_refers_to_offer/最小的k个数.cpp | f40f19de69e2cfabf425a4a46fedec9d54c62361 | [] | no_license | CoderDXQ/Brush-Algorithm-problem | 75d5a700eae5df8be600fea3a5427c94a9f941b9 | 78cf6a79c7c0fe1a9fc659101ba5ba9196912df5 | refs/heads/master | 2023-06-19T14:20:01.117764 | 2021-07-18T04:59:19 | 2021-07-18T04:59:19 | 253,854,814 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,597 | cpp | //方法一:利用快速排序中的分割思想Partition
void GetLeastNumbers(int* input,int n,int* output,int k)
{
if(input==nullptr||output==nullptr||k>n||n<=0||k<=0)
return;//健壮性
int start=0;
int end=n-1;
int index=Partition(input,n,start,end);
//index是返回的游标的下标 游标左侧全部小于游标 游标右侧全部大于游标
while(index!=k-1)
{
if(index>k-1)
{//根据情况选取游标的左右两侧进行Partition
end=index-1;
index=Partition(index,n,start,end);
}
else
{
start=index+1;
index=Partition(input,n,start,end);
}
}
//此时index==k-1,正好数组前k个数是最小的k个数,但这k个数不一定是按顺序的
for(int i=0;i<k;i++)
output[i]=input[i];
}
int Partition(int data[],int length,int start,int end)
{
if(data==nullptr||length<=0||start<0;||end>=length)
throw new std::exception("Invalid Parameters");
//选举游标
int index=RandomInRange(start,end);
Swap(&data[index],&data[end]);
int small=start-1;
for(index=start;index<end;index++)
{
if(data[index]<data[end])
{//此时data[end]里的值是选举出来的游标
small++;
if(small!=index)//这种时候的上一次for循环出现了一次data[index]>=data[end]的情况
//此时data[small]里的数大于游标,交换之后data[small]里的数小于游标
Swap(&data[index],&data[small]);
}
}
// 游标归位,游标左侧全部小于游标,游标右侧全部大于游标
small++;
Swap(&data[small],&data[end]);
return small;
}
//方法二:堆或红黑树
void GetLeastNumbers(const vector<int>& data,intSet& leastNumbers,int k)
{//intSet本身就是使用红黑树维护的
leastNumbers.clear();//初始化
if(k<1||data.size()<k)
return;
//数字原来存在vector型的data中
vector<int>::const_iterator iter=data.begin();
for(;iter!=data.end();iter++)
{
if(leastNumbers.size()<k)
leastNumbers.insert(*iter);
else
{//leastNumbers中始终不超过k个数
setIterator iterGreatest=leastNumbers.begin();
//leastNumbers中最大的数
if(*iter<*(leastNumbers.begin()))
{
leastNumbers.erase(iterGreatest);
leastNumbers.insert(*iter);//插入后会自动排序,leastNumbers.begin()依然是最大的数
}
}
}
}
| [
"794055465@qq.com"
] | 794055465@qq.com |
e2f466fa6de5eea93fcba3d29259153f58382b75 | 614369bd9a9452f6b48b9c667b12daacf153d6b8 | /Dongmin/Baekjoon/삼성 기출/테트로미노/P14500.cpp | 7bb00b3e05928d1d740a5a78135d43525d3322bd | [] | no_license | minji0320/Algorithm_for_CodingTest | 339ad05a81a89b2645dfab73d7bcbc2df9775d77 | 7fc091f93693d549fa1975044f4b4ff5ee056520 | refs/heads/master | 2022-06-26T05:14:27.149435 | 2021-06-30T00:16:38 | 2021-06-30T00:16:38 | 242,951,278 | 2 | 0 | null | 2020-02-25T08:43:49 | 2020-02-25T08:43:48 | null | UTF-8 | C++ | false | false | 5,060 | cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef struct Pos {
int row, col;
} Pos;
typedef struct Polyomino {
vector<Pos> positions;
} Polyomino;
int N, M;
vector<vector<int> > board;
vector<vector<Polyomino> > polyominos;
int poly_case[5] = {2, 1, 8, 4, 4};
void getInput() {
cin >> N >> M;
board.assign(N, vector<int>(M,0));
for(int r=0; r<N; r++) {
for(int c=0; c<M; c++) {
cin >> board[r][c];
}
}
polyominos.assign(5, vector<Polyomino>(8, Polyomino{vector<Pos>()}));
for(int i=0; i<4; i++) polyominos[0][0].positions.push_back({-i,0});
for(int i=0; i<4; i++) polyominos[0][1].positions.push_back({0,i});
polyominos[1][0].positions.push_back({0,0});
polyominos[1][0].positions.push_back({-1,0});
polyominos[1][0].positions.push_back({0,1});
polyominos[1][0].positions.push_back({-1,1});
polyominos[2][0].positions.push_back({0,0});
polyominos[2][0].positions.push_back({-1,0});
polyominos[2][0].positions.push_back({0,1});
polyominos[2][0].positions.push_back({-2,0});
polyominos[2][1].positions.push_back({0,0});
polyominos[2][1].positions.push_back({-1,0});
polyominos[2][1].positions.push_back({-1,1});
polyominos[2][1].positions.push_back({-1,2});
polyominos[2][2].positions.push_back({0,1});
polyominos[2][2].positions.push_back({-1,1});
polyominos[2][2].positions.push_back({-2,1});
polyominos[2][2].positions.push_back({-2,0});
polyominos[2][3].positions.push_back({0,0});
polyominos[2][3].positions.push_back({0,1});
polyominos[2][3].positions.push_back({0,2});
polyominos[2][3].positions.push_back({-1,2});
polyominos[2][4].positions.push_back({-1,0});
polyominos[2][4].positions.push_back({-1,1});
polyominos[2][4].positions.push_back({-1,2});
polyominos[2][4].positions.push_back({0,2});
polyominos[2][5].positions.push_back({0,0});
polyominos[2][5].positions.push_back({0,1});
polyominos[2][5].positions.push_back({0,2});
polyominos[2][5].positions.push_back({-1,0});
polyominos[2][6].positions.push_back({0,0});
polyominos[2][6].positions.push_back({0,1});
polyominos[2][6].positions.push_back({-1,1});
polyominos[2][6].positions.push_back({-2,1});
polyominos[2][7].positions.push_back({0,0});
polyominos[2][7].positions.push_back({-1,0});
polyominos[2][7].positions.push_back({-2,0});
polyominos[2][7].positions.push_back({-2,1});
polyominos[3][0].positions.push_back({-1,0});
polyominos[3][0].positions.push_back({-2,0});
polyominos[3][0].positions.push_back({0,1});
polyominos[3][0].positions.push_back({-1,1});
polyominos[3][1].positions.push_back({0,0});
polyominos[3][1].positions.push_back({0,1});
polyominos[3][1].positions.push_back({-1,1});
polyominos[3][1].positions.push_back({-1,2});
polyominos[3][2].positions.push_back({0,0});
polyominos[3][2].positions.push_back({-1,0});
polyominos[3][2].positions.push_back({-1,1});
polyominos[3][2].positions.push_back({-2,1});
polyominos[3][3].positions.push_back({-1,0});
polyominos[3][3].positions.push_back({-1,1});
polyominos[3][3].positions.push_back({0,1});
polyominos[3][3].positions.push_back({0,2});
polyominos[4][0].positions.push_back({-1,0});
polyominos[4][0].positions.push_back({0,1});
polyominos[4][0].positions.push_back({-1,1});
polyominos[4][0].positions.push_back({-1,2});
polyominos[4][1].positions.push_back({0,0});
polyominos[4][1].positions.push_back({-1,0});
polyominos[4][1].positions.push_back({-2,0});
polyominos[4][1].positions.push_back({-1,1});
polyominos[4][2].positions.push_back({-1,0});
polyominos[4][2].positions.push_back({0,1});
polyominos[4][2].positions.push_back({-1,1});
polyominos[4][2].positions.push_back({-2,1});
polyominos[4][3].positions.push_back({0,0});
polyominos[4][3].positions.push_back({0,1});
polyominos[4][3].positions.push_back({0,2});
polyominos[4][3].positions.push_back({-1,1});
}
bool isValidPos(Pos& pos) {
return pos.row >= 0 && pos.row < N && pos.col >= 0 && pos.col < M;
}
void getMaxPolyominoPosition(Pos pos, Polyomino polyomino, int& max) {
int sum = 0;
for(int p=0; p<4; p++) {
Pos laid_pos = {pos.row + polyomino.positions[p].row, pos.col + polyomino.positions[p].col};
if(isValidPos(laid_pos)) {
sum += board[laid_pos.row][laid_pos.col];
}
else return;
}
if(sum > max) {
max = sum;
}
}
void solution() {
int ans = 0;
for(int poly = 0; poly < 5; poly++) {
for(int pc = 0; pc < poly_case[poly]; pc++) {
Polyomino selected = polyominos[poly][pc];
for(int r=0; r<N; r++) {
for(int c=0; c<M; c++) {
getMaxPolyominoPosition(Pos{r,c}, selected, ans);
}
}
}
}
printf("%d", ans);
}
int main() {
getInput();
solution();
} | [
"pkalsh345@gmail.com"
] | pkalsh345@gmail.com |
a11dfec0e65906d0ea33f01862f70b83609e8fac | c0826c9e991ab8ff35d4a6baf3a0bd49131e8395 | /UserEvent.pb.cc | c82c30b164a1bcb3c8b43c8592138e23df520c33 | [
"MIT"
] | permissive | GregoryHlavac/GameAnalyticsPP | 0f74c217e917693941e4c1d68cba95e07eb7d073 | 93f6673af68c071a84be78ef663455d5aee38528 | refs/heads/master | 2020-06-13T04:56:43.029211 | 2014-03-01T20:25:21 | 2014-03-01T20:25:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | true | 18,125 | cc | #include "stdafx.h"
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: UserEvent.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "UserEvent.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
namespace ProtocolBuffers {
namespace GameAnalytics {
namespace {
const ::google::protobuf::Descriptor* UserEvent_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
UserEvent_reflection_ = NULL;
} // namespace
void protobuf_AssignDesc_UserEvent_2eproto() {
protobuf_AddDesc_UserEvent_2eproto();
const ::google::protobuf::FileDescriptor* file =
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
"UserEvent.proto");
GOOGLE_CHECK(file != NULL);
UserEvent_descriptor_ = file->message_type(0);
static const int UserEvent_offsets_[1] = {
};
UserEvent_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
UserEvent_descriptor_,
UserEvent::default_instance_,
UserEvent_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserEvent, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserEvent, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(UserEvent));
}
namespace {
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
&protobuf_AssignDesc_UserEvent_2eproto);
}
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
UserEvent_descriptor_, &UserEvent::default_instance());
}
} // namespace
void protobuf_ShutdownFile_UserEvent_2eproto() {
delete UserEvent::default_instance_;
delete UserEvent_reflection_;
}
void protobuf_AddDesc_UserEvent_2eproto() {
static bool already_here = false;
if (already_here) return;
already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
::ProtocolBuffers::GameAnalytics::protobuf_AddDesc_Event_2eproto();
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\017UserEvent.proto\022\035ProtocolBuffers.GameA"
"nalytics\032\013Event.proto\"\254\010\n\tUserEvent24\n\006g"
"ender\022$.ProtocolBuffers.GameAnalytics.Ev"
"ent\0303 \001(\t28\n\nbirth_year\022$.ProtocolBuffer"
"s.GameAnalytics.Event\0304 \001(\0052:\n\014friend_co"
"unt\022$.ProtocolBuffers.GameAnalytics.Even"
"t\0305 \001(\00529\n\013facebook_id\022$.ProtocolBuffers"
".GameAnalytics.Event\0306 \001(\t2;\n\rgoogleplus"
"_id\022$.ProtocolBuffers.GameAnalytics.Even"
"t\0307 \001(\t24\n\006ios_id\022$.ProtocolBuffers.Game"
"Analytics.Event\0308 \001(\t28\n\nandroid_id\022$.Pr"
"otocolBuffers.GameAnalytics.Event\0309 \001(\t2"
"8\n\nadtruth_id\022$.ProtocolBuffers.GameAnal"
"ytics.Event\030: \001(\t26\n\010platform\022$.Protocol"
"Buffers.GameAnalytics.Event\030; \001(\t24\n\006dev"
"ice\022$.ProtocolBuffers.GameAnalytics.Even"
"t\030< \001(\t26\n\010os_major\022$.ProtocolBuffers.Ga"
"meAnalytics.Event\030= \001(\t26\n\010os_minor\022$.Pr"
"otocolBuffers.GameAnalytics.Event\030> \001(\t2"
"\?\n\021install_publisher\022$.ProtocolBuffers.G"
"ameAnalytics.Event\030\? \001(\t2:\n\014install_site"
"\022$.ProtocolBuffers.GameAnalytics.Event\030@"
" \001(\t2>\n\020install_campaign\022$.ProtocolBuffe"
"rs.GameAnalytics.Event\030A \001(\t2=\n\017install_"
"adgroup\022$.ProtocolBuffers.GameAnalytics."
"Event\030B \001(\t28\n\ninstall_ad\022$.ProtocolBuff"
"ers.GameAnalytics.Event\030C \001(\t2=\n\017install"
"_keyword\022$.ProtocolBuffers.GameAnalytics"
".Event\030D \001(\t", 1132);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"UserEvent.proto", &protobuf_RegisterTypes);
UserEvent::default_instance_ = new UserEvent();
UserEvent::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
51, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
52, 5, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
53, 5, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
54, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
55, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
56, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
57, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
58, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
59, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
60, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
61, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
62, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
63, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
64, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
65, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
66, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
67, 9, false, false);
::google::protobuf::internal::ExtensionSet::RegisterExtension(
&::ProtocolBuffers::GameAnalytics::Event::default_instance(),
68, 9, false, false);
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_UserEvent_2eproto);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_UserEvent_2eproto {
StaticDescriptorInitializer_UserEvent_2eproto() {
protobuf_AddDesc_UserEvent_2eproto();
}
} static_descriptor_initializer_UserEvent_2eproto_;
// ===================================================================
#ifndef _MSC_VER
#endif // !_MSC_VER
const ::std::string UserEvent_gender_default("");
#ifndef _MSC_VER
const int UserEvent::kGenderFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::gender(kGenderFieldNumber, UserEvent_gender_default);
#ifndef _MSC_VER
const int UserEvent::kBirthYearFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
UserEvent::birth_year(kBirthYearFieldNumber, 0);
#ifndef _MSC_VER
const int UserEvent::kFriendCountFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
UserEvent::friend_count(kFriendCountFieldNumber, 0);
const ::std::string UserEvent_facebook_id_default("");
#ifndef _MSC_VER
const int UserEvent::kFacebookIdFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::facebook_id(kFacebookIdFieldNumber, UserEvent_facebook_id_default);
const ::std::string UserEvent_googleplus_id_default("");
#ifndef _MSC_VER
const int UserEvent::kGoogleplusIdFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::googleplus_id(kGoogleplusIdFieldNumber, UserEvent_googleplus_id_default);
const ::std::string UserEvent_ios_id_default("");
#ifndef _MSC_VER
const int UserEvent::kIosIdFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::ios_id(kIosIdFieldNumber, UserEvent_ios_id_default);
const ::std::string UserEvent_android_id_default("");
#ifndef _MSC_VER
const int UserEvent::kAndroidIdFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::android_id(kAndroidIdFieldNumber, UserEvent_android_id_default);
const ::std::string UserEvent_adtruth_id_default("");
#ifndef _MSC_VER
const int UserEvent::kAdtruthIdFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::adtruth_id(kAdtruthIdFieldNumber, UserEvent_adtruth_id_default);
const ::std::string UserEvent_platform_default("");
#ifndef _MSC_VER
const int UserEvent::kPlatformFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::platform(kPlatformFieldNumber, UserEvent_platform_default);
const ::std::string UserEvent_device_default("");
#ifndef _MSC_VER
const int UserEvent::kDeviceFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::device(kDeviceFieldNumber, UserEvent_device_default);
const ::std::string UserEvent_os_major_default("");
#ifndef _MSC_VER
const int UserEvent::kOsMajorFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::os_major(kOsMajorFieldNumber, UserEvent_os_major_default);
const ::std::string UserEvent_os_minor_default("");
#ifndef _MSC_VER
const int UserEvent::kOsMinorFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::os_minor(kOsMinorFieldNumber, UserEvent_os_minor_default);
const ::std::string UserEvent_install_publisher_default("");
#ifndef _MSC_VER
const int UserEvent::kInstallPublisherFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::install_publisher(kInstallPublisherFieldNumber, UserEvent_install_publisher_default);
const ::std::string UserEvent_install_site_default("");
#ifndef _MSC_VER
const int UserEvent::kInstallSiteFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::install_site(kInstallSiteFieldNumber, UserEvent_install_site_default);
const ::std::string UserEvent_install_campaign_default("");
#ifndef _MSC_VER
const int UserEvent::kInstallCampaignFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::install_campaign(kInstallCampaignFieldNumber, UserEvent_install_campaign_default);
const ::std::string UserEvent_install_adgroup_default("");
#ifndef _MSC_VER
const int UserEvent::kInstallAdgroupFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::install_adgroup(kInstallAdgroupFieldNumber, UserEvent_install_adgroup_default);
const ::std::string UserEvent_install_ad_default("");
#ifndef _MSC_VER
const int UserEvent::kInstallAdFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::install_ad(kInstallAdFieldNumber, UserEvent_install_ad_default);
const ::std::string UserEvent_install_keyword_default("");
#ifndef _MSC_VER
const int UserEvent::kInstallKeywordFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::ProtocolBuffers::GameAnalytics::Event,
::google::protobuf::internal::StringTypeTraits, 9, false >
UserEvent::install_keyword(kInstallKeywordFieldNumber, UserEvent_install_keyword_default);
UserEvent::UserEvent()
: ::google::protobuf::Message() {
SharedCtor();
}
void UserEvent::InitAsDefaultInstance() {
}
UserEvent::UserEvent(const UserEvent& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void UserEvent::SharedCtor() {
_cached_size_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
UserEvent::~UserEvent() {
SharedDtor();
}
void UserEvent::SharedDtor() {
if (this != default_instance_) {
}
}
void UserEvent::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* UserEvent::descriptor() {
protobuf_AssignDescriptorsOnce();
return UserEvent_descriptor_;
}
const UserEvent& UserEvent::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_UserEvent_2eproto();
return *default_instance_;
}
UserEvent* UserEvent::default_instance_ = NULL;
UserEvent* UserEvent::New() const {
return new UserEvent;
}
void UserEvent::Clear() {
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool UserEvent::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
}
return true;
#undef DO_
}
void UserEvent::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* UserEvent::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int UserEvent::ByteSize() const {
int total_size = 0;
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void UserEvent::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const UserEvent* source =
::google::protobuf::internal::dynamic_cast_if_available<const UserEvent*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void UserEvent::MergeFrom(const UserEvent& from) {
GOOGLE_CHECK_NE(&from, this);
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void UserEvent::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void UserEvent::CopyFrom(const UserEvent& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool UserEvent::IsInitialized() const {
return true;
}
void UserEvent::Swap(UserEvent* other) {
if (other != this) {
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata UserEvent::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = UserEvent_descriptor_;
metadata.reflection = UserEvent_reflection_;
return metadata;
}
// @@protoc_insertion_point(namespace_scope)
} // namespace GameAnalytics
} // namespace ProtocolBuffers
// @@protoc_insertion_point(global_scope)
| [
"ghlavac@gmail.com"
] | ghlavac@gmail.com |
b2741133ae3787a06d53b0d2e01a2ff3decd158a | 1c054180a367c817a9a136d9c650f302b8fd6c74 | /skipListLab/source/myAllocator/myAllocator_origin.hpp | 7b75f0b0788dcea7c8b64745a0b9c698240ff6c7 | [] | no_license | wyd-1180301005/skipListLab | 107a84e3cf2b90f1819618cca8da6b2ec8374025 | 2453a8cfc6af4482e43c019c462bc82a21cdbbfd | refs/heads/main | 2023-05-30T14:27:48.282348 | 2021-06-09T13:40:16 | 2021-06-09T13:40:16 | 373,083,448 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,057 | hpp | # ifndef MYALLOCATOR_ORIGIN_HPP
# define MYALLOCATOR_ORIGIN_HPP
# include<vector>
# include<list>
// 判断一个类型是否是reference的方法:
template<typename T>
struct is_ref_tr{static const bool is_ref_v=false;};
template<typename T>
struct is_ref_tr<T&>{static const bool is_ref_v=true;};
template <typename T>
constexpr bool is_ref=is_ref_tr<T>::is_ref_v;
// 判断一个类型是否是指针的方法:
template<typename T>
struct is_pointer_tr{static const bool is_pointer_v=false;};
template<typename T>
struct is_pointer_tr<T*>{static const bool is_pointer_v=true;};
template <typename T>
constexpr bool is_pointer=is_pointer_tr<T>::is_pointer_v;
// 判断一个类型是否是BuiltInType的方法:(任何类型的指针/引用,都视为BuiltInType)
template <typename T>
constexpr bool is_builtin_type=is_pointer<T>||is_ref<T>||std::is_arithmetic_v<T>;
// 给类类型添加reference的方法:
template<typename T,bool isBuiltIn>
struct ref_unless_builtin_tr {using type=T&;};
template<typename T>
struct ref_unless_builtin_tr<T,true> {using type=T;};
template<typename T>
using ref_unless_builtin=typename ref_unless_builtin_tr<T,is_builtin_type<T>>::type;
// 给类类型添加指针的方法:
template<typename T,bool isBuiltIn>
struct pointer_unless_builtin_tr {using type=T*;};
template<typename T>
struct pointer_unless_builtin_tr<T,true> {using type=T;};
template<typename T>
using pointer_unless_builtin=typename pointer_unless_builtin_tr<T,is_builtin_type<T>>::type;
/**
* 一个简单的pair模板
* 存储内容:
* case 1:如果模板参数是class struct,则存储引用
* case 2:如果模板参数是指针或者引用或者内置类型,则直接存储
*/
template<typename T1,typename T2>
struct pair
{
ref_unless_builtin<T1> t1;
ref_unless_builtin<T2> t2;
pair(ref_unless_builtin<T1> t1,ref_unless_builtin<T2> t2)
{
this->t1=t1;
this->t2=t2;
}
pair(T1&& t1,T2&& t2)
{
this->t1=t1;
this->t2=t2;
}
};
template<typename NodeType>
class myAllocator
{
using memo=pair<NodeType*,int>;
using memo_list=std::list<pair<NodeType*,int>>;
int mem_pool_size;
int mem_pool_inuse;
int pos_using;
std::vector<NodeType*> mem_pool;
int criteria=10;
int max_traverse;
std::vector<memo_list> mem_memo;
/**
* 将一小块内存放置在mem_memo中
*/
void add_memo(NodeType* st,const int size) noexcept;
/**
* 从mem_memo处申请一块内存
* 返回nullptr说明没有这样的空闲内存快
*/
NodeType* recycle(const int size);
/**
* 从内存池中直接分配一小块内存,类型为NodeType*
*/
NodeType* alloc(const int size);
public:
/**
* 构造函数,pool_size为每块内存池的大小
*/
myAllocator(const int pool_size,const int criteria,const int max_tra);
/**
* 申请一小块内存
* 首先使用memo,其次再使用内存池
*/
NodeType* apply_alloc(const int size);
/**
* 将一小块内存标记为可分配
*/
inline void free_alloc(NodeType* st,const int size) noexcept;
# ifndef DISABLE_DEBUG_INTERFACE
// 用在debug中直接读取上一次分配出指针块大小
int last_size;
// 用在debug中直接读取上一次分配的指针块的头部
NodeType* pt;
// 用在debug中直接读取上一次free的指针块大小
int last_size_free;
// 用在debug中直接读取上一次free的指针块的头部
NodeType* pt_free;
/**
* 获得memo中大小为blk_size的块的指针的方法
*/
NodeType* debug_get_memo(const int blk_size);
/**
* 获得已经申请的内存池的个数的方法
*/
int debug_count_pool();
/**
* 获得当前mem_pool的指针的方法
*/
NodeType* debug_get_current_pool();
/**
* 获得当前正在分配的块的指针的方法
*/
NodeType* debug_get_pos();
#endif
~myAllocator() noexcept;
};
# endif | [
"fwz1661112233@outlook.com"
] | fwz1661112233@outlook.com |
31b78aaa4ebdb447da5f44eacef5c2a0d9d5abd0 | 94bdb1c4e90fe1e223edc2ac131ee244d1587d12 | /Info_system/Info_system.ino | 5b5b25c97975c74f7a59ad1b3d6aba36ca10560d | [] | no_license | avinesh2101/Arduino-Codes- | 690c5807dfb2a410492c26480dbfb7f233e622f0 | fd26d050f64a17fe482565bd453bff58ce41d598 | refs/heads/main | 2023-08-23T17:38:32.509831 | 2021-10-31T18:18:33 | 2021-10-31T18:18:33 | 410,845,919 | 4 | 2 | null | 2021-10-31T18:27:43 | 2021-09-27T10:51:27 | C | UTF-8 | C++ | false | false | 2,463 | ino | /*SubarnaDas For Hacktoberfest2021 */
#include <Wire.h>
#include <DS3231.h> //Library for the rtc-module from RinkyDinkElectronics.com
#include <LiquidCrystal_I2C.h>
#include <DHT.h>
#define DHTPIN 2 //Temperature sensor is connected to PIN 2
#define DHTTYPE DHT22 // Type of the sensor is DHT22 (AM2302)
DS3231 rtc(SDA, SCL); // Init the DS3231 as "rtc" using the hardware interface
LiquidCrystal_I2C lcd(0x27,16,2); // Init the display as "lcd"
DHT dht(DHTPIN, DHTTYPE); // Init the temperature sensor as "dht"
char inputButtonState; // Variable for button value
void setup() {
rtc.begin(); // Initialize the rtc object
lcd.init(); // Initialize the LCD
lcd.backlight(); // Turn on the backlight (lcd.noBacklight(); turns it off)
dht.begin(); // Initialize the temperature sensor
pinMode(12,INPUT); // Initialize Arduino Digital Pin 12 as input for connecting Pushbutton
lcd.setCursor(0,0); // Set cursor to character one, row one (lcd.setCursor(character,row);)
lcd.print("Starting... v1"); // Display characters on the LCD
delay(2000); // Delay for 2 seconds (2000 millisec)
}
void loop() {
inputButtonState = digitalRead(12); // Read the Pushbutton state from digital pin 12, values are either HIGH or LOW
lcd.clear(); // Make sure that LCD is clear
do{
//Clock and Date
lcd.setCursor(4,0);
lcd.print(rtc.getTimeStr()); // Display time
lcd.setCursor(1,1);
lcd.print(rtc.getDOWStr(1)); // Display Day-of-Week
lcd.setCursor(7,1);
lcd.print(rtc.getDateStr(1)); // Display date
delay(1000); // Delay until refresh of values (1 sec)
inputButtonState = digitalRead(12); // Read the Pushbutton state again
}while(inputButtonState != HIGH); // Repeat the retrieval of time and date until button is pressed
lcd.clear(); // Clear the display before new content
do{
//Temperature and Humidity
float temp = dht.readTemperature(); // Save the temperature from the sensor in the variable "temp"
float hum = dht.readHumidity(); // Save the humidity from the sensor in the variable "hum"
lcd.setCursor(1,0);
lcd.print("Temp:");
lcd.setCursor(8,0);
lcd.print(temp);
lcd.setCursor(14,0);
lcd.print("C");
lcd.setCursor(1,1);
lcd.print("Hum :");
lcd.setCursor(8,1);
lcd.print(hum);
lcd.setCursor(14,1);
lcd.print("%");
delay(2000);
inputButtonState = digitalRead(12);
}while(inputButtonState != HIGH);
}
| [
"emailtosubarna@gmail.com"
] | emailtosubarna@gmail.com |
e90233c2eeceba2c30ac20593f8062a160d3f672 | db664039f507f8625cd4d34b405918613eadde4a | /battletank/Source/Battletank/Private/Aprojectile.cpp | 7c6d2197c334420d008c9b88ed74aaf3653374ee | [] | no_license | subramanian252/battletank | d0316ef8867b5f065c458dcae62a303f105601e3 | b8162f020e938358b7c170edb500680f811726f8 | refs/heads/master | 2020-07-21T22:18:34.887933 | 2019-09-07T15:55:07 | 2019-09-07T15:55:07 | 202,686,097 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,369 | cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "Aprojectile.h"
// Sets default values
AAprojectile::AAprojectile()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
Collisionmesh = CreateDefaultSubobject<UStaticMeshComponent>(FName("collisionmesh"));
SetRootComponent(Collisionmesh);
Collisionmesh->SetNotifyRigidBodyCollision(true);
Collisionmesh->SetVisibility(false);
Launchblast = CreateDefaultSubobject<UParticleSystemComponent>(FName("launchblast"));
Launchblast->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
ProjectileMovement= CreateDefaultSubobject<UProjectileMovementComponent>(FName("ProjectileMovement"));
ProjectileMovement->bAutoActivate = false;
ImpactBlast = CreateDefaultSubobject<UParticleSystemComponent>(FName("impactblast"));
ImpactBlast->AttachToComponent(RootComponent,FAttachmentTransformRules::KeepRelativeTransform);
ImpactBlast->bAutoActivate = false;
ExplosionForce= CreateDefaultSubobject<URadialForceComponent>(FName("explosionforce"));
ExplosionForce -> AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
}
// Called when the game starts or when spawned
void AAprojectile::BeginPlay()
{
Super::BeginPlay();
Collisionmesh->OnComponentHit.AddDynamic(this, &AAprojectile::OnHit);
}
void AAprojectile::OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent, FVector NormalImpulse, const FHitResult& Hit)
{
Launchblast->Deactivate();
ImpactBlast->Activate();
ExplosionForce->FireImpulse();
SetRootComponent(ImpactBlast);
Collisionmesh->DestroyComponent();
UGameplayStatics::ApplyRadialDamage(this, projectiledamage, GetActorLocation(), ExplosionForce->Radius, UDamageType::StaticClass(), TArray<AActor*>());
FTimerHandle timer;
GetWorld()->GetTimerManager().SetTimer(timer, this, &AAprojectile::TimerExpire, delaytime, false);
}
// Called every frame
void AAprojectile::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void AAprojectile::launchprojectile(float speed)
{
ProjectileMovement->SetVelocityInLocalSpace(FVector::ForwardVector*speed);
ProjectileMovement->Activate();
}
void AAprojectile::TimerExpire()
{
Destroy();
}
| [
"suryasubramanian252@gmail.com"
] | suryasubramanian252@gmail.com |
47c72dd7b9ada95b57b8504f92b44e4ec59ec545 | 0b7816b6a5b9a8f4a386df6ebbf73aa97f41227d | /trunk/video-overlay/src/main/cpp/BoundingBoxVideoHandle.cpp | 21f656ecef66abc612b2957e9ee2885b7af55a44 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-bsd-simplified-darwin"
] | permissive | openmpf/openmpf | d44916bd1b406cb950e37afcd94aaf010af4eff8 | 5e50030c389eb257066d0dfc72f5f30b3a41eb6e | refs/heads/master | 2023-08-11T12:15:27.963463 | 2023-06-01T18:18:47 | 2023-06-01T18:18:47 | 75,215,830 | 34 | 6 | NOASSERTION | 2023-09-12T15:40:18 | 2016-11-30T18:37:57 | Java | UTF-8 | C++ | false | false | 6,448 | cpp | /******************************************************************************
* NOTICE *
* *
* This software (or technical data) was produced for the U.S. Government *
* under contract, and is subject to the Rights in Data-General Clause *
* 52.227-14, Alt. IV (DEC 2007). *
* *
* Copyright 2023 The MITRE Corporation. All Rights Reserved. *
******************************************************************************/
/******************************************************************************
* Copyright 2023 The MITRE Corporation *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
******************************************************************************/
#include "BoundingBoxVideoHandle.h"
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <utility>
BoundingBoxVideoHandle::BoundingBoxVideoHandle(std::string destinationPath, std::string encoder,
int vp9Crf, MPF::COMPONENT::MPFVideoCapture videoCapture)
: destinationPath_(std::move(destinationPath))
, encoder_(std::move(encoder))
, vp9Crf_(vp9Crf)
, videoCapture_(std::move(videoCapture)) {}
BoundingBoxVideoHandle::~BoundingBoxVideoHandle() {
if (nullptr != pipe_) {
std::cerr << "Error: Pipe should have been closed and set to nullptr." << std::endl;
std::exit(EXIT_FAILURE);
}
}
cv::Size BoundingBoxVideoHandle::GetFrameSize() const {
return videoCapture_.GetFrameSize();
}
bool BoundingBoxVideoHandle::Read(cv::Mat &frame) {
return videoCapture_.Read(frame);
}
std::string BoundingBoxVideoHandle::GetCommand(const cv::Size& size) {
std::string command = std::string("ffmpeg") +
" -pixel_format bgr24" +
" -video_size " + std::to_string(size.width) + "x" + std::to_string(size.height) +
" -framerate " + std::to_string(videoCapture_.GetFrameRate()) +
" -f rawvideo" +
" -i -" +
// https://trac.ffmpeg.org/ticket/5276
// Use yuv420p to encode webm files that can be played with current browsers.
" -pix_fmt yuv420p";
if ("vp9" == encoder_) { // .webm
command = command +
" -c:v libvpx-vp9" +
// https://trac.ffmpeg.org/wiki/Encode/VP9
// Two-pass is the recommended encoding method for libvpx-vp9 as some quality-enhancing encoder features are
// only available in 2-pass mode. Constant quality 2-pass is invoked by setting -b:v to zero and specifiying
// a quality level using the -crf switch.
" -crf " + std::to_string(vp9Crf_) + " -b:v 0";
}
else if ("h264" == encoder_) { // .mp4
command = command +
" -c:v libx264";
}
else { // "mjpeg" .avi
command = command +
" -c:v mjpeg";
}
command = command +
// https://stackoverflow.com/a/20848224
// H.264 needs even dimensions. VLC and mpv players sometimes have issues with odd dimensions.
" -vf \"pad=ceil(iw/2)*2:ceil(ih/2)*2\"" +
" -threads 2" +
" -y" + // overwrite file if it exists
" '" + destinationPath_ + "'";
return command;
}
void BoundingBoxVideoHandle::HandleMarkedFrame(const cv::Mat& frame) {
// Now that we know the size of an output frame we can complete the command string and open a pipe.
if (nullptr == pipe_) {
std::string command = GetCommand(frame.size());
pipe_ = popen(command.c_str(), "w");
if (nullptr == pipe_) {
throw std::runtime_error("Unable to write markup because the ffmpeg process failed to start.");
}
}
// Properly handle non-continuous cv::Mats. For example, if the left or right side of the frame was cropped off then
// the matrix will be non-continuous. This is because cropping doesn't copy the matrix, it creates a submatrix
// pointing in to the original un-cropped frame. To avoid writing sections we need to skip we copy data row by row.
for (int row = 0; row < frame.rows; ++row) {
fwrite(frame.ptr(row), frame.elemSize(), frame.cols, pipe_);
}
}
void BoundingBoxVideoHandle::Close() {
fflush(pipe_);
int returnCode = pclose(pipe_);
pipe_ = nullptr;
if (returnCode != 0) {
std::stringstream errorMsg;
errorMsg << "Unable to write markup because the ffmpeg process ";
if (WIFEXITED(returnCode)) {
int ffmpegExitStatus = WEXITSTATUS(returnCode);
errorMsg << "exited with exit code: " << ffmpegExitStatus;
}
else {
errorMsg << "did not exit normally";
}
if (WIFSIGNALED(returnCode)) {
errorMsg << " due to signal number: " << WTERMSIG(returnCode);
}
errorMsg << '.';
throw std::runtime_error(errorMsg.str());
}
// Check if destination file exists and if it's empty.
std::ifstream destinationFile(destinationPath_);
if (destinationFile.peek() == std::ifstream::traits_type::eof()) {
throw std::runtime_error("Failed to write \"" + destinationPath_ +
"\". An error probably occurred during encoding.");
}
}
| [
"noreply@github.com"
] | openmpf.noreply@github.com |
9ece0ef1fb816d842370dafb63c6b81c10b2ad87 | 5cacc7189ea410afe5abaf401b5d391fedc30569 | /stage1/Cplusplus/Reference/Containers/unordered_set/unordered_setHashFunctionCheck.cpp | 3f225a31f15a116364c95b79114d5fe922a23d4f | [] | no_license | WeenyJY/year17 | 72a7fc1c6e259e3bac3922c0b207335d06aa4034 | 33e5c90f5b726d97da3b5294a0d7fa0fe0497c97 | refs/heads/master | 2022-02-13T06:34:31.554289 | 2017-09-02T19:43:34 | 2017-09-02T19:43:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 772 | cpp | // file : unordered_setHashFunctionCheck.cpp
// hasher hash_function() const;
// Get hash function
// Returns the hash function object used by the unordered_set container.
// The hash function is a unary function that takes an object of type key_type as argument and returns a unique value of type size_t based on it.
// It is adopted by the container on construction. By default, it is the default hashing function for the corresponding key type: hash<key_type>
#include <iostream>
#include <string>
#include <unordered_set>
using namespace std;
int main()
{
unordered_set<string> myset;
unordered_set<string>::hasher fn = myset.hash_function();
cout<<"that: "<<fn("that")<<"\n";
cout<<"than: "<<fn("than")<<"\n";
return 0;
}
| [
"noreply@github.com"
] | WeenyJY.noreply@github.com |
b9cd07aedacf0adf7985e78a1092ea4f6e01980c | e65a4dbfbfb0e54e59787ba7741efee12f7687f3 | /net-im/sayaka/files/patch-src_UString.cpp | d0280d03a2f15eb404104f3f708cdcc8de8fb7b8 | [
"BSD-2-Clause"
] | permissive | freebsd/freebsd-ports | 86f2e89d43913412c4f6b2be3e255bc0945eac12 | 605a2983f245ac63f5420e023e7dce56898ad801 | refs/heads/main | 2023-08-30T21:46:28.720924 | 2023-08-30T19:33:44 | 2023-08-30T19:33:44 | 1,803,961 | 916 | 918 | NOASSERTION | 2023-09-08T04:06:26 | 2011-05-26T11:15:35 | null | UTF-8 | C++ | false | false | 260 | cpp | --- src/UString.cpp.orig 2021-03-18 09:51:03 UTC
+++ src/UString.cpp
@@ -25,6 +25,7 @@
#include "UString.h"
#include <array>
+#include <cerrno>
#include <cstring>
// 出力文字コードが UTF-8 以外 (iconv による変換が必要) なら true。
| [
"danfe@FreeBSD.org"
] | danfe@FreeBSD.org |
e71e4c2e5dcf32cfd597d1418e84d50539ce4b91 | c9388727c6b56e1becd3ae4b3d76238451c6d38c | /1055B/alice-and-hairdresser.cpp | 33046ecf7f3f9ad044e1efc6c8fe337869d77c04 | [] | no_license | kantuni/Codeforces | f7a3f0e37f8ed71a4ca4f1f4b013e5dc2b418f18 | 27914156928b325edd02c1c607f36c1dc4b53b76 | refs/heads/master | 2023-08-17T10:59:29.562753 | 2023-08-14T14:51:56 | 2023-08-14T14:51:56 | 81,014,157 | 202 | 79 | null | 2021-05-11T09:26:54 | 2017-02-05T18:52:25 | C++ | UTF-8 | C++ | false | false | 843 | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
vector<long long> a(n + 2);
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
long long ans = 0;
bool same = false;
for (int i = 1; i <= n; i++) {
if (!same and a[i] > l) {
same = true;
ans++;
}
if (a[i] <= l) {
same = false;
}
}
while (m--) {
int T;
cin >> T;
if (T == 0) {
cout << ans << endl;
} else {
long long p, d;
cin >> p >> d;
a[p] += d;
bool new_one = a[p] - d <= l and a[p] > l;
bool around_zeros = a[p - 1] <= l and a[p + 1] <= l;
bool around_ones = a[p - 1] > l and a[p + 1] > l;
if (new_one and around_zeros) {
ans++;
}
if (new_one and around_ones) {
ans--;
}
}
}
return 0;
}
| [
"henrikh.kantuni@gmail.com"
] | henrikh.kantuni@gmail.com |
e93989406fd999ca9fc8a34cc1e7ed90723366eb | 014109f0c01f6b11f3a874f81f6251a25873616e | /JUCE Synth/Audio Plug-in Synth/Source/SynthVoice.h | c577d50ad88d80839b22022fdb0fe2e16e1d7699 | [] | no_license | succculent/resynth | d73fc49af4054e955784c9c47140c31bbedf7568 | 750429797867f8d441961897a98a4e0b8184a653 | refs/heads/master | 2020-12-19T09:56:44.970626 | 2020-06-12T22:09:40 | 2020-06-12T22:09:40 | 235,700,925 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,261 | h | /*
==============================================================================
SynthVoice.h
Created: 26 May 2020 4:58:33pm
Author: Lorand Cheng
==============================================================================
*/
#pragma once
#include <JuceHeader.h>
#include "SynthSound.h"
#include "maximilian.h"
class SynthVoice : public SynthesiserVoice
{
public:
bool canPlaySound(SynthesiserSound *sound)
{
return dynamic_cast<SynthSound*>(sound) != nullptr;
}
//========================================
void startNote(int midiNoteNumber, float velocity, SynthesiserSound *sound, int currentPitchWheelPosition)
{
env1.trigger = 1;
level = velocity;
frequency = MidiMessage::getMidiNoteInHertz(midiNoteNumber);
}
//========================================
void stopNote(float velocity, bool allowTailOff)
{
env1.trigger = 0;
allowTailOff = true;
//if(velocity == 0)
clearCurrentNote();
}
//========================================
void renderNextBlock(AudioBuffer<float> &outputBuffer, int startSample, int numSamples)
{
env1.setAttack(2000);
env1.setDecay(500);
env1.setSustain(0.8);
env1.setRelease(2000);
for(int sample = 0; sample < numSamples; sample++)
{
double wave = osc1.square(frequency);
wave = env1.adsr(wave, env1.trigger) * level;
wave = filter.lores(wave, 200, 0.1);
for(int channel = 0; channel < outputBuffer.getNumChannels(); channel++)
{
outputBuffer.addSample(channel, startSample, wave);
}
startSample++;
}
}
//========================================
void pitchWheelMoved(int newPitchWheelValue)
{
}
//========================================
void controllerMoved(int controllerNumber, int newControllerValue)
{
}
//========================================
private:
double level;
double frequency;
maxiOsc osc1;
maxiEnv env1;
maxiFilter filter;
};
| [
"lfcheng@usc.edu"
] | lfcheng@usc.edu |
bbd821adbc247c093dbfa58115eb1dad5e059600 | a65c77b44164b2c69dfe4bfa2772d18ae8e0cce2 | /0contest/CF_100864/pJ.cpp | e5ce1aad1e03379bacff7bb77484613e7435316b | [] | no_license | dl8sd11/online-judge | 553422b55080e49e6bd9b38834ccf1076fb95395 | 5ef8e3c5390e54381683f62f88d03629e1355d1d | refs/heads/master | 2021-12-22T15:13:34.279988 | 2021-12-13T06:45:49 | 2021-12-13T06:45:49 | 111,268,306 | 1 | 6 | null | null | null | null | UTF-8 | C++ | false | false | 4,630 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<double, double> pdd;
#define SQ(i) ((i)*(i))
#define MEM(a, b) memset(a, (b), sizeof(a))
#define SZ(i) static_cast<int>(i.size())
#define FOR(i, j, k, in) for (int i=j; i < (k) ; i+=in)
#define RFOR(i, j, k, in) for (int i=j; i >= (k) ; i-=in)
#define REP(i, j) FOR(i, 0, j, 1)
#define REP1(i, j) FOR(i, 1, j+1, 1)
#define RREP(i, j) RFOR(i, j, 0, 1)
#define ALL(_a) _a.begin(), _a.end()
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define X first
#define Y second
template<typename T, typename S>
istream &operator >> (istream &is, pair<T, S> &p) {
return is >> p.X >> p.Y;
}
#ifdef tmd
#define TIME(i) Timer i(#i)
#define debug(...) do {\
fprintf(stderr, "%s - %d (%s) = ", __PRETTY_FUNCTION__, __LINE__, #__VA_ARGS__);\
_do(__VA_ARGS__);\
}while(0)
template<typename T> void _do(T &&_x) {cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x, S &&..._t) {cerr <<_x <<" ,"; _do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s, const pair<_a, _b> &_p) {return _s << "(" << _p.X << "," << _p.Y << ")";}
template<typename It> ostream& _OUTC(ostream &_s, It _ita, It _itb)
{
_s << "{";
for (It _it=_ita; _it != _itb; _it++) {
_s <<(_it == _ita?"":",")<< *_it;
}
_s << "}";
return _s;
}
template<typename _a> ostream &operator << (ostream &_s, const vector<_a> &_c) {return _OUTC(_s,ALL(_c));}
template<typename _a, size_t _b> ostream &operator << (ostream &_s, const array<_a,_b> &_c) {return _OUTC(_s, ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s, const deque<_a> &_c) {return _OUTC(_s, ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s, const map<_a,_b> &_c) {return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
class Timer {
private:
string scope_name;
chrono::high_resolution_clock::time_point start_time;
public:
Timer (string name) : scope_name(name) {
start_time = chrono::high_resolution_clock::now();
}
~Timer () {
auto stop_time = chrono::high_resolution_clock::now();
auto length = chrono::duration_cast<chrono::microseconds>(stop_time - start_time).count();
double mlength = double(length) * 0.001;
debug(scope_name, mlength);
}
};
#else
#define TIME(i)
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0)
#endif
const ll MOD = 1000000007;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const int iNF = 0x3f3f3f3f;
const ll MAXN = 402;
char w[MAXN][MAXN];
char ans[MAXN][MAXN];
vector<int> ch[MAXN], cv[MAXN];
signed main () {
TIME(main);
freopen("japanese.in", "r", stdin);
freopen("japanese.out", "w", stdout);
int n, m;
cin >> n >> m;
for (int i=0; i<n; i++) {
for (int j=0; j<m; j++) {
char c;
cin >> c;
w[i][j] = c == 'X';
}
}
for (int i=0; i<n; i++) {
int cnt = w[i][0];
for (int j=1; j<=m; j++) {
if (w[i][j-1] == 1 && w[i][j] == 0) {
ch[i].eb(cnt);
cnt = 0;
}
if (w[i][j]) {
cnt++;
}
}
}
for (int j=0; j<m; j++) {
int cnt = w[0][j];
for (int i=1; i<=n; i++) {
if (w[i-1][j] == 1 && w[i][j] == 0) {
cv[j].eb(cnt);
cnt = 0;
}
if (w[i][j]) {
cnt++;
}
}
}
int mxh = 0, mxv = 0;
for (int i=0; i<n; i++) {
mxh = max(mxh, SZ(ch[i]));
}
for (int i=0; i<m; i++) {
mxv = max(mxv, SZ(cv[i]));
}
for (int i=0; i<mxv+n; i++) {
for (int j=0; j<mxh+m; j++) {
ans[i][j] = '.';
}
}
for (int i=0; i<mxv; i++) {
for (int j=0; j<mxh; j++) {
ans[i][j] = '*';
}
}
for (int i=0; i<n; i++) {
for (int j=0; j<mxh; j++) {
ans[i+mxv][mxh-1-j] = j < SZ(ch[i]) ? ch[i][SZ(ch[i])-1-j]+'0' : '_';
}
}
for (int j=0; j<m; j++) {
for (int i=0; i<mxv; i++) {
ans[mxv-1-i][j+mxh] = i < SZ(cv[j]) ? cv[j][SZ(cv[j])-1-i]+'0' : '_';
}
}
for (int i=0; i<mxv+n; i++) {
for (int j=0; j<mxh+m; j++) {
cout << ans[i][j];
}
cout << endl;
}
return 0;
}
| [
"tmd910607@gmail.com"
] | tmd910607@gmail.com |
0bd2fb46ab1d4d7b6e46d541bddd7fc4d1f311a4 | cdfde37ecd614fdb41e9306f9b90e14a664cea99 | /src/qt/overviewpage.cpp | 4735af28eba7df06e6730ae7104cd7b9c0079a29 | [
"MIT"
] | permissive | digital50/PIVX-master-test-mod | 12b0fd08c5ded9ff0978b20bf64395142d18ea69 | 57b70194b5c1277b87b537c2b92af4b597cf0224 | refs/heads/master | 2021-04-29T23:32:44.394988 | 2018-02-14T23:56:04 | 2018-02-14T23:56:04 | 121,557,911 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 19,486 | cpp | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The GoCoinMe developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "overviewpage.h"
#include "ui_overviewpage.h"
#include "bitcoinunits.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "init.h"
#include "obfuscation.h"
#include "obfuscationconfig.h"
#include "optionsmodel.h"
#include "transactionfilterproxy.h"
#include "transactionrecord.h"
#include "transactiontablemodel.h"
#include "walletmodel.h"
#include <QAbstractItemDelegate>
#include <QPainter>
#include <QSettings>
#include <QTimer>
#define DECORATION_SIZE 48
#define ICON_OFFSET 16
#define NUM_ITEMS 9
extern CWallet* pwalletMain;
class TxViewDelegate : public QAbstractItemDelegate
{
Q_OBJECT
public:
TxViewDelegate() : QAbstractItemDelegate(), unit(BitcoinUnits::PIV)
{
}
inline void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
painter->save();
QIcon icon = qvariant_cast<QIcon>(index.data(Qt::DecorationRole));
QRect mainRect = option.rect;
mainRect.moveLeft(ICON_OFFSET);
QRect decorationRect(mainRect.topLeft(), QSize(DECORATION_SIZE, DECORATION_SIZE));
int xspace = DECORATION_SIZE + 8;
int ypad = 6;
int halfheight = (mainRect.height() - 2 * ypad) / 2;
QRect amountRect(mainRect.left() + xspace, mainRect.top() + ypad, mainRect.width() - xspace - ICON_OFFSET, halfheight);
QRect addressRect(mainRect.left() + xspace, mainRect.top() + ypad + halfheight, mainRect.width() - xspace, halfheight);
icon.paint(painter, decorationRect);
QDateTime date = index.data(TransactionTableModel::DateRole).toDateTime();
QString address = index.data(Qt::DisplayRole).toString();
qint64 amount = index.data(TransactionTableModel::AmountRole).toLongLong();
bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool();
// Check transaction status
int nStatus = index.data(TransactionTableModel::StatusRole).toInt();
bool fConflicted = false;
if (nStatus == TransactionStatus::Conflicted || nStatus == TransactionStatus::NotAccepted) {
fConflicted = true; // Most probably orphaned, but could have other reasons as well
}
bool fImmature = false;
if (nStatus == TransactionStatus::Immature) {
fImmature = true;
}
QVariant value = index.data(Qt::ForegroundRole);
QColor foreground = COLOR_BLACK;
if (value.canConvert<QBrush>()) {
QBrush brush = qvariant_cast<QBrush>(value);
foreground = brush.color();
}
painter->setPen(foreground);
QRect boundingRect;
painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect);
if (index.data(TransactionTableModel::WatchonlyRole).toBool()) {
QIcon iconWatchonly = qvariant_cast<QIcon>(index.data(TransactionTableModel::WatchonlyDecorationRole));
QRect watchonlyRect(boundingRect.right() + 5, mainRect.top() + ypad + halfheight, 16, halfheight);
iconWatchonly.paint(painter, watchonlyRect);
}
if(fConflicted) { // No need to check anything else for conflicted transactions
foreground = COLOR_CONFLICTED;
} else if (!confirmed || fImmature) {
foreground = COLOR_UNCONFIRMED;
} else if (amount < 0) {
foreground = COLOR_NEGATIVE;
} else {
foreground = COLOR_BLACK;
}
painter->setPen(foreground);
QString amountText = BitcoinUnits::formatWithUnit(unit, amount, true, BitcoinUnits::separatorAlways);
if (!confirmed) {
amountText = QString("[") + amountText + QString("]");
}
painter->drawText(amountRect, Qt::AlignRight | Qt::AlignVCenter, amountText);
painter->setPen(COLOR_BLACK);
painter->drawText(amountRect, Qt::AlignLeft | Qt::AlignVCenter, GUIUtil::dateTimeStr(date));
painter->restore();
}
inline QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
{
return QSize(DECORATION_SIZE, DECORATION_SIZE);
}
int unit;
};
#include "overviewpage.moc"
OverviewPage::OverviewPage(QWidget* parent) : QWidget(parent),
ui(new Ui::OverviewPage),
clientModel(0),
walletModel(0),
currentBalance(-1),
currentUnconfirmedBalance(-1),
currentImmatureBalance(-1),
currentZerocoinBalance(-1),
currentUnconfirmedZerocoinBalance(-1),
currentimmatureZerocoinBalance(-1),
currentWatchOnlyBalance(-1),
currentWatchUnconfBalance(-1),
currentWatchImmatureBalance(-1),
txdelegate(new TxViewDelegate()),
filter(0)
{
nDisplayUnit = 0; // just make sure it's not unitialized
ui->setupUi(this);
// Recent transactions
ui->listTransactions->setItemDelegate(txdelegate);
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);
connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex)));
// init "out of sync" warning labels
ui->labelWalletStatus->setText("(" + tr("out of sync") + ")");
ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")");
// start with displaying the "out of sync" warnings
showOutOfSyncWarning(true);
}
void OverviewPage::handleTransactionClicked(const QModelIndex& index)
{
if (filter)
emit transactionClicked(filter->mapToSource(index));
}
OverviewPage::~OverviewPage()
{
delete ui;
}
void OverviewPage::getPercentage(CAmount nUnlockedBalance, CAmount nZerocoinBalance, QString& sPIVPercentage, QString& szPIVPercentage)
{
int nPrecision = 2;
double dzPercentage = 0.0;
if (nZerocoinBalance <= 0){
dzPercentage = 0.0;
}
else{
if (nUnlockedBalance <= 0){
dzPercentage = 100.0;
}
else{
dzPercentage = 100.0 * (double)(nZerocoinBalance / (double)(nZerocoinBalance + nUnlockedBalance));
}
}
double dPercentage = 100.0 - dzPercentage;
szPIVPercentage = "(" + QLocale(QLocale::system()).toString(dzPercentage, 'f', nPrecision) + " %)";
sPIVPercentage = "(" + QLocale(QLocale::system()).toString(dPercentage, 'f', nPrecision) + " %)";
}
void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
const CAmount& zerocoinBalance, const CAmount& unconfirmedZerocoinBalance, const CAmount& immatureZerocoinBalance,
const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance)
{
currentBalance = balance;
currentUnconfirmedBalance = unconfirmedBalance;
currentImmatureBalance = immatureBalance;
currentZerocoinBalance = zerocoinBalance;
currentUnconfirmedZerocoinBalance = unconfirmedZerocoinBalance;
currentimmatureZerocoinBalance = immatureZerocoinBalance;
currentWatchOnlyBalance = watchOnlyBalance;
currentWatchUnconfBalance = watchUnconfBalance;
currentWatchImmatureBalance = watchImmatureBalance;
CAmount nLockedBalance = 0;
CAmount nWatchOnlyLockedBalance = 0;
if (pwalletMain) {
nLockedBalance = pwalletMain->GetLockedCoins();
nWatchOnlyLockedBalance = pwalletMain->GetLockedWatchOnlyBalance();
}
// PIV Balance
CAmount nTotalBalance = balance + unconfirmedBalance;
CAmount pivAvailableBalance = balance - immatureBalance - nLockedBalance;
CAmount nTotalWatchBalance = watchOnlyBalance + watchUnconfBalance + watchImmatureBalance;
CAmount nUnlockedBalance = nTotalBalance - nLockedBalance;
// zPIV Balance
CAmount matureZerocoinBalance = zerocoinBalance - immatureZerocoinBalance;
// Percentages
QString szPercentage = "";
QString sPercentage = "";
getPercentage(nUnlockedBalance, zerocoinBalance, sPercentage, szPercentage);
// Combined balances
CAmount availableTotalBalance = pivAvailableBalance + matureZerocoinBalance;
CAmount sumTotalBalance = nTotalBalance + zerocoinBalance;
// PIV labels
ui->labelBalance->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, pivAvailableBalance, false, BitcoinUnits::separatorAlways));
ui->labelUnconfirmed->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
ui->labelImmature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, immatureBalance, false, BitcoinUnits::separatorAlways));
ui->labelLockedBalance->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, nLockedBalance, false, BitcoinUnits::separatorAlways));
ui->labelTotal->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, nTotalBalance, false, BitcoinUnits::separatorAlways));
// Watchonly labels
ui->labelWatchAvailable->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
ui->labelWatchPending->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
ui->labelWatchImmature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
ui->labelWatchLocked->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, nWatchOnlyLockedBalance, false, BitcoinUnits::separatorAlways));
ui->labelWatchTotal->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, nTotalWatchBalance, false, BitcoinUnits::separatorAlways));
// zPIV labels
ui->labelzBalance->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, zerocoinBalance, false, BitcoinUnits::separatorAlways));
ui->labelzBalanceUnconfirmed->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, unconfirmedZerocoinBalance, false, BitcoinUnits::separatorAlways));
ui->labelzBalanceMature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, matureZerocoinBalance, false, BitcoinUnits::separatorAlways));
ui->labelzBalanceImmature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, immatureZerocoinBalance, false, BitcoinUnits::separatorAlways));
// Combined labels
ui->labelBalancez->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, availableTotalBalance, false, BitcoinUnits::separatorAlways));
ui->labelTotalz->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, sumTotalBalance, false, BitcoinUnits::separatorAlways));
// Percentage labels
ui->labelPIVPercent->setText(sPercentage);
ui->labelzPIVPercent->setText(szPercentage);
// Adjust bubble-help according to AutoMint settings
QString automintHelp = tr("Current percentage of zPIV.\nIf AutoMint is enabled this percentage will settle around the configured AutoMint percentage (default = 10%).\n");
bool fEnableZeromint = GetBoolArg("-enablezeromint", true);
int nZeromintPercentage = GetArg("-zeromintpercentage", 10);
if (fEnableZeromint) {
automintHelp += tr("AutoMint is currently enabled and set to ") + QString::number(nZeromintPercentage) + "%.\n";
automintHelp += tr("To disable AutoMint add 'enablezeromint=0' in gocoinme.conf.");
}
else {
automintHelp += tr("AutoMint is currently disabled.\nTo enable AutoMint change 'enablezeromint=0' to 'enablezeromint=1' in gocoinme.conf");
}
// Only show most balances if they are non-zero for the sake of simplicity
QSettings settings;
bool settingShowAllBalances = !settings.value("fHideZeroBalances").toBool();
bool showSumAvailable = settingShowAllBalances || sumTotalBalance != availableTotalBalance;
ui->labelBalanceTextz->setVisible(showSumAvailable);
ui->labelBalancez->setVisible(showSumAvailable);
bool showPIVAvailable = settingShowAllBalances || pivAvailableBalance != nTotalBalance;
bool showWatchOnlyPIVAvailable = watchOnlyBalance != nTotalWatchBalance;
bool showPIVPending = settingShowAllBalances || unconfirmedBalance != 0;
bool showWatchOnlyPIVPending = watchUnconfBalance != 0;
bool showPIVLocked = settingShowAllBalances || nLockedBalance != 0;
bool showWatchOnlyPIVLocked = nWatchOnlyLockedBalance != 0;
bool showImmature = settingShowAllBalances || immatureBalance != 0;
bool showWatchOnlyImmature = watchImmatureBalance != 0;
bool showWatchOnly = nTotalWatchBalance != 0;
ui->labelBalance->setVisible(showPIVAvailable || showWatchOnlyPIVAvailable);
ui->labelBalanceText->setVisible(showPIVAvailable || showWatchOnlyPIVAvailable);
ui->labelWatchAvailable->setVisible(showPIVAvailable && showWatchOnly);
ui->labelUnconfirmed->setVisible(showPIVPending || showWatchOnlyPIVPending);
ui->labelPendingText->setVisible(showPIVPending || showWatchOnlyPIVPending);
ui->labelWatchPending->setVisible(showPIVPending && showWatchOnly);
ui->labelLockedBalance->setVisible(showPIVLocked || showWatchOnlyPIVLocked);
ui->labelLockedBalanceText->setVisible(showPIVLocked || showWatchOnlyPIVLocked);
ui->labelWatchLocked->setVisible(showPIVLocked && showWatchOnly);
ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature); // for symmetry reasons also show immature label when the watch-only one is shown
ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature);
ui->labelWatchImmature->setVisible(showImmature && showWatchOnly); // show watch-only immature balance
bool showzPIVAvailable = settingShowAllBalances || zerocoinBalance != matureZerocoinBalance;
bool showzPIVUnconfirmed = settingShowAllBalances || unconfirmedZerocoinBalance != 0;
bool showzPIVImmature = settingShowAllBalances || immatureZerocoinBalance != 0;
ui->labelzBalanceMature->setVisible(showzPIVAvailable);
ui->labelzBalanceMatureText->setVisible(showzPIVAvailable);
ui->labelzBalanceUnconfirmed->setVisible(showzPIVUnconfirmed);
ui->labelzBalanceUnconfirmedText->setVisible(showzPIVUnconfirmed);
ui->labelzBalanceImmature->setVisible(showzPIVImmature);
ui->labelzBalanceImmatureText->setVisible(showzPIVImmature);
bool showPercentages = ! (zerocoinBalance == 0 && nTotalBalance == 0);
ui->labelPIVPercent->setVisible(showPercentages);
ui->labelzPIVPercent->setVisible(showPercentages);
static int cachedTxLocks = 0;
if (cachedTxLocks != nCompleteTXLocks) {
cachedTxLocks = nCompleteTXLocks;
ui->listTransactions->update();
}
}
// show/hide watch-only labels
void OverviewPage::updateWatchOnlyLabels(bool showWatchOnly)
{
ui->labelSpendable->setVisible(showWatchOnly); // show spendable label (only when watch-only is active)
ui->labelWatchonly->setVisible(showWatchOnly); // show watch-only label
ui->labelWatchAvailable->setVisible(showWatchOnly); // show watch-only available balance
ui->labelWatchPending->setVisible(showWatchOnly); // show watch-only pending balance
ui->labelWatchLocked->setVisible(showWatchOnly); // show watch-only total balance
ui->labelWatchTotal->setVisible(showWatchOnly); // show watch-only total balance
if (!showWatchOnly) {
ui->labelWatchImmature->hide();
} else {
ui->labelBalance->setIndent(20);
ui->labelUnconfirmed->setIndent(20);
ui->labelLockedBalance->setIndent(20);
ui->labelImmature->setIndent(20);
ui->labelTotal->setIndent(20);
}
}
void OverviewPage::setClientModel(ClientModel* model)
{
this->clientModel = model;
if (model) {
// Show warning if this is a prerelease version
connect(model, SIGNAL(alertsChanged(QString)), this, SLOT(updateAlerts(QString)));
updateAlerts(model->getStatusBarWarnings());
}
}
void OverviewPage::setWalletModel(WalletModel* model)
{
this->walletModel = model;
if (model && model->getOptionsModel()) {
// Set up transaction list
filter = new TransactionFilterProxy();
filter->setSourceModel(model->getTransactionTableModel());
filter->setLimit(NUM_ITEMS);
filter->setDynamicSortFilter(true);
filter->setSortRole(Qt::EditRole);
filter->setShowInactive(false);
filter->sort(TransactionTableModel::Date, Qt::DescendingOrder);
ui->listTransactions->setModel(filter);
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
// Keep up to date with wallet
setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
model->getZerocoinBalance(), model->getUnconfirmedZerocoinBalance(), model->getImmatureZerocoinBalance(),
model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
connect(model, SIGNAL(balanceChanged(CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount)), this,
SLOT(setBalance(CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount)));
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
connect(model->getOptionsModel(), SIGNAL(hideZeroBalancesChanged(bool)), this, SLOT(updateDisplayUnit()));
updateWatchOnlyLabels(model->haveWatchOnly());
connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool)));
}
// update the display unit, to not use the default ("PIV")
updateDisplayUnit();
}
void OverviewPage::updateDisplayUnit()
{
if (walletModel && walletModel->getOptionsModel()) {
nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();
if (currentBalance != -1)
setBalance(currentBalance, currentUnconfirmedBalance, currentImmatureBalance, currentZerocoinBalance, currentUnconfirmedZerocoinBalance, currentimmatureZerocoinBalance,
currentWatchOnlyBalance, currentWatchUnconfBalance, currentWatchImmatureBalance);
// Update txdelegate->unit with the current unit
txdelegate->unit = nDisplayUnit;
ui->listTransactions->update();
}
}
void OverviewPage::updateAlerts(const QString& warnings)
{
this->ui->labelAlerts->setVisible(!warnings.isEmpty());
this->ui->labelAlerts->setText(warnings);
}
void OverviewPage::showOutOfSyncWarning(bool fShow)
{
ui->labelWalletStatus->setVisible(fShow);
ui->labelTransactionsStatus->setVisible(fShow);
}
| [
"35665802+digital50@users.noreply.github.com"
] | 35665802+digital50@users.noreply.github.com |
f9df8b02af5d57070407b98d9ce8e0f74275d070 | 09a97f23f59c74b620f0eb87dd8fd6aed68ab9ed | /Data Structures/Range Minimum Query/RMQ.cpp | 67c5cd4388e176520c276beb3d44ffc358bff221 | [] | no_license | dragan224/Algorithms | a94dc63652d0223787d3d8780957bb17aa696b6c | 47d10bfdec0a07e941c43fedbeba8b3f7dbabc19 | refs/heads/master | 2020-05-19T17:46:11.171288 | 2014-02-17T14:57:26 | 2014-02-17T14:57:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 802 | cpp | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
const int maxN = 100224;
const int maxLog = 18;
struct RMQ {
int table[maxN][maxLog];
void build(int arr[], int n) {
for (int i = 0; i < n; i++) {
table[i][0] = arr[i];
}
for (int k = 1; k < maxLog; k++) {
int step = 1 << k-1;
for (int i = 0; i < n; i++) {
table[i][k] = table[i][k - 1];
if (i + step < n) {
table[i][k] = min(table[i][k], table[i + step][k - 1]);
}
}
}
}
int query(int l, int r) {
int k = log((double)(r - l)) / log(2.0) + 0.00000224;
return min(table[l][k], table[r - (1 << k) + 1][k]);
}
};
int main() {
return 0;
}
| [
"dmarkovic13@raf.edu.rs"
] | dmarkovic13@raf.edu.rs |
ea19803b4dfd8adc021e085dbf52ae13cdcd7aca | 2e422acfa15846823bb4105c312f301e9cb2a740 | /Roottest/JunoARCon/include/NeutrinoSepctrum.hh | 96f33061096b8e15c592ba91ce2446a60d8eb15c | [] | no_license | Jinnan-Zhang/CodeEx | 2443f37b56c5ceef83b3c5729b33b2eb7bcaed95 | 32fdea95b4bb0266d38c435cb2c08ba2f0c4a1dd | refs/heads/master | 2022-05-02T06:12:33.978802 | 2022-03-25T02:37:42 | 2022-03-25T02:37:42 | 220,944,459 | 0 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 1,515 | hh | #ifndef NeutrinoSpectrum_hh
#define NeutrinoSepctrum_hh
#include <TF1.h>
class TF1;
class NeutrinoSpectrum
{
public:
NeutrinoSpectrum();
~NeutrinoSpectrum();
//void SetEnergyResolution(double E_Re){Energy_resolution=E_Re;}
void SetProtonMassRatio(double ra){MassRatioOfProton=ra;}
void SetRunTime(double RTinDay){RunTime=RTinDay;}
void SetLSMass(double m_inkg){MassOfLS=m_inkg;}
void SetBaseLine(double L_inkm){BaseLine=L_inkm;}//L in km
double GetBaseLine(){return BaseLine;}
double GetEfficiency(double *E_nu,double *par={0});
double Spectrum0(double *E_nu,double *par);
double operator()(double *E_nu,double *par);
// {
// ReactorNuFlux *myflux=new ReactorNuFlux();
// IBDCrossSection *myCS=new IBDCrossSection();
// OscillationFunction *myOSP=new OscillationFunction();
// TF1* EnergySmearing=new TF1("EnergySmearing","gaus",-100.,100.);
// EnergySmearing->SetParameters(1./(sqrt(2.*TMath::Pi()*E[0])*Energy_resolution),0,Energy_resolution*sqrt(E[0]));
// }
private:
double RunTime;
//double Energy_resolution;
double DetectionEfficiency;
double MassOfLS;//in kg
double MassOfPronton_kg;
double MassRatioOfProton;
double DeltaM31_sq;
double BaseLine;//in km
double NumOfProton;
};
#endif | [
"zhangjinnan14@ucas.edu.cn"
] | zhangjinnan14@ucas.edu.cn |
cd9a7526834a107b6ebfc308e9aa7e68e0139e5c | 778be864c82aa7c5397f140df31bd937f2fd123b | /tests/srhd_sim/isentropic_flow_2nd_ord/test.cpp | 1cd09c2ba70f2a540e5a27551f5386665a1d29ae | [
"MIT"
] | permissive | bolverk/fujin | 728cc75f8e27e1b881ec3f1f7393297479be03bd | 53d28f330b9e81eadb8be51c0c102b47bc02483c | refs/heads/master | 2021-06-02T20:33:28.992081 | 2021-03-30T15:37:16 | 2021-03-30T15:37:16 | 95,355,983 | 2 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 4,326 | cpp | /*
Isentropic flow - verifies the Riemann invariant are properly advected
See following article for more detail
W. Zhang & A. I. MacFadyen
"RAM: A Relativistic Adaptive mesh refinement Hydrodynamics Code"
Astrophys. Journ. Supp. Ser. 164:255-279 (2006)
*/
#include <iostream>
#include <fstream>
#include <vector>
#include "srhd_sim.hpp"
#include "ideal_gas.hpp"
#include "imgrs.hpp"
#include "van_leer.hpp"
#include "rigid_wall.hpp"
#include "universal_error.hpp"
#include "diagnostics.hpp"
#include "main_loop.hpp"
#include "hdf5_snapshot.hpp"
#ifdef PARALLEL
#include "parallel_helper.hpp"
#endif // PARALLEL
using namespace std;
namespace {
class density_distribution
{
private:
const double dref;
const double alpha;
const double l;
public:
density_distribution(double idref, double ialpha, double il):
dref(idref),alpha(ialpha),l(il) {}
double operator()(double x) const
{
const double f = pow(pow(x/l,2)-1,4)*(abs(x)<l);
return dref*(1+alpha*f);
}
};
class pressure_distribution
{
private:
const double k;
const double g;
const density_distribution& rdd;
public:
pressure_distribution
(double ik, double ig, const density_distribution& irdd):
k(ik),g(ig), rdd(irdd) {}
double operator()(double x) const
{
const double d = rdd(x);
return k*pow(d,g);
}
};
double riemann_invariant(double g, double d, double p,
double v, double s)
{
const double cs = IdealGas(g).dp2ba(d,p);
return atanh(v)+s*(2/sqrt(g-1))*
atanh(cs/sqrt(g-1));
}
class velocity_distribution
{
private:
const double jm;
const double g;
const density_distribution& rdd;
const pressure_distribution& rpd;
public:
velocity_distribution
(double ijm, double ig, const density_distribution& irdd,
const pressure_distribution& irpd):
jm(ijm), g(ig), rdd(irdd), rpd(irpd) {}
double operator()(double x) const
{
const double d = rdd(x);
const double p = rpd(x);
const double aux = jm - riemann_invariant(g, d, p, 0, -1);
return tanh(aux);
}
};
class InitialConditions
{
public:
InitialConditions(double g, double far_away=-10):
dd_(1,1,0.3),
dp_(100,g,dd_),
dv_(riemann_invariant(g,
dd_(far_away),
dp_(far_away),
0,-1),
g,dd_,dp_) {}
density_distribution const& getDensity(void)
{
return dd_;
}
pressure_distribution const& getPressure(void)
{
return dp_;
}
velocity_distribution const& getVelocity(void)
{
return dv_;
}
private:
const density_distribution dd_;
const pressure_distribution dp_;
const velocity_distribution dv_;
};
class SimData
{
public:
SimData(void):
eos_(5./3.),
rs_(eos_.getAdiabaticIndex()),
sr_(),
bc_(rs_),
geometry_(),
sim_(linspace(-0.35,1.35,200),
InitialConditions(eos_.getAdiabaticIndex()).getDensity(),
InitialConditions(eos_.getAdiabaticIndex()).getPressure(),
InitialConditions(eos_.getAdiabaticIndex()).getVelocity(),
bc_,bc_,
eos_,
rs_,
sr_,
geometry_) {}
auto& getSim(void)
{
return sim_;
}
private:
const IdealGas eos_;
const IdealGasRiemannSolver rs_;
VanLeer<simple_vector, simple_vector> sr_;
const RigidWall<simple_vector> bc_;
const Planar geometry_;
SRHDSimulation<simple_vector, simple_vector> sim_;
};
}
int main()
{
#ifdef PARALLEL
MPI_Init(NULL, NULL);
#endif //PARALLEL
SimData sim_data;
auto& sim = sim_data.getSim();
#ifdef PARALLEL
write_hdf5_snapshot(sim, "initial_"+int2str(get_mpi_rank())+".h5");
#else
write_hdf5_snapshot(sim, "initial.h5");
#endif // PARALLEL
main_loop(sim,
SafeTimeTermination<simple_vector, simple_vector>(0.8,1e6),
#ifdef PARALLEL
&SRHDSimulation::timeAdvance,
#else
&SRHDSimulation<simple_vector, simple_vector>::timeAdvance2ndOrder,
#endif // PARALLEL
WriteTime<simple_vector, simple_vector>("time.txt"));
#ifdef PARALLEL
write_hdf5_snapshot(sim, "final_"+int2str(get_mpi_rank())+".h5");
#else
write_hdf5_snapshot(sim, "final.h5");
#endif // PARALLEL
ofstream("test_terminated_normally.res").close();
#ifdef PARALLEL
MPI_Finalize();
#endif // PARALLEL
return 0;
}
| [
"almog.yalin@gmail.com"
] | almog.yalin@gmail.com |
6667e044b326c474cf97624e73f923e7b8675a9a | bb5474b59b5fc0be8bcc3f02ac5b29b54f025c1e | /referlib/server.cpp | f5b9210c5257e684d0d8f421bab507e23380068a | [] | no_license | suzuren/gamelearning | 15165185388b62c14b8e9e64019a8d6d891e5e84 | 317036868ad85177f8658bf71e8dbad7131e98cb | refs/heads/master | 2021-05-10T11:02:29.467047 | 2021-01-29T09:15:32 | 2021-01-29T09:15:32 | 118,399,936 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,832 | cpp | #include <functional>
#include <string>
#include <map>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/file.h>
#include <signal.h>
#include <errno.h>
#include <ctype.h>
#include <syslog.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/epoll.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <stdint.h>
#include <sys/time.h>
#include <time.h>
#include "eventmanager.h"
#include "iobuffer.h"
#include "notification.h"
#include "tcp.h"
using epoll_threadpool::EventManager;
using epoll_threadpool::IOBuffer;
using epoll_threadpool::Notification;
using epoll_threadpool::TcpSocket;
using epoll_threadpool::TcpListenSocket;
using namespace std;
using namespace std::tr1;
using namespace std::tr1::placeholders;
#define TCP_PROTO "tcp"
#define LOG_FILE "./server.log"
#define PID_FILE "//server.pid"
#define MAXEVENTS 64
void Sleep(unsigned int msec)
{
timespec tm;
tm.tv_sec = msec / 1000;
tm.tv_nsec = msec % 1000 * 1000000;
nanosleep(&tm, 0);
}
unsigned long long getTickCount64()
{
timespec _spec;
clock_gettime(CLOCK_MONOTONIC, &_spec);
unsigned long long uTick = _spec.tv_sec * 1000 + _spec.tv_nsec / 1000 / 1000;
return uTick;
}
void errout(const char *msg)
{
if (msg)
{
printf("%s\n", msg);
}
exit(1);
}
char * get_curdir()
{
static char buf[256] = { 0 };
int count = readlink("/proc/self/exe", buf, sizeof(buf));
char * p = strrchr(buf, '/');
if (p != NULL)
{
*(p + 1) = 0;
}
return buf;
}
char * get_exename()
{
static char buf[256] = { 0 };
int count = readlink("/proc/self/exe", buf, sizeof(buf));
return buf;
}
void daemonize()
{
char szCurDir[256] = { 0 };
getcwd(szCurDir, sizeof(szCurDir));
pid_t pid;
if ((pid = fork()) < 0)
{
errout("fork error\n");
}
else if (pid != 0)
{
exit(0);
}
setsid();
signal(SIGTTOU, SIG_IGN);
signal(SIGTTIN, SIG_IGN);
signal(SIGTSTP, SIG_IGN);
struct sigaction sig;
sig.sa_handler = SIG_IGN;
sig.sa_flags = 0;
sigemptyset(&sig.sa_mask);
sigaction(SIGHUP, &sig, NULL);
chdir(szCurDir);
}
static int check_pid(const char *pidfile)
{
char pidfilebuf[256] = { 0 };
int count = readlink("/proc/self/exe", pidfilebuf, sizeof(pidfilebuf));
char * p = strrchr(pidfilebuf, '/');
if (p != NULL)
{
*(p + 1) = 0;
}
unsigned int len = strlen(pidfilebuf);
sprintf(pidfilebuf + len, "%s", pidfile);
int pid = 0;
FILE *f = fopen((const char *)pidfilebuf, "r");
if (f == NULL)
{
return 0;
}
int n = fscanf(f, "%d", &pid);
fclose(f);
if (n != 1 || pid == 0 || pid == getpid())
{
return 0;
}
if (kill(pid, 0) && errno == ESRCH)
{
return 0;
}
return pid;
}
static int write_pid(const char *pidfile)
{
char pidfilebuf[256] = { 0 };
int count = readlink("/proc/self/exe", pidfilebuf, sizeof(pidfilebuf));
char * p = strrchr(pidfilebuf, '/');
if (p != NULL)
{
*(p + 1) = 0;
}
unsigned int len = strlen(pidfilebuf);
sprintf(pidfilebuf + len, "%s", pidfile);
FILE *f;
int pid = 0;
int fd = open((const char *)pidfilebuf, O_RDWR | O_CREAT, 0644);
if (fd == -1)
{
fprintf(stderr, "Can't create pidfile [%s].\n", pidfile);
return 0;
}
f = fdopen(fd, "r+");
if (f == NULL)
{
fprintf(stderr, "Can't open pidfile [%s].\n", pidfile);
return 0;
}
if (flock(fd, LOCK_EX | LOCK_NB) == -1)
{
int n = fscanf(f, "%d", &pid);
fclose(f);
if (n != 1)
{
fprintf(stderr, "Can't lock and read pidfile.\n");
}
else
{
fprintf(stderr, "Can't lock pidfile, lock is held by pid %d.\n", pid);
}
return 0;
}
pid = getpid();
if (!fprintf(f, "%d\n", pid))
{
fprintf(stderr, "Can't write pid.\n");
close(fd);
return 0;
}
fflush(f);
return pid;
}
shared_ptr<TcpListenSocket> createListenSocket(EventManager *em, int &port)
{
shared_ptr<TcpListenSocket> s;
while (!s)
{
s = TcpListenSocket::create(em, port);
}
return s;
}
static map<int, shared_ptr<TcpSocket> > sockets;
void OnReceiveCallback(IOBuffer* iobuf)
{
printf("OnReceiveCallback - size:%d\n", iobuf->size());
iobuf->print_data();
map<int, shared_ptr<TcpSocket> >::iterator it_socket = sockets.begin();
for (; it_socket != sockets.end(); it_socket++)
{
printf("it_socket.first:%d\n", it_socket->first);
shared_ptr<TcpSocket> socket = it_socket->second;
socket->write(iobuf);
}
}
void OnDisconnectCallback()
{
//sockets.erase(fd());
printf("socket disconnect ...\n");
}
void OnAcceptCallback(shared_ptr<TcpSocket> socket)
{
printf("accent socket - fd:%d\n", socket->fd());
if (sockets.find(socket->fd()) == sockets.end())
{
socket->setReceiveCallback(OnReceiveCallback);
socket->setDisconnectCallback(OnDisconnectCallback);
socket->start();
sockets[socket->fd()] = socket;
}
else
{
//sockets[socket->fd()] = socket;
}
}
int main(int argc, char *argv[])
{
printf("hello server!\n");
//daemonize();
//int pid = check_pid(PID_FILE);
//if (pid)
//{
// fprintf(stderr, "server is already running, pid = %d.\n", pid);
// return 1;
//}
//pid = write_pid(PID_FILE);
//if (pid == 0)
//{
// return 1;
//}
// ---
EventManager em;
em.start(4);
int port = 60933;
shared_ptr<TcpListenSocket> pListenSocket = createListenSocket(&em, port);
assert(pListenSocket != NULL);
int fd = pListenSocket->fd();
printf("server listen success.port:%d,fd:%d!\n", port, fd);
pListenSocket->setAcceptCallback(OnAcceptCallback);
// ---
unsigned long long startTime = 0;
unsigned long long endTime = 0;
unsigned long long sleepTime = 0;
while (true)
{
startTime = getTickCount64();
// doing some
endTime = getTickCount64();
sleepTime = endTime - startTime;
if (sleepTime > (100 - 10))
{
sleepTime = 10;
}
else
{
sleepTime = 100 - sleepTime;
}
Sleep(sleepTime);
}
printf("server shutdown ...\n");
return 0;
}
| [
"root@sucer.pc"
] | root@sucer.pc |
7cbe5da861b01c38eb081fa3c4cb8dc58cad5336 | 07e7f955514da0fbaf5e5df457055a85ee9b6e18 | /RtspWriteToFile/CRtspRecorder.cpp | 401330dea991fa3ef6cc759b9247dcbf32848f90 | [] | no_license | lineCode/FFmpegTest | 2d1f9a2907805750fdc3eb178868d98b5642552d | cc67a17994a90101b1214f7692fea7a7de1ffb86 | refs/heads/master | 2021-01-09T19:55:46.629592 | 2018-08-29T08:10:31 | 2018-08-29T08:10:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,106 | cpp | #include "CRtspRecorder.h"
CRtspRecorder::CRtspRecorder(PCHAR input_url, PCHAR output_file)
: CBaseRtsp(input_url)
{
_output_file = output_file;
}
CRtspRecorder::~CRtspRecorder()
{
}
BOOL CRtspRecorder::Start()
{
bool verbose = false;
VSInput* input = open_input("rtsp", _input_url, verbose);
VSOutput* output = open_output("mp4", _output_file, input, verbose);
while (true) {
AVPacket* packet = av_packet_alloc();
av_init_packet(packet);
auto readRes = read_packet(input, packet, verbose);
if (readRes == -1) {
continue;
}
if (readRes == 0) {
continue;
}
if (write_packet(input, output, packet, verbose) > 0) {
//all ok;
};
av_packet_free(&packet);
}
destroy_input(input);
destroy_output(output);
}
// We change the packet's pts, dts, duration, pos.
//
// We do not unref it.
//
// Returns:
// -1 if error
// 1 if we wrote the packet
int CRtspRecorder::write_packet(const struct VSInput * const input, struct VSOutput * const output, AVPacket * const pkt, const bool verbose)
{
if (!input || !output || !pkt) {
printf("%s\n", strerror(EINVAL));
return -1;
}
AVStream * const in_stream = input->format_ctx->streams[pkt->stream_index];
if (!in_stream) {
printf("input stream not found with stream index %d\n", pkt->stream_index);
return -1;
}
// If there are multiple input streams, then the stream index on the packet
// may not match the stream index in our output. We need to ensure the index
// matches. Note by this point we have checked that it is indeed a packet
// from the stream we want (we do this when reading the packet).
//
// As we only ever have a single output stream (one, video), the index will
// be 0.
if (pkt->stream_index != 0) {
if (verbose) {
printf("updating packet stream index to 0 (from %d)\n", pkt->stream_index);
}
pkt->stream_index = 0;
}
AVStream * const out_stream = output->format_ctx->streams[pkt->stream_index];
if (!out_stream) {
printf("output stream not found with stream index %d\n", pkt->stream_index);
return -1;
}
// It is possible that the input is not well formed. Its dts (decompression
// timestamp) may fluctuate. av_write_frame() says that the dts must be
// strictly increasing.
//
// Packets from such inputs might look like:
//
// in: pts:18750 pts_time:0.208333 dts:18750 dts_time:0.208333 duration:3750 duration_time:0.0416667 stream_index:1
// in: pts:0 pts_time:0 dts:0 dts_time:0 duration:3750 duration_time:0.0416667 stream_index:1
//
// dts here is 18750 and then 0.
//
// If we try to write the second packet as is, we'll see this error:
// [mp4 @ 0x10f1ae0] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 18750 >= 0
//
// This is apparently a fairly common problem. In ffmpeg.c (as of ffmpeg
// 3.2.4 at least) there is logic to rewrite the dts and warn if it happens.
// Let's do the same. Note my logic is a little different here.
bool fix_dts = pkt->dts != AV_NOPTS_VALUE && output->last_dts != AV_NOPTS_VALUE && pkt->dts <= output->last_dts;
// It is also possible for input streams to include a packet with
// dts/pts=NOPTS after packets with dts/pts set. These won't be caught by the
// prior case. If we try to send these to the encoder however, we'll generate
// the same error (non monotonically increasing DTS) since the output packet
// will have dts/pts=0.
fix_dts |= pkt->dts == AV_NOPTS_VALUE && output->last_dts != AV_NOPTS_VALUE;
if (fix_dts) {
int64_t const next_dts = output->last_dts + 1;
if (verbose) {
printf("Warning: Non-monotonous DTS in input stream. Previous: %" PRId64 " current: %" PRId64 ". changing to %" PRId64 ".\n",
output->last_dts, pkt->dts, next_dts);
}
// We also apparently (ffmpeg.c does this too) need to update the pts.
// Otherwise we see an error like:
//
// [mp4 @ 0x555e6825ea60] pts (3780) < dts (22531) in stream 0
if (pkt->pts != AV_NOPTS_VALUE && pkt->pts >= pkt->dts) {
pkt->pts = FFMAX(pkt->pts, next_dts);
}
// In the case where pkt->dts was AV_NOPTS_VALUE, pkt->pts can be
// AV_NOPTS_VALUE too which we fix as well.
if (pkt->pts == AV_NOPTS_VALUE) {
pkt->pts = next_dts;
}
pkt->dts = next_dts;
}
if (pkt->pts == AV_NOPTS_VALUE) {
pkt->pts = 0;
}
else {
pkt->pts = av_rescale_q_rnd(pkt->pts, in_stream->time_base, out_stream->time_base, AV_ROUND_PASS_MINMAX);
}
if (pkt->dts == AV_NOPTS_VALUE) {
pkt->dts = 0;
}
else {
pkt->dts = av_rescale_q_rnd(pkt->dts, in_stream->time_base, out_stream->time_base, AV_ROUND_PASS_MINMAX);
}
pkt->duration = av_rescale_q(pkt->duration, in_stream->time_base, out_stream->time_base);
pkt->pos = -1;
// Track last dts we see (see where we use it for why).
output->last_dts = pkt->dts;
// Write encoded frame (as a packet).
// av_interleaved_write_frame() works too, but I don't think it is needed.
// Using av_write_frame() skips buffering.
const int write_res = av_write_frame(output->format_ctx, pkt);
if (write_res != 0) {
//printf("unable to write frame: %s\n", av_err2str(write_res));
return -1;
}
return 1;
}
| [
"prohoroven83@mail.ru"
] | prohoroven83@mail.ru |
6d272e137888a592913b47f120422d7f7cadc9a9 | b269392cc4727b226e15b3f08e9efb41a7f4b048 | /CodeForces/CodeForces 1213B.cpp | 4eac27dcd5cfafc5c03ba1d0e17ed79681b09847 | [] | no_license | ThoseBygones/ACM_Code | edbc31b95077e75d3b17277d843cc24b6223cc0c | 2e8afd599b8065ae52b925653f6ea79c51a1818f | refs/heads/master | 2022-11-12T08:23:55.232349 | 2022-10-30T14:17:23 | 2022-10-30T14:17:23 | 91,112,483 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,799 | cpp | /*
********************************************************************************
* Author: ThoseBygones
* Version: V1.0
* Date: 2020-01-01
* Subject: ACM-ICPC
* Language: C/C++11
* OJ: CodeForces
* Algorithm:
********************************************************************************
* Algo-Description:
********************************************************************************
*/
#include <bits/stdc++.h> //For CodeForces only
using namespace std;
template<class T> inline T sqr(T x)
{
return x * x;
}
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<PII, int> PIII;
typedef pair<LL, LL> PLL;
typedef pair<LL, int> PLI;
typedef pair<LD, LD> PDD;
#define MP make_pair
#define PB push_back
#define sz(x) ((int)(x).size())
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define istr stringstream
#define FOR(i,n) for(int i=0;i<(n);++i)
#define forIt(mp,it) for(__typeof(mp.begin()) it = mp.begin();it!=mp.end();it++)
const double EPS = 1e-6;
const int INF = 0x3fffffff;
const LL LINF = INF * 1ll * INF;
const double PI = acos(-1.0);
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define lowbit(u) (u&(-u))
#define MAXN 10005
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
deque<int> dq;
int ans = 0;
for(int i=0; i<n; i++)
{
int x;
scanf("%d",&x);
if(!dq.empty()) //单调队列非空
{
while(!dq.empty() && dq.back() > x)
{
dq.pop_back();
ans++;
}
}
dq.push_back(x);
}
printf("%d\n",ans);
}
return 0;
}
| [
"1273789365@qq.com"
] | 1273789365@qq.com |
cdb0f7f2a4849a00859541df8c5f0f9822239266 | 359614ba9ed7605ca3f49d7be1a9691984ca00df | /ExperimentImg/MatCImage.cpp | 1cb66df067f91d822dceaa4e5e6e54c7504ea532 | [
"Apache-2.0"
] | permissive | scgakki/CV-Experimental | f6f524c2fec12ded158431d76e0932b2d77b0317 | abb7ebd9fa4e20746e55ead839fd41d8f434f2d7 | refs/heads/master | 2021-05-19T04:17:51.161688 | 2020-04-12T12:33:59 | 2020-04-12T12:33:59 | 251,524,711 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 5,801 | cpp | #include "stdafx.h"
#include "pch.h"
#include "MatCImage.h"
// 实现cv::Mat 结构到 CImage结构的转化
void MatCImage::MatToCImage(Mat& mat, CImage& cimage)
{
if (0 == mat.total())
{
return;
}
int nChannels = mat.channels();
if ((1 != nChannels) && (3 != nChannels))
{
return;
}
int nWidth = mat.cols;
int nHeight = mat.rows;
//重建cimage
cimage.Destroy(); //这一步是防止重复利用造成内存问题
cimage.Create(nWidth, nHeight, 8 * nChannels); //默认图像像素单通道占用1个字节
//拷贝数据
uchar* pucRow; //指向数据区的行指针
uchar* pucImage = (uchar*)cimage.GetBits(); //指向数据区的指针
int nStep = cimage.GetPitch(); //每行的字节数,注意这个返回值有正有负
// 如果是1个通道的图像(灰度图像) DIB格式才需要对调色板设置
// CImage中内置了调色板,我们要对他进行赋值:
if (1 == nChannels) //对于单通道的图像需要初始化调色板
{
RGBQUAD* rgbquadColorTable;
int nMaxColors = 256;
rgbquadColorTable = new RGBQUAD[nMaxColors];
//这里可以通过CI.GetMaxColorTableEntries()得到大小(如果你是CI.Load读入图像的话)
cimage.GetColorTable(0, nMaxColors, rgbquadColorTable); //这里是取得指针
for (int nColor = 0; nColor < nMaxColors; nColor++)
{
//BYTE和uchar一回事,但MFC中都用它
rgbquadColorTable[nColor].rgbBlue = (uchar)nColor; // (BYTE)nColor
rgbquadColorTable[nColor].rgbGreen = (uchar)nColor;
rgbquadColorTable[nColor].rgbRed = (uchar)nColor;
}
cimage.SetColorTable(0, nMaxColors, rgbquadColorTable);
delete[]rgbquadColorTable;
}
for (int nRow = 0; nRow < nHeight; nRow++)
{
pucRow = (mat.ptr<uchar>(nRow));
for (int nCol = 0; nCol < nWidth; nCol++)
{
if (1 == nChannels)
{
*(pucImage + nRow * nStep + nCol) = pucRow[nCol];
}
else if (3 == nChannels)
{
for (int nCha = 0; nCha < 3; nCha++)
{
*(pucImage + nRow * nStep + nCol * 3 + nCha) = pucRow[nCol * 3 + nCha];
}
}
}
}
}
void MatCImage::CImageToMat(CImage& cimage, Mat& mat)
{
if (true == cimage.IsNull())
{
return;
}
int nChannels = cimage.GetBPP() / 8;
if ((1 != nChannels) && (3 != nChannels))
{
return;
}
int nWidth = cimage.GetWidth();
int nHeight = cimage.GetHeight();
//重建mat
if (1 == nChannels)
{
mat.create(nHeight, nWidth, CV_8UC1);
}
else if (3 == nChannels)
{
mat.create(nHeight, nWidth, CV_8UC3);
}
//拷贝数据
uchar* pucRow; //指向数据区的行指针
uchar* pucImage = (uchar*)cimage.GetBits(); //指向数据区的指针
int nStep = cimage.GetPitch(); //每行的字节数,注意这个返回值有正有负
for (int nRow = 0; nRow < nHeight; nRow++)
{
pucRow = (mat.ptr<uchar>(nRow));
for (int nCol = 0; nCol < nWidth; nCol++)
{
if (1 == nChannels)
{
pucRow[nCol] = *(pucImage + nRow * nStep + nCol);
}
else if (3 == nChannels)
{
for (int nCha = 0; nCha < 3; nCha++)
{
pucRow[nCol * 3 + nCha] = *(pucImage + nRow * nStep + nCol * 3 + nCha);
}
}
}
}
}
// VS默认工程是Unicode编码(宽字节),有时需要ANSI,即单字节,实现宽到单的转化
string MatCImage::CString2StdString(const CString& cstr)
{
CT2A str(cstr);
return string(str.m_psz);
}
// 显示图像到指定窗口
void MatCImage::DisplayImage(CWnd* m_pMyWnd, const CImage& image)
{
CDC *m_pDC = m_pMyWnd->GetDC();//获取窗口所拥有的设备上下文,用于显示图像
m_pMyWnd->UpdateWindow();
CRect rc;
// m_pMyWnd->GetWindowRect(&rc);
/*InvalidateRect(m_pMyWnd->m_hWnd,&rc,true);*/
int nwidth = rc.Width();
int nheight = rc.Height();
int fixed_width = min(image.GetWidth(), nwidth);
int fixed_height = min(image.GetHeight(), nheight);
double ratio_w = fixed_width / (double)image.GetWidth();
double ratio_h = fixed_height / (double)image.GetHeight();
double ratio = min(ratio_w, ratio_h);
int show_width = (int)(image.GetWidth() * ratio);
int show_height = (int)(image.GetHeight() * ratio);
int offsetx = (nwidth - show_width) / 2;
int offsety = (nheight - show_height) / 2;
::SetStretchBltMode(m_pDC->GetSafeHdc(), COLORONCOLOR);//设置位图的伸缩模式
image.StretchBlt(m_pDC->GetSafeHdc(), offsetx, offsety, show_width, show_height,
0, 0, image.GetWidth(), image.GetHeight(), SRCCOPY);
}
void MatCImage::DisplayImageEx(CWnd* pWnd, const CImage& image)
{
CDC *m_pDC = pWnd->GetDC();//获取窗口所拥有的设备上下文,用于显示图像
pWnd->UpdateWindow();
CRect rc;
//客户区大小
//CRect rc1;
pWnd->GetWindowRect(&rc);
//ScreenToClient(&rc);
::SetStretchBltMode(m_pDC->GetSafeHdc(), COLORONCOLOR);//设置位图的伸缩模式
image.StretchBlt(m_pDC->GetSafeHdc(), 0, 0, rc.Width() - 1, rc.Height() - 1,
0, 0, image.GetWidth(), image.GetHeight(), SRCCOPY);
}
// 格式转换,AWX云图转到可以显示的opencv支持的格式
Mat MatCImage::AWX2Mat(CString filePath)
{
CFile fp;
Mat mat;
fp.Open(filePath, CFile::modeRead);
ULONGLONG flength = fp.GetLength();
if (2475700 == flength)
{
mat.create(1300, 1900, CV_8UC1);
}
else if (1444803 == flength)
{
mat.create(1201, 1201, CV_8UC1);
}
LONGLONG size = mat.rows * mat.cols;
LONGLONG sizebuff = fp.Seek(-size, CFile::end);
uchar *pSource = new uchar[size];
fp.Read(pSource, size);
fp.Close();
for (int i = 0; i < mat.rows; i++)
{
uchar * ps = mat.ptr<uchar>(i);
for (int j = 0; j < mat.cols; j++)
{
ps[j] = *(pSource + i * mat.cols + j);
}
}
delete pSource;
return mat;
} | [
"36230930+scgakki@users.noreply.github.com"
] | 36230930+scgakki@users.noreply.github.com |
e9bb57a17485fa4fb89827c24e6eca2fd9007c5d | 50b7980236b960b133c91c6d653fb334d904252c | /SDK/BP_BaseProgressActor_functions.cpp | 86af9f045c264f39e848e25613664be61dad2921 | [] | no_license | wyverns1/mordhau_sdk | c5fa2978203f6c3d405a011c06c39274f52549d1 | 43693f2102efc684c1d27fb5b4a0abfa67c1f596 | refs/heads/master | 2020-06-04T00:55:40.096978 | 2019-06-13T17:12:36 | 2019-06-13T17:12:36 | 191,802,239 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,318 | cpp | // Name: MORDHAU, Version: 1.0.0
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.h"
namespace SDK
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------
// Function BP_BaseProgressActor.BP_BaseProgressActor_C.ProgressUpdatedInternal
// (Public, BlueprintCallable, BlueprintEvent)
// Parameters:
// float Progress (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData)
void ABP_BaseProgressActor_C::ProgressUpdatedInternal(float Progress)
{
static auto fn = UObject::FindObject<UFunction>("Function BP_BaseProgressActor.BP_BaseProgressActor_C.ProgressUpdatedInternal");
ABP_BaseProgressActor_C_ProgressUpdatedInternal_Params params;
params.Progress = Progress;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function BP_BaseProgressActor.BP_BaseProgressActor_C.ProgressUpdated
// (Public, BlueprintCallable, BlueprintEvent)
// Parameters:
// float Progress (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData)
void ABP_BaseProgressActor_C::ProgressUpdated(float Progress)
{
static auto fn = UObject::FindObject<UFunction>("Function BP_BaseProgressActor.BP_BaseProgressActor_C.ProgressUpdated");
ABP_BaseProgressActor_C_ProgressUpdated_Params params;
params.Progress = Progress;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function BP_BaseProgressActor.BP_BaseProgressActor_C.UserConstructionScript
// (Event, Public, BlueprintCallable, BlueprintEvent)
void ABP_BaseProgressActor_C::UserConstructionScript()
{
static auto fn = UObject::FindObject<UFunction>("Function BP_BaseProgressActor.BP_BaseProgressActor_C.UserConstructionScript");
ABP_BaseProgressActor_C_UserConstructionScript_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function BP_BaseProgressActor.BP_BaseProgressActor_C.ReceiveBeginPlay
// (Event, Protected, BlueprintEvent)
void ABP_BaseProgressActor_C::ReceiveBeginPlay()
{
static auto fn = UObject::FindObject<UFunction>("Function BP_BaseProgressActor.BP_BaseProgressActor_C.ReceiveBeginPlay");
ABP_BaseProgressActor_C_ReceiveBeginPlay_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function BP_BaseProgressActor.BP_BaseProgressActor_C.ExecuteUbergraph_BP_BaseProgressActor
// ()
// Parameters:
// int EntryPoint (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData)
void ABP_BaseProgressActor_C::ExecuteUbergraph_BP_BaseProgressActor(int EntryPoint)
{
static auto fn = UObject::FindObject<UFunction>("Function BP_BaseProgressActor.BP_BaseProgressActor_C.ExecuteUbergraph_BP_BaseProgressActor");
ABP_BaseProgressActor_C_ExecuteUbergraph_BP_BaseProgressActor_Params params;
params.EntryPoint = EntryPoint;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"jay50@pitt.edu"
] | jay50@pitt.edu |
f63895c87ebdfb471c75adde625e33d1c74c20b7 | e393488a5829a15c03e97c67d465514191ec001d | /app/view/CTableView.cpp | b09bda336db52ff82d36fb42b0ce971a508b02ed | [
"MIT",
"CC-BY-3.0"
] | permissive | katecpp/sheep_sweeper | 95234eabb1dd21015b8dfd0909dc7d97f54c948e | aa2fa8262f09460fc4b5ceb45174fec315fd6460 | refs/heads/master | 2021-01-10T08:51:02.759454 | 2016-10-12T09:31:33 | 2016-10-12T09:31:33 | 47,219,635 | 4 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,981 | cpp | #include <view/CTableView.h>
#include <view/CActiveDelegate.h>
#include <QHeaderView>
namespace SSw
{
CTableView::CTableView(QWidget *parent)
: QTableView(parent),
m_activeDelegate(),
m_inactiveDelegate()
{
setShowGrid(false);
horizontalHeader()->hide();
verticalHeader()->hide();
horizontalHeader()->setMinimumSectionSize(1);
verticalHeader()->setMinimumSectionSize(1);
setSelectionMode(QAbstractItemView::NoSelection);
}
void CTableView::mouseReleaseEvent(QMouseEvent* event)
{
QModelIndex index = indexAt(event->pos());
switch (event->button())
{
case Qt::RightButton:
{
emit rightClicked(index);
break;
}
case Qt::LeftButton:
{
if (event->buttons() & Qt::RightButton)
{
emit bothClicked(index);
}
else
{
QTableView::mouseReleaseEvent(event);
}
break;
}
default:
{
break;
}
}
}
void CTableView::mousePressEvent(QMouseEvent *event)
{
switch (event->button())
{
case Qt::RightButton:
{
break;
}
case Qt::LeftButton:
{
QTableView::mousePressEvent(event);
break;
}
default:
{
break;
}
}
}
void CTableView::adjustSizeToContents()
{
resizeColumnsToContents();
resizeRowsToContents();
int32_t h = rowHeight(1) * model()->rowCount() + 2;
int32_t w = columnWidth(1) * model()->columnCount() + 2;
setFixedSize(w, h);
}
void CTableView::activate()
{
reset();
setEnabled(true);
setItemDelegate(&m_activeDelegate);
}
void CTableView::deactivate()
{
setItemDelegate(&m_inactiveDelegate);
setDisabled(true);
}
} // namespace SSw
| [
"kasia.macias@gmail.com"
] | kasia.macias@gmail.com |
11dc6468d5b76e2391c80af5ebba1d7a0a2d1325 | de04af1d7243363169abdc7ca050b2c1a21fbe19 | /leetcode/include/unique_binary.h | b7a66c7a4da5e413395ed183effb85939319e42e | [] | no_license | deare1300/algs | 9ae5c0a3e94669082efb8cc806851bd033500de3 | a9012b8bb1283d1078cafee8a30bb7383ba1c0a9 | refs/heads/master | 2020-11-26T21:11:01.274702 | 2014-09-22T09:59:38 | 2014-09-22T09:59:38 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 245 | h | #ifndef UNIQUE_BINARY_H
#define UNIQUE_BINARY_H
class Unique_Binary
{
public:
Unique_Binary();
virtual ~Unique_Binary();
int numTrees(int n);
protected:
private:
};
#endif // UNIQUE_BINARY_H
| [
"deare1300@163.com"
] | deare1300@163.com |
1c22a5d09fb01cf7d7f306834f6487ffc8e9e2b9 | d66a5bf33253c8eb0e2b9648b52f1a45449a250c | /과제/1주차/boj_1477.cpp | cffa1062f2ec7af6d13abb99766f015cf5fb020e | [] | no_license | mrgentle1/koss_algorithm | 391205de364f2a73570ae3b1ecd65837a18d3e89 | e4ed69e096d68687682bb1fe44fd381392226b8e | refs/heads/main | 2023-06-27T21:09:06.504749 | 2021-08-07T07:05:53 | 2021-08-07T07:05:53 | 386,637,985 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 637 | cpp | #include <bits/stdc++.h>
using namespace std;
void solution(){
int n, m, l;
int ans;
cin >> n >> m >> l;
vector<int> v(n);
for(auto& i : v)
cin >> i;
v.push_back(0);
v.push_back(l);
sort(v.begin(), v.end());
int low = 0;
int high = l;
while (low <= high){
int cnt = 0;
int mid = (low+high)/2;
for(int i = 1; i < v.size(); i++){
int interval = v[i] - v[i-1];
if(interval > mid)
cnt += (interval-1) / mid;
}
if(cnt <= m){
ans = mid;
high = mid-1;
}
else{
low = mid+1;
}
}
cout << ans << '\n';
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
solution();
return 0;
}
| [
"59019322+mrgentle1@users.noreply.github.com"
] | 59019322+mrgentle1@users.noreply.github.com |
d1aea3b2b6cf24abcfb8437c7365349568ba535b | ac1c9fbc1f1019efb19d0a8f3a088e8889f1e83c | /out/release/gen/third_party/blink/renderer/modules/webtransport/stream_abort_info.h | 8a3a0b4961e0dfd459e5b9ea426ecd9ce7b394a2 | [
"BSD-3-Clause"
] | permissive | xueqiya/chromium_src | 5d20b4d3a2a0251c063a7fb9952195cda6d29e34 | d4aa7a8f0e07cfaa448fcad8c12b29242a615103 | refs/heads/main | 2022-07-30T03:15:14.818330 | 2021-01-16T16:47:22 | 2021-01-16T16:47:22 | 330,115,551 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,592 | h | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file has been auto-generated from the Jinja2 template
// third_party/blink/renderer/bindings/templates/dictionary_impl.h.tmpl
// by the script code_generator_v8.py.
// DO NOT MODIFY!
// clang-format off
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBTRANSPORT_STREAM_ABORT_INFO_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBTRANSPORT_STREAM_ABORT_INFO_H_
#include "third_party/blink/renderer/bindings/core/v8/idl_dictionary_base.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
namespace blink {
class MODULES_EXPORT StreamAbortInfo : public IDLDictionaryBase {
public:
static StreamAbortInfo* Create() { return MakeGarbageCollected<StreamAbortInfo>(); }
StreamAbortInfo();
virtual ~StreamAbortInfo();
bool hasErrorCode() const { return has_error_code_; }
uint16_t errorCode() const {
DCHECK(has_error_code_);
return error_code_;
}
inline void setErrorCode(uint16_t);
v8::Local<v8::Value> ToV8Impl(v8::Local<v8::Object>, v8::Isolate*) const override;
void Trace(blink::Visitor*) override;
private:
bool has_error_code_ = false;
uint16_t error_code_;
friend class V8StreamAbortInfo;
};
void StreamAbortInfo::setErrorCode(uint16_t value) {
error_code_ = value;
has_error_code_ = true;
}
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_WEBTRANSPORT_STREAM_ABORT_INFO_H_
| [
"xueqi@zjmedia.net"
] | xueqi@zjmedia.net |
4481b8d9fa8144d4975033a988364cd12e1c3e78 | 88c2d0c1cec0f6da396ca7c28ba1395eda45e20d | /src/CobremsGeneration.hh | 8568963307c1d93a0349033d0bf90c243605a05d | [] | no_license | JeffersonLab/HDGeant4 | 9b51d8dbbbc8156cc1c07ef1c3e65c47f5725473 | e4c3b03164d4640a4e27ca1e31ed923a7f7e276a | refs/heads/master | 2023-05-06T12:43:29.490835 | 2023-02-27T23:02:48 | 2023-02-27T23:02:48 | 82,930,986 | 3 | 5 | null | 2022-04-12T15:12:35 | 2017-02-23T13:42:10 | C++ | UTF-8 | C++ | false | false | 9,832 | hh | //
// CobremsGeneration class header
//
// author: richard.t.jones at uconn.edu
// version: july 27, 2015
//
// notes:
//
// This class computes differential rates and polarization factors
// for coherent bremsstrahlung by an electron beam passing through
// a crystal radiator. A beamline geometry similar to that in Hall D
// at Jefferson Lab is assumed, consisting of a single radiator
// followed by a collimator located some distance away. Rates are
// computed for both the pre-collimated and post-collimated beams.
//
// This code was ported from cobrems.f, written in Fortran 77.
//
// units:
// Any length is in m; energy,momentum,mass in GeV (c=1); angles in
// radians; time in seconds; current in microAmps.
#ifndef CobremsGeneration_h
#define CobremsGeneration_h 1
#include <string>
#include <vector>
#if BOOST_PYTHON_WRAPPING
#include <boost/python.hpp>
#endif
class CobremsGeneration {
public:
CobremsGeneration(double Emax_GeV, double Epeak_GeV);
CobremsGeneration(const CobremsGeneration &src);
CobremsGeneration &operator=(const CobremsGeneration &src);
~CobremsGeneration();
void setBeamEnergy(double Ebeam_GeV);
void setBeamErms(double Erms_GeV);
void setBeamEmittance(double emit_m_r);
void setCollimatorSpotrms(double spotrms_m);
void setCollimatorDistance(double distance_m);
void setCollimatorDiameter(double diameter_m);
void setTargetThickness(double thickness_m);
void setTargetCrystal(std::string crystal);
void setCoherentEdge(double Epeak_GeV);
void setTargetThetax(double thetax);
void setTargetThetay(double thetay);
void setTargetThetaz(double thetaz);
void setTargetOrientation(double thetax, double thetay, double thetaz);
void setPhotonEnergyMin(double Emin_GeV);
void RotateTarget(double thetax, double thetay, double thetaz);
void setCollimatedFlag(bool flag);
void setPolarizedFlag(bool flag);
double getBeamEnergy() const {
return fBeamEnergy; // (GeV)
}
double getBeamErms() const {
return fBeamErms; // (GeV)
}
double getBeamEmittance() const {
return fBeamEmittance; // (m rad)
}
double getCollimatorSpotrms() const {
return fCollimatorSpotrms; // (m)
}
double getCollimatorDistance() const {
return fCollimatorDistance; // (m)
}
double getCollimatorDiameter() const {
return fCollimatorDiameter; // (m)
}
double getTargetThickness() const {
return fTargetThickness; // (m)
}
std::string getTargetCrystal() const {
return fTargetCrystal.name;
}
int getTargetCrystalNsites() const {
return fTargetCrystal.nsites;
}
double getTargetCrystalAtomicNumber() const {
return fTargetCrystal.Z;
}
double getTargetCrystalAtomicWeight() const {
return fTargetCrystal.A; // (amu)
}
double getTargetCrystalDensity() const {
return fTargetCrystal.density; // (g/cm^3)
}
double getTargetCrystalLatticeConstant() const {
return fTargetCrystal.lattice_constant; // (m)
}
double getTargetCrystalRadiationLength() const {
return fTargetCrystal.radiation_length; // (m)
}
double getTargetCrystalDebyeWallerConst() const {
return fTargetCrystal.Debye_Waller_const; // (1/GeV^2)
}
double getTargetCrystalMosaicSpread() const {
return fTargetCrystal.mosaic_spread; // (rad)
}
double getTargetCrystalBetaFF() const {
return fTargetCrystal.betaFF; // (1/GeV^2)
}
double getTargetThetax() const {
return fTargetThetax; // (rad)
}
double getTargetThetay() const {
return fTargetThetay; // (rad)
}
double getTargetThetaz() const {
return fTargetThetaz; // (rad)
}
double getPhotonEnergyMin() const {
return fPhotonEnergyMin; // (GeV)
}
bool getCollimatedFlag() const {
return fCollimatedFlag;
}
bool getPolarizedFlag() const {
return fPolarizedFlag;
}
double getTargetRadiationLength_PDG();
double getTargetRadiationLength_Schiff();
double getTargetDebyeWallerConstant(double DebyeT_K, double T_K);
void applyBeamCrystalConvolution(int nbins, double *xvalues,
double *yvalues);
#if BOOST_PYTHON_WRAPPING
typedef boost::python::object pyobject;
void pyApplyBeamCrystalConvolution(int nbins, pyobject xarr, pyobject yarr);
#endif
void printBeamlineInfo();
void printTargetCrystalInfo();
double CoherentEnhancement(double x);
double Rate_dNtdx(double x);
double Rate_dNtdx(double x, double distance_m, double diameter_m);
double Rate_dNtdk(double k_GeV);
double Rate_dNcdx(double x);
double Rate_dNcdx(double x, double distance_m, double diameter_m);
double Rate_dNcdxdp(double x, double phi);
double Rate_dNidx(double x);
double Rate_dNBidx(double x);
double Rate_dNidxdt2(double x, double theta2);
double Rate_para(double x, double theta2, double phi);
double Rate_ortho(double x, double theta2, double phi);
double Polarization(double x, double theta2);
double Polarization(double x, double theta2, double phi);
double AbremsPolarization(double x, double theta2, double phi);
double Acceptance(double theta2, double phi,
double xshift_m, double yshift_m);
double Acceptance(double theta2);
double Sigma2MS(double thickness_m);
double Sigma2MS_Kaune(double thickness_m);
double Sigma2MS_PDG(double thickness_m);
double Sigma2MS_Geant(double thickness_m);
double Sigma2MS_Hanson(double thickness_m);
// some math and physical constants
static const double dpi;
static const double me;
static const double alpha;
static const double hbarc;
// statistical record from last sum over reciprocal lattice
std::vector<double> fQ2theta2;
std::vector<double> fQ2weight;
private:
void resetTargetOrientation();
void updateTargetOrientation();
// description of the radiator crystal lattice, here configured for diamond
// but may be customized to describe any regular crystal
struct lattice_vector {
double x;
double y;
double z;
lattice_vector()
: x(0), y(0), z(0) {}
lattice_vector(double ux, double uy, double uz)
: x(ux), y(uy), z(uz) {}
lattice_vector(const lattice_vector &src)
: x(src.x), y(src.y), z(src.z) {}
lattice_vector &operator=(const lattice_vector &src) {
x = src.x;
y = src.y;
z = src.z;
return *this;
}
};
struct crystal_parameters_t {
std::string name;
int nsites;
double Z;
double A; // amu
double density; // g/cm^3
double lattice_constant; // m
double radiation_length; // m
double Debye_Waller_const; // 1/GeV^2
double mosaic_spread; // rms radians
double betaFF; // 1/GeV^2
std::vector<lattice_vector> ucell_site;
lattice_vector primaryHKL;
} fTargetCrystal;
double fTargetThickness;
// orientation of the radiator with respect to the beam axis
double fTargetThetax; // the "small" angle
double fTargetThetay; // the "large" angle
double fTargetThetaz;
double fTargetRmatrix[3][3];
// description of the beam at the radiator
double fBeamEnergy; // GeV
double fBeamErms; // GeV
double fBeamEmittance; // m radians
double fCollimatorSpotrms; // m
double fCollimatorDistance; // m
double fCollimatorDiameter; // m
// flags to select kind of flux to be computed
bool fCollimatedFlag;
bool fPolarizedFlag;
// parameters controlling Monte Carlo generation of photons
double fPhotonEnergyMin; // GeV
};
inline void CobremsGeneration::setBeamEmittance(double emit_m_r) {
fBeamEmittance = emit_m_r;
}
inline void CobremsGeneration::setBeamEnergy(double Ebeam_GeV) {
fBeamEnergy = Ebeam_GeV;
}
inline void CobremsGeneration::setBeamErms(double Erms_GeV) {
fBeamErms = Erms_GeV;
}
inline void CobremsGeneration::setCollimatorSpotrms(double spotrms_m) {
fCollimatorSpotrms = spotrms_m;
}
inline void CobremsGeneration::setCollimatorDistance(double distance_m) {
fCollimatorDistance = distance_m;
}
inline void CobremsGeneration::setCollimatorDiameter(double diameter_m) {
fCollimatorDiameter = diameter_m;
}
inline void CobremsGeneration::setTargetThickness(double thickness_m) {
fTargetThickness = thickness_m;
}
inline void CobremsGeneration::setTargetThetax(double thetax) {
fTargetThetax = thetax;
updateTargetOrientation();
}
inline void CobremsGeneration::setTargetThetay(double thetay) {
fTargetThetay = thetay;
updateTargetOrientation();
}
inline void CobremsGeneration::setTargetThetaz(double thetaz) {
fTargetThetaz = thetaz;
updateTargetOrientation();
}
inline void CobremsGeneration::setTargetOrientation(double thetax,
double thetay,
double thetaz) {
fTargetThetax = thetax;
fTargetThetay = thetay;
fTargetThetaz = thetaz;
updateTargetOrientation();
}
inline void CobremsGeneration::setPhotonEnergyMin(double Emin_GeV) {
fPhotonEnergyMin = Emin_GeV;
}
inline void CobremsGeneration::setCollimatedFlag(bool flag) {
fCollimatedFlag = flag;
}
inline void CobremsGeneration::setPolarizedFlag(bool flag) {
fPolarizedFlag = flag;
}
inline void CobremsGeneration::resetTargetOrientation() {
fTargetRmatrix[0][0] = 1;
fTargetRmatrix[0][1] = 0;
fTargetRmatrix[0][2] = 0;
fTargetRmatrix[1][0] = 0;
fTargetRmatrix[1][1] = 1;
fTargetRmatrix[1][2] = 0;
fTargetRmatrix[2][0] = 0;
fTargetRmatrix[2][1] = 0;
fTargetRmatrix[2][2] = 1;
}
#endif
| [
"rjones30@gmail.com"
] | rjones30@gmail.com |
b673021f8d405efca70298e78a487706876db2fb | b19a7758ecdb1d6db61d5f5698925f868fe06f1e | /test/price/provider/pixie/messages/ack_message_test.cpp | 60e3775ca22551a7a1afe2a102f9cac9885d8cfb | [
"Apache-2.0"
] | permissive | bidfx/bidfx-api-cpp | c531d595e711b891b17c7796fe116cacb8fc3095 | 3d938c9f61057033612a869a9c530392991dca0b | refs/heads/master | 2023-08-31T15:37:02.503457 | 2023-08-24T16:36:57 | 2023-08-24T16:36:57 | 207,352,970 | 5 | 2 | null | 2023-09-14T15:45:55 | 2019-09-09T16:21:43 | C++ | UTF-8 | C++ | false | false | 2,234 | cpp | /** Copyright 2019 BidFX
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "src/price/provider/pixie/messages/ack_message.h"
#include "test/tools/varint_test.h"
#include "gtest/gtest.h"
namespace bidfx_public_api::price::pixie
{
using bidfx_public_api::price::pixie::AckMessage;
using bidfx_public_api::tools::ByteBuffer;
using bidfx_public_api::tools::HexEncoderDecoder;
const std::string kEncodedMessageV1 = "4187ad4be89997de9729b09b97de9729b19b97de9729";
const std::string kEncodedMessageV2 = kEncodedMessageV1 + "9a05";
AckMessage ackMessage = AckMessage(1234567L, 1415120801000L, 1415120801200L, 1415120801201L, 666L);
TEST(AckMessageTest, TestCannotConstructWithNegativeHandlingDuration)
{
ASSERT_THROW(AckMessage(0, 0, 0, 0, -1234), std::invalid_argument);
}
TEST(AckMessageTest, TestEncode)
{
ByteBuffer buffer = ackMessage.Encode(3);
ASSERT_EQ(kEncodedMessageV2, HexEncoderDecoder::StreamAsHex(buffer, 24));
}
TEST(AckMessageTest, TestEncodeV1)
{
ByteBuffer buffer = ackMessage.Encode(1);
ASSERT_EQ(kEncodedMessageV1, HexEncoderDecoder::StreamAsHex(buffer, 22));
}
TEST(AckMessageTest, ToString)
{
ASSERT_EQ(
"Ack(revision=1234567, revisionTime=20141104170641000, priceReceivedTime=20141104170641200, ackTime=20141104170641201, handlingDuration=666us)",
ackMessage.ToString());
}
TEST(AckMessageTest, TestEqualsSelf)
{
EXPECT_EQ(ackMessage, ackMessage);
}
TEST(AckMessageTest, TestEqualsSimilar)
{
AckMessage newMessage = AckMessage(1234567, 1415120801000L, 1415120801200L, 1415120801201L, 666L);
EXPECT_EQ(ackMessage, newMessage);
EXPECT_EQ(std::hash<AckMessage>()(ackMessage), std::hash<AckMessage>()(newMessage));
}
} | [
"Liam.Asman@tradingscreen.com"
] | Liam.Asman@tradingscreen.com |
90db4aeb269f1a1624ad48ae6d515925050110e2 | 8331c69d0ae0fb9ea038b5b8a517d66a2d94aaf4 | /src/menu/ResultsMenu.cpp | 60cbb6d212d21e104d705ef5bbeccd1f9ca4a495 | [] | no_license | amng/TCPDumpParser | 228079a9a73e34f1046fe166d95076e1a2e07a13 | 8413ab11bfdacc4a0a2d3155b1cf0da3a0121871 | refs/heads/master | 2022-09-20T13:05:44.903503 | 2020-05-28T12:51:33 | 2020-05-28T12:51:33 | 267,587,791 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,001 | cpp | #include <ios>
#include <iomanip>
#include <algorithm>
#include "../../include/menu/MenusManager.hpp"
#include "../../include/menu/ResultsMenu.hpp"
ResultsMenu::ResultsMenu()
{
rebuildMenu();
}
static const std::string WHITE_SQUARE = "\u25AD";
void ResultsMenu::rebuildMenu()
{
this->MultiChoiceMenu::rebuildMenu();
TCPDumpEntry::fetchResultsCount();
TCPDumpEntry::fetchResults(getMenuContextInstance()->getCurrentPage());
prompt = TCPDP_MENU_PROMPT::GENERIC_OPTION;
if (getMenuContextInstance()->isNextPageAvailable())
{
addMenuEntry(TCPDP_MENU_OPTION::NEXT_PAGE,
[]{
getMenuContextInstance()->nextPage();
showMenu(MenuType::TypeResultMenu);
});
}
if (getMenuContextInstance()->isPrevPageAvailable())
{
addMenuEntry(TCPDP_MENU_OPTION::PREV_PAGE,
[]{
getMenuContextInstance()->previousPage();
showMenu(MenuType::TypeResultMenu);
});
}
addMenuEntry(TCPDP_MENU_OPTION::UPDATE_RESULTS,
[]{
showMenu(MenuType::TypeResultMenu);
});
addMenuEntry(TCPDP_MENU_OPTION::BACK_MAIN_MENU, []{showMenu(MenuType::TypeMainMenu);});
addMenuEntry(TCPDP_MENU_OPTION::EXIT, []{ exit(0); });
}
void drawCharacterNTimes(int num, std::string character)
{
for (int i = 0 ; i < num; i++)
{
std::cout << character;
}
}
std::string getCroppedString(const std::string & s, size_t maxSize)
{
if (s.size() > maxSize)
{
return s.substr(0, maxSize-1) + "\u2026" + " ";
}
return s;
}
void printEntry(const std::unique_ptr<TCPDumpEntry> & entry )
{
std::ios_base::fmtflags f( std::wcout.flags() );
std::cout << std::setw(1) << "\u25AF";
std::cout << " " << std::left << std::setw(29) << getCroppedString(entry->getTimestamp(), 28).c_str();
std::cout << std::setw(1) << "|";
std::cout << " " << std::left << std::setw(29) << getCroppedString(entry->getSrcIp(), 28).c_str();
std::cout << std::setw(1) << "|";
std::cout << " " << std::left << std::setw(29) << getCroppedString(entry->getDstIp(), 28).c_str();
std::cout << std::setw(1) << "|";
std::cout << " " << std::left << std::setw(49) << getCroppedString(entry->getLocation(), 48).c_str();
std::cout << std::setw(1) << "\u25AF";
std::wcout.flags( f );
}
void printHeader()
{
std::ios_base::fmtflags f( std::wcout.flags() );
std::cout << std::setw(1) << "\u25AF";
std::cout << " " << std::left << std::setw(29) << "Timestamp";
std::cout << std::setw(1) << "|";
std::cout << " " << std::left << std::setw(29) << "Source IP";
std::cout << std::setw(1) << "|";
std::cout << " " << std::left << std::setw(29) << "Destination IP";
std::cout << std::setw(1) << "|";
std::cout << " " << std::left << std::setw(49) << "Location";
std::cout << std::setw(1) << "\u25AF";
std::wcout.flags( f );
}
void ResultsMenu::preDisplay()
{
rebuildMenu();
std::ios_base::fmtflags f( std::wcout.flags() );
//std::wcout << "===== RESULTS ======" << std::endl;
drawCharacterNTimes(145, WHITE_SQUARE);
std::cout << std::endl;
printHeader();
std::cout << std::endl;
drawCharacterNTimes(145, WHITE_SQUARE);
std::cout << std::endl;
int i = 0;
for (auto & entry : getMenuContextInstance()->getResults())
{
printEntry(entry);
std::cout << std::endl;
if (i < getMenuContextInstance()->getResultsCount()-1)
{
drawCharacterNTimes(145, "-");
std::cout << std::endl;
}
i++;
}
drawCharacterNTimes(145, WHITE_SQUARE);
std::wcout.flags( f );
std::cout << std::endl << "Page " << (getMenuContextInstance()->getCurrentPage()+1) << " out of " << getMenuContextInstance()->getPageCount();
if (!getMenuContextInstance()->allTasksFinished())
{
std::cout << std::endl << "Fetching Data..." << std::endl;
}
std::wcout << std:: endl<< std:: endl;
} | [
"arturngomes@gmail.com"
] | arturngomes@gmail.com |
4a450a552beacd7554af282762f66775cb0d2f26 | 87aba51b1f708b47d78b5c4180baf731d752e26d | /Replication/DataFileSystem/PRODUCT_SOURCE_CODE/chromium/cc/CCAppendQuadsData.h | 2a199672d707c1a4971d39673dea27d82d2ff322 | [] | no_license | jstavr/Architecture-Relation-Evaluator | 12c225941e9a4942e83eb6d78f778c3cf5275363 | c63c056ee6737a3d90fac628f2bc50b85c6bd0dc | refs/heads/master | 2020-12-31T05:10:08.774893 | 2016-05-14T16:09:40 | 2016-05-14T16:09:40 | 58,766,508 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 572 | h | // Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CCAppendQuadsData_h
#define CCAppendQuadsData_h
namespace cc {
struct CCAppendQuadsData {
CCAppendQuadsData()
: hadOcclusionFromOutsideTargetSurface(false)
, hadMissingTiles(false)
{
}
// Set by the QuadCuller.
bool hadOcclusionFromOutsideTargetSurface;
// Set by the layer appending quads.
bool hadMissingTiles;
};
}
#endif // CCCCAppendQuadsData_h
| [
"jstavr2@gmail.com"
] | jstavr2@gmail.com |
5faea5996536bdbccd4bdb559f53c2fd33934569 | e6d52e97bc3f0881a71c48674259b0641727c2ce | /src/jsi/SBjsiLogger.hpp | e4505f46f8337511d268faf33e3725bcadc2837b | [] | no_license | bldcm/OpenVXI | 3fe841e0dcfc434aa2624ca5d76a23c430dea6a4 | 86287f27a4509c0c4702102926a412126d5e5bdd | refs/heads/master | 2020-06-10T04:33:56.728050 | 2019-06-24T21:48:40 | 2019-06-24T21:48:40 | 193,583,399 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,141 | hpp | /*****************************************************************************
*****************************************************************************
*
* $Id: SBjsiLogger.hpp,v 1.1.2.2 2003/10/06 19:19:17 mpanacci Exp $
*
* SBjsiLogger - logging class for SBjsi
*
* This provides logging definitions for SBjsi use of VXIlog, along
* with some convenience macros.
*
*****************************************************************************
****************************************************************************/
/****************License************************************************
*
* Copyright 2000-2003. ScanSoft, Inc.
*
* Use of this software is subject to notices and obligations set forth
* in the SpeechWorks Public License - Software Version 1.2 which is
* included with this software.
*
* ScanSoft is a registered trademark of ScanSoft, Inc., and OpenSpeech,
* SpeechWorks and the SpeechWorks logo are registered trademarks or
* trademarks of SpeechWorks International, Inc. in the United States
* and other countries.
*
***********************************************************************/
/* -----1=0-------2=0-------3=0-------4=0-------5=0-------6=0-------7=0-------8
*/
#ifndef _SBJSI_LOGGER_H__
#define _SBJSI_LOGGER_H__
#include "VXIheaderPrefix.h" /* For SYMBOL_EXPORT_CPP_DECL */
#include "VXIlog.h" /* Logging engine */
#include "SBjsiString.hpp" /* For SBinetString */
#include <stdarg.h> /* For variable argument list */
/* Base class for logging */
class SBjsiLogger {
protected:
// Constructor and destructor
SBjsiLogger (const VXIchar *moduleName, VXIlogInterface *log,
VXIunsigned diagTagBase) :
_moduleName(moduleName), _log(log), _diagTagBase(diagTagBase) { }
virtual ~SBjsiLogger( ) { }
// Set the log interface when unavailable at construct time
void SetLog (VXIlogInterface *log, VXIunsigned diagTagBase) {
_log = log; _diagTagBase = diagTagBase; }
public:
// Accessor
VXIlogInterface *GetLog( ) { return _log; }
VXIunsigned GetDiagBase( ) const { return _diagTagBase; }
VXIbool DiagIsEnabled (VXIunsigned tag) const;
// Logging methods
VXIlogResult Error (VXIunsigned errorID, const VXIchar *format, ...) const;
VXIlogResult Error (VXIlogInterface *log, VXIunsigned errorID,
const VXIchar *format, ...) const;
static VXIlogResult Error (VXIlogInterface *log, const VXIchar *moduleName,
VXIunsigned errorID, const VXIchar *format,
...);
VXIlogResult Diag (VXIunsigned tag, const VXIchar *subtag,
const VXIchar *format, ...) const;
VXIlogResult Diag (VXIlogInterface *log, VXIunsigned tag,
const VXIchar *subtag, const VXIchar *format,
...) const;
static VXIlogResult Diag (VXIlogInterface *log, VXIunsigned diagTagBase,
VXIunsigned tag, const VXIchar *subtag,
const VXIchar *format, ...);
VXIlogResult VDiag (VXIunsigned tag, const VXIchar *subtag,
const VXIchar *format, va_list args) const;
private:
SBjsiString _moduleName;
VXIlogInterface *_log;
VXIunsigned _diagTagBase;
};
/* Logging object for conveniently logging function entrance/exit */
class SBjsiLogFunc {
public:
/* Constructor and destructor */
SBjsiLogFunc (VXIlogInterface *log, VXIunsigned tag, const VXIchar *func,
const int *rcvar, const VXIchar *format = NULL, ...) :
_log(log), _tag(tag), _func(func), _rcvar(rcvar) {
if ( _log ) {
va_list ap;
va_start (ap, format);
_log->VDiagnostic (_log, _tag, _func, format, ap);
va_end (ap);
}
}
~SBjsiLogFunc( ) {
if ( _log ) {
if ( _rcvar )
_log->Diagnostic (_log, _tag, _func, L"exiting, returned %d", *_rcvar);
else
_log->Diagnostic (_log, _tag, _func, L"exiting");
}
}
private:
VXIlogInterface *_log;
VXIunsigned _tag;
const VXIchar *_func;
const int *_rcvar;
};
#include "VXIheaderSuffix.h"
#endif /* define _SBJSI_LOGGER_H__ */
| [
"cm.build@kofax.com"
] | cm.build@kofax.com |
306e902d10c88d4f41000785f7c46cbd5ffc7a68 | 62664aed311b6f1e67895893ebbfc36d186f7053 | /Modules/Simul/cpp/pdb_parser/pdb_input_parser.cpp | b67450c5f73a69386003d16cd4f3b26694e69f47 | [] | no_license | mdobrychlop/pyry3d | 0a9c332a530c11f1cdd891d379253d92f8d44cba | 44ea539179e41545fbbf5c38f515e377934dbd67 | refs/heads/master | 2021-05-08T00:36:11.839372 | 2017-10-20T13:40:13 | 2017-10-20T13:40:13 | 107,682,963 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,151 | cpp | #include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <cstring>
#include <sstream>
#include <vector>
#include "pdb_string_parser.hpp"
pdb_line::pdb_line(
std::string record_name,
std::string atom_ids,
std::string atom_name,
std::string residue_name,
std::string chain_identifiers,
std::string residue_numbers,
std::string coordsx,
std::string coordsy,
std::string coordsz,
std::string occupancy,
std::string temperature_factor,
std::string elem_symbol):
record_name(record_name),
atom_ids(std::stoi(atom_ids)),
residue_name(residue_name),
atom_name(atom_name),
chain_identifiers(chain_identifiers),
residue_numbers(std::stoi(residue_numbers)),
coordsx(std::stof(coordsx)),
coordsy(std::stof(coordsy)),
coordsz(std::stof(coordsz)),
occupancy(std::stof(occupancy)),
temperature_factor(std::stof(temperature_factor)),
elem_symbol(elem_symbol) {}
int parse_pdb(const std::string& pdb_string) {
static std::vector<pdb_line> already_read;
static size_t size = 0;
static bool first_read = true;
if (first_read) {
already_read = parse_first_file(pdb_string);
fill_all_array(already_read); // filling global arrs
size = already_read.size();
}
std::vector<point> coords(size);
if (first_read) {
coords = atom_coords;
first_read = false;
fill_res_to_ind_array();
}
if (!size) {
std::cerr<< "ERROR: already_read - vector with pdb_lines is empty\n";
return -1;
}
std::vector< std::vector<int> > vec_clashes_nr;
std::vector< std::vector<int> > vec_all_clashes_dist;
vec_clashes_nr.resize(chain_counter);
vec_all_clashes_dist.resize(chain_counter);
for (int i = 0; i < chain_counter; i++) {
vec_clashes_nr[i] = std::vector<int>(chain_counter, 0);
vec_all_clashes_dist[i] = std::vector<int>(chain_counter, 0);
}
complex created(coords, vec_clashes_nr, vec_all_clashes_dist);
complexes.push_back(created);
return size;
}
void fill_all_array(const std::vector<pdb_line>& already_read) {
std::string prev_chain = "AA"; // name should be shorter string
int prev_residue = -1; // starting from 1
size_t size = already_read.size();
for (unsigned int i = 0; i < size; i++) {
atom_ids[i] = already_read[i].atom_ids;
atom_names[i] = already_read[i].atom_name;
chain_identifiers[i] = already_read[i].chain_identifiers;
atom_coords[i].x = already_read[i].coordsx;
atom_coords[i].y = already_read[i].coordsy;
atom_coords[i].z = already_read[i].coordsz;
atom_occupancies[i] = already_read[i].occupancy;
atom_temp_factors[i] = already_read[i].temperature_factor;
atom_elem_symbols[i] = already_read[i].elem_symbol;
residue_name[i] = already_read[i].residue_name;
int curr_residue = already_read[i].residue_numbers;
residue_numbers[i] = already_read[i].residue_numbers;
std::string curr_chain = chain_identifiers[i];
if ((prev_residue != curr_residue) ||
(params.representation.compare("sphere") == 0) ||
(curr_chain.compare(prev_chain))){
residue_indexes[residue_counter] = i; // keep first indexes of atoms
if ((curr_chain.compare(prev_chain)) ||
(params.representation.compare("sphere") == 0)) {
chain_indexes[chain_counter] = residue_counter; // keep first indexes of residues
prev_chain = already_read[i].chain_identifiers;
chain_counter++;
}
prev_residue = curr_residue;
residue_counter++;
}
}
}
void fill_res_to_ind_array(){
/* this array is bit complicated. If you want to know where is residue_number X
* from component Y, you just have to read residue_to_index[index_of_first_atom(Y) +
* X -1 ]
* Please note that when I'm using it, I don't subtract one, because I prepared
* my residue_numbers earlier
*/
int comp_i = 0, curr_comp = 0;
int comp = NEXT_COMPONENT(comp_i);
for(int i = 0; i < atoms_number; ++i)
residue_to_index[i] = -1;
for(int i = 0; i < atoms_number; ++i){
if ( residue_to_index[residue_numbers[i] - 1 + curr_comp] == -1 )
/* then it is first atom of this residue */
residue_to_index[residue_numbers[i] - 1 + curr_comp] = i;
if (i == comp - 1){
++comp_i;
curr_comp = comp;
comp = NEXT_COMPONENT(comp_i);
}
}
}
| [
"mateusz.dobrychlop@gmail.com"
] | mateusz.dobrychlop@gmail.com |
a0bb325256bc324a0b718e113428bb57770f3642 | 953b1484db9beb391559dc83814fbea8a735d02e | /range.cpp | b124e806f21efe9540d861e9d682b3b113348784 | [] | no_license | Michael-RZhang/Excel | 7b2f6954b121cacbfb1339284c181249497c154f | e1653b5bbfc5fa2188a17250165e80b85e2fe4b5 | refs/heads/master | 2021-01-22T06:23:00.909058 | 2017-02-12T21:50:31 | 2017-02-12T21:50:31 | 81,755,133 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,855 | cpp | /**
* CS 106B/X Stanford 1-2-3
* This file implements the Range type that can be used by your spreadsheet.
*
* Please do not modify this provided file. Your turned-in files should work
* with an unmodified version of all provided code files.
*
* @author Marty Stepp, Julie Zelenski, Jerry Cain
* @version 2016/11/29
* - 16au 106x version (stepp)
*/
#include "range.h"
#include <algorithm>
#include <cmath>
#include <sstream>
#include "error.h"
// all functions allowed in a range expression
const Set<std::string> Range::FUNCTION_NAMES {
"AVERAGE", "MAX", "MEAN", "MEDIAN", "MIN", "PRODUCT", "STDEV", "SUM"
};
Range::Range(int startRow, int startColumn, int endRow, int endColumn) {
startCellName = toCellName(startRow, startColumn);
endCellName = toCellName(endRow, endColumn);
if (!isValidName(startCellName)) {
error("Range::constructor: invalid start cell name: " + startCellName);
}
if (!isValidName(endCellName)) {
error("Range::constructor: invalid end cell name: " + endCellName);
}
if (!isValid()) {
error("Range::constructor: invalid range: " + toString());
}
}
Range::Range(const std::string& startCellName, const std::string& endCellName) :
startCellName(startCellName),
endCellName(endCellName) {
if (!isValidName(startCellName)) {
error("Range::constructor: invalid start cell name: " + startCellName);
}
if (!isValidName(endCellName)) {
error("Range::constructor: invalid end cell name: " + endCellName);
}
}
Set<std::string> Range::getAllCellNames() const {
Set<std::string> cellnames;
int startRow = getStartRow();
int startCol = getStartColumn();
int endRow = getEndRow();
int endCol = getEndColumn();
for (int row = startRow; row <= endRow; row++) {
for (int col = startCol; col <= endCol; col++) {
std::string cellname = toCellName(row, col);
cellnames.add(cellname);
}
}
return cellnames;
}
std::string Range::getEndCellName() const {
return endCellName;
}
int Range::getEndColumn() const {
int row, col;
toRowColumn(endCellName, row, col);
return col;
}
int Range::getEndRow() const {
int row, col;
toRowColumn(endCellName, row, col);
return row;
}
std::string Range::getStartCellName() const {
return startCellName;
}
int Range::getStartColumn() const {
int row, col;
toRowColumn(startCellName, row, col);
return col;
}
int Range::getStartRow() const {
int row, col;
toRowColumn(startCellName, row, col);
return row;
}
bool Range::isKnownFunctionName(const std::string& function) {
return FUNCTION_NAMES.contains(toUpperCase(function));
}
bool Range::isValid() const {
int startRow, startCol, endRow, endCol;
if (!toRowColumn(startCellName, startRow, startCol)
|| !toRowColumn(endCellName, endRow, endCol)) {
return false;
}
return 0 <= startRow && startRow <= endRow
&& 0 <= startCol && startCol <= endCol;
}
bool Range::isValidName(const std::string& cellname) {
int row, col;
return toRowColumn(cellname, row, col);
}
std::string Range::toCellName(int row, int column) {
if (row < 0 || column < 0) {
error("Range::toCellName: row/column cannot be negative");
}
// convert column into a roughly base-26 Excel column name,
// e.g. 0 -> "A", 1 -> "B", 26 -> "AA", ...
std::string colStr;
int col = column + 1; // 1-based
while (col-- > 0) {
colStr = charToString((char) ('A' + (col % 26))) + colStr;
col /= 26;
}
std::string rowStr = integerToString(row + 1);
return colStr + rowStr;
}
bool Range::toRowColumn(const std::string& cellname, int& row, int& column) {
int rowTemp = toRow(cellname);
int colTemp = toColumn(cellname);
if (rowTemp >= 0 && colTemp >= 0) {
// fill in reference parameters
row = rowTemp;
column = colTemp;
return true;
} else {
return false;
}
}
int Range::toColumn(const std::string& cellname) {
// chomp out the row at end and keep only the column
std::string colStr = trim(toUpperCase(cellname));
while (!colStr.empty() && !isalpha(colStr[colStr.length() - 1])) {
colStr.erase(colStr.length() - 1, 1);
}
if (colStr.empty() || !isalpha(colStr[0])) {
return -1;
}
// convert alphabetic column letters into a roughly base-26 column index
int colNum = 0;
for (int i = 0; i < (int) colStr.length(); i++) {
char ch = colStr[i];
if (!isalpha(ch)) {
return -1;
} else {
colNum = colNum * 26 + (ch - 'A' + 1);
}
}
colNum--; // convert 1-based to 0-based
return colNum;
}
int Range::toRow(const std::string& cellname) {
// chomp out the column at start and keep only the row
std::string rowStr = trim(toUpperCase(cellname));
while (!rowStr.empty() && !isdigit(rowStr[0])) {
rowStr.erase(0, 1);
}
if (stringIsInteger(rowStr)) {
// convert 1-based to 0-based
return stringToInteger(rowStr) - 1;
} else {
return -1;
}
}
std::string Range::toString() const {
std::ostringstream out;
out << *this;
return out.str();
}
std::ostream& operator <<(std::ostream& out, const Range& range) {
return out << range.getStartCellName() << ":" << range.getEndCellName();
}
double min(const Vector<double>& values) {
double min = values[0];
for (int i = 1; i < values.size(); i++) {
if (values[i] < min) {
min = values[i];
}
}
return min;
}
double max(const Vector<double>& values) {
double max = values[0];
for (int i = 1; i < values.size(); i++) {
if (values[i] > max) {
max = values[i];
}
}
return max;
}
double sum(const Vector<double>& values) {
double sum = 0;
for (double n : values) {
sum += n;
}
return sum;
}
double product(const Vector<double>& values) {
double prod = 1;
for (double n : values) {
prod *= n;
}
return prod;
}
/* This function should be accessible by both name "mean" and "average" */
double average(const Vector<double>& values) {
return sum(values) / values.size();
}
double median(const Vector<double>& values) {
Vector<double> clone = values;
sort(clone.begin(), clone.end());
int sz = values.size();
if (sz % 2 == 0) {
return (clone[sz / 2] + clone[sz / 2 - 1]) / 2;
} else {
return clone[sz / 2];
}
}
double stdev(const Vector<double>& values) {
double sum = 0;
double sumsquares = 0;
for (double n : values) {
sum += n;
sumsquares += n * n;
}
int sz = values.size();
return sqrt((sz * sumsquares - sum * sum) / (sz * sz));
}
| [
"noreply@github.com"
] | Michael-RZhang.noreply@github.com |
f9bd2689f9057d7e2262980da120172293295ef5 | 3c8cf4de6c08e21b2c10094ef20488e93d7a34be | /TktkGameProcessDirectX11AppendLib/TktkAppendDirectX11ComponentLib/inc/TktkDirectX11Wrapper/Input/Mouse/Mouse.h | fdc8132fa81866f61d98207bc56e254dbfc5ca32 | [] | no_license | tktk2104/TktkLib | 07762028c8a3a7378d7e82be8f1ed8c6a0cdc97c | 2af549bfb8448ace9f9fee6c2225ea7d2e6329b8 | refs/heads/master | 2022-11-30T12:26:33.290941 | 2020-08-11T17:50:14 | 2020-08-11T17:50:14 | 213,307,835 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 522 | h | #ifndef MOUSE_H_
#define MOUSE_H_
#include <TktkMath/Vector2.h>
#include "MouseButtonType.h"
namespace tktk
{
// 「MouseManager」の実装の一部を隠すためのクラス
class Mouse
{
public:
// 指定のボタンが押されているかを判定
static bool isPush(MouseButtonType button);
// 指定のボタンが押され始めたかを判定
static bool isTrigger(MouseButtonType button);
// マウスカーソルの座標を取得する
static Vector2 mousePos();
};
}
#endif // !MOUSE_H_ | [
"taka.lalpedhuez@2104.gmail.com"
] | taka.lalpedhuez@2104.gmail.com |
ea3c55553ab7de5bc5e03f2194970c223d2d170d | d0c44dd3da2ef8c0ff835982a437946cbf4d2940 | /cmake-build-debug/programs_tiling/function14721/function14721_schedule_26/function14721_schedule_26.cpp | da3afa5ed284ff7d94f2d0a3dc89fcd37fc828df | [] | no_license | IsraMekki/tiramisu_code_generator | 8b3f1d63cff62ba9f5242c019058d5a3119184a3 | 5a259d8e244af452e5301126683fa4320c2047a3 | refs/heads/master | 2020-04-29T17:27:57.987172 | 2019-04-23T16:50:32 | 2019-04-23T16:50:32 | 176,297,755 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,550 | cpp | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14721_schedule_26");
constant c0("c0", 128), c1("c1", 64), c2("c2", 64), c3("c3", 128);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i3("i3", 0, c3), i01("i01"), i02("i02"), i03("i03"), i04("i04"), i05("i05"), i06("i06");
input input00("input00", {i0, i1, i3}, p_int32);
input input01("input01", {i0, i1}, p_int32);
input input02("input02", {i1, i2}, p_int32);
input input03("input03", {i2}, p_int32);
input input04("input04", {i0}, p_int32);
computation comp0("comp0", {i0, i1, i2, i3}, input00(i0, i1, i3) + input01(i0, i1) * input02(i1, i2) * input03(i2) + input04(i0));
comp0.tile(i0, i1, i2, 64, 32, 32, i01, i02, i03, i04, i05, i06);
comp0.parallelize(i01);
buffer buf00("buf00", {128, 64, 128}, p_int32, a_input);
buffer buf01("buf01", {128, 64}, p_int32, a_input);
buffer buf02("buf02", {64, 64}, p_int32, a_input);
buffer buf03("buf03", {64}, p_int32, a_input);
buffer buf04("buf04", {128}, p_int32, a_input);
buffer buf0("buf0", {128, 64, 64, 128}, p_int32, a_output);
input00.store_in(&buf00);
input01.store_in(&buf01);
input02.store_in(&buf02);
input03.store_in(&buf03);
input04.store_in(&buf04);
comp0.store_in(&buf0);
tiramisu::codegen({&buf00, &buf01, &buf02, &buf03, &buf04, &buf0}, "../data/programs/function14721/function14721_schedule_26/function14721_schedule_26.o");
return 0;
} | [
"ei_mekki@esi.dz"
] | ei_mekki@esi.dz |
a8a09817f27fd610ff10cf1f5a6d711ce7f335b8 | c653562db86103993add80d2206ffb7c525e89b8 | /1005.cpp | 597739ff643c307be42f032ded0115512301a50e | [] | no_license | lsqypro/PTA-Basic | 9d1157a2a6977472ade7602de8b0def3cca6acbf | 36fe52030fdf89661b6294a46e84fddae2f214a4 | refs/heads/master | 2022-11-28T01:04:54.186472 | 2020-08-13T00:11:35 | 2020-08-13T00:11:35 | 285,648,276 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,322 | cpp | //
// Created by lsqy on 2020/8/6.
//
/* 1005 继续(3n+1)猜想 (25分)
* 耗时:24:25.10
* 计算每一次输入数值所覆盖的数,n = (3 * n + 1) 可能导致n变大
*/
#include <iostream>
#include <cstdlib>
using namespace std;
int n;
int input[100] = {0};
int key[101] = {0}; // n = (3 * n + 1) 可能导致n变大
void calc(int value) {
bool first = true;
while (value != 1) {
// 记录被value“覆盖”的数
if (!first && value < 101 ) {
key[value] = 1;
}
first = false;
if (value % 2 == 0) {
value /= 2;
}
else {
value = (3 * value + 1) / 2;
}
}
}
int compare(const void *a, const void *b) {
return *(int *)a < *(int *)b;
}
int main(void) {
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
// 从大到小排序
qsort(input, n, sizeof(int), compare);
// 计算每一个输入的数所覆盖的值
for (int i = 0; i < n; ++i) {
calc(input[i]);
}
// 从大到小输出
bool first = true;
for (int j = 0; j < n; ++j) {
if (key[input[j]] == 0) {
if (!first) {
cout << " ";
}
first = false;
cout << input[j];
}
}
return 0;
} | [
"lsqypro@qq.com"
] | lsqypro@qq.com |
e2110add1541b8db49b9df661784a86a1011d604 | 4a294ae9ab5c62798b74d1a2ccc75624665296b3 | /cpp/Debug/Generated Files/winrt/impl/Windows.Security.Authentication.Web.Provider.0.h | a67438b0a47e8f7a15355e62112c9cf24f20c20f | [] | no_license | dtakeda/w32-winrt-test | d204a8fb28d1a4ceadf8ab8448b6cae2350a1579 | e70bf485ddc44d9389ed025a80fe65b4ec736bb6 | refs/heads/main | 2023-01-02T15:18:33.151156 | 2020-10-20T01:58:51 | 2020-10-20T01:58:51 | 305,547,430 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 58,402 | h | // WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201008.2
#ifndef WINRT_Windows_Security_Authentication_Web_Provider_0_H
#define WINRT_Windows_Security_Authentication_Web_Provider_0_H
WINRT_EXPORT namespace winrt::Windows::Foundation
{
struct IAsyncAction;
template <typename TResult> struct __declspec(empty_bases) IAsyncOperation;
struct Uri;
}
WINRT_EXPORT namespace winrt::Windows::Foundation::Collections
{
template <typename K, typename V> struct __declspec(empty_bases) IMapView;
template <typename T> struct __declspec(empty_bases) IVectorView;
template <typename T> struct __declspec(empty_bases) IVector;
}
WINRT_EXPORT namespace winrt::Windows::Security::Authentication::Web
{
enum class TokenBindingKeyType : int32_t;
}
WINRT_EXPORT namespace winrt::Windows::Security::Authentication::Web::Core
{
struct WebProviderError;
struct WebTokenRequest;
struct WebTokenResponse;
}
WINRT_EXPORT namespace winrt::Windows::Security::Credentials
{
struct WebAccount;
}
WINRT_EXPORT namespace winrt::Windows::Security::Cryptography::Core
{
struct CryptographicKey;
}
WINRT_EXPORT namespace winrt::Windows::Storage::Streams
{
struct IBuffer;
struct IRandomAccessStream;
}
WINRT_EXPORT namespace winrt::Windows::System
{
struct User;
}
WINRT_EXPORT namespace winrt::Windows::Web::Http
{
struct HttpCookie;
}
WINRT_EXPORT namespace winrt::Windows::Security::Authentication::Web::Provider
{
enum class WebAccountClientViewType : int32_t
{
IdOnly = 0,
IdAndProperties = 1,
};
enum class WebAccountProviderOperationKind : int32_t
{
RequestToken = 0,
GetTokenSilently = 1,
AddAccount = 2,
ManageAccount = 3,
DeleteAccount = 4,
RetrieveCookies = 5,
SignOutAccount = 6,
};
enum class WebAccountScope : int32_t
{
PerUser = 0,
PerApplication = 1,
};
enum class WebAccountSelectionOptions : uint32_t
{
Default = 0,
New = 0x1,
};
struct IWebAccountClientView;
struct IWebAccountClientViewFactory;
struct IWebAccountManagerStatics;
struct IWebAccountManagerStatics2;
struct IWebAccountManagerStatics3;
struct IWebAccountManagerStatics4;
struct IWebAccountMapManagerStatics;
struct IWebAccountProviderAddAccountOperation;
struct IWebAccountProviderBaseReportOperation;
struct IWebAccountProviderDeleteAccountOperation;
struct IWebAccountProviderManageAccountOperation;
struct IWebAccountProviderOperation;
struct IWebAccountProviderRetrieveCookiesOperation;
struct IWebAccountProviderSignOutAccountOperation;
struct IWebAccountProviderSilentReportOperation;
struct IWebAccountProviderTokenObjects;
struct IWebAccountProviderTokenObjects2;
struct IWebAccountProviderTokenOperation;
struct IWebAccountProviderUIReportOperation;
struct IWebAccountScopeManagerStatics;
struct IWebProviderTokenRequest;
struct IWebProviderTokenRequest2;
struct IWebProviderTokenRequest3;
struct IWebProviderTokenResponse;
struct IWebProviderTokenResponseFactory;
struct WebAccountClientView;
struct WebAccountManager;
struct WebAccountProviderAddAccountOperation;
struct WebAccountProviderDeleteAccountOperation;
struct WebAccountProviderGetTokenSilentOperation;
struct WebAccountProviderManageAccountOperation;
struct WebAccountProviderRequestTokenOperation;
struct WebAccountProviderRetrieveCookiesOperation;
struct WebAccountProviderSignOutAccountOperation;
struct WebAccountProviderTriggerDetails;
struct WebProviderTokenRequest;
struct WebProviderTokenResponse;
}
namespace winrt::impl
{
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountClientView>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountClientViewFactory>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics2>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics3>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics4>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountMapManagerStatics>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderAddAccountOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderBaseReportOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderDeleteAccountOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderManageAccountOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderRetrieveCookiesOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSignOutAccountOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSilentReportOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects2>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountProviderUIReportOperation>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebAccountScopeManagerStatics>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest2>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest3>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponse>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponseFactory>{ using type = interface_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountClientView>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountManager>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderAddAccountOperation>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderDeleteAccountOperation>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderGetTokenSilentOperation>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderManageAccountOperation>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderRequestTokenOperation>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderRetrieveCookiesOperation>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderSignOutAccountOperation>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderTriggerDetails>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebProviderTokenRequest>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse>{ using type = class_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountClientViewType>{ using type = enum_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountProviderOperationKind>{ using type = enum_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountScope>{ using type = enum_category; };
template <> struct category<Windows::Security::Authentication::Web::Provider::WebAccountSelectionOptions>{ using type = enum_category; };
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountClientView> = L"Windows.Security.Authentication.Web.Provider.WebAccountClientView";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountManager> = L"Windows.Security.Authentication.Web.Provider.WebAccountManager";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderAddAccountOperation> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderAddAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderDeleteAccountOperation> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderDeleteAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderGetTokenSilentOperation> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderGetTokenSilentOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderManageAccountOperation> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderManageAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderRequestTokenOperation> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderRequestTokenOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderRetrieveCookiesOperation> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderRetrieveCookiesOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderSignOutAccountOperation> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderSignOutAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderTriggerDetails> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderTriggerDetails";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebProviderTokenRequest> = L"Windows.Security.Authentication.Web.Provider.WebProviderTokenRequest";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse> = L"Windows.Security.Authentication.Web.Provider.WebProviderTokenResponse";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountClientViewType> = L"Windows.Security.Authentication.Web.Provider.WebAccountClientViewType";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountProviderOperationKind> = L"Windows.Security.Authentication.Web.Provider.WebAccountProviderOperationKind";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountScope> = L"Windows.Security.Authentication.Web.Provider.WebAccountScope";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::WebAccountSelectionOptions> = L"Windows.Security.Authentication.Web.Provider.WebAccountSelectionOptions";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountClientView> = L"Windows.Security.Authentication.Web.Provider.IWebAccountClientView";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountClientViewFactory> = L"Windows.Security.Authentication.Web.Provider.IWebAccountClientViewFactory";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics> = L"Windows.Security.Authentication.Web.Provider.IWebAccountManagerStatics";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics2> = L"Windows.Security.Authentication.Web.Provider.IWebAccountManagerStatics2";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics3> = L"Windows.Security.Authentication.Web.Provider.IWebAccountManagerStatics3";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics4> = L"Windows.Security.Authentication.Web.Provider.IWebAccountManagerStatics4";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountMapManagerStatics> = L"Windows.Security.Authentication.Web.Provider.IWebAccountMapManagerStatics";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderAddAccountOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderAddAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderBaseReportOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderBaseReportOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderDeleteAccountOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderDeleteAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderManageAccountOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderManageAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderRetrieveCookiesOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderRetrieveCookiesOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSignOutAccountOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderSignOutAccountOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSilentReportOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderSilentReportOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderTokenObjects";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects2> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderTokenObjects2";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderTokenOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderUIReportOperation> = L"Windows.Security.Authentication.Web.Provider.IWebAccountProviderUIReportOperation";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebAccountScopeManagerStatics> = L"Windows.Security.Authentication.Web.Provider.IWebAccountScopeManagerStatics";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest> = L"Windows.Security.Authentication.Web.Provider.IWebProviderTokenRequest";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest2> = L"Windows.Security.Authentication.Web.Provider.IWebProviderTokenRequest2";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest3> = L"Windows.Security.Authentication.Web.Provider.IWebProviderTokenRequest3";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponse> = L"Windows.Security.Authentication.Web.Provider.IWebProviderTokenResponse";
template <> inline constexpr auto& name_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponseFactory> = L"Windows.Security.Authentication.Web.Provider.IWebProviderTokenResponseFactory";
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountClientView>{ 0xE7BD66BA,0x0BC7,0x4C66,{ 0xBF,0xD4,0x65,0xD3,0x08,0x2C,0xBC,0xA8 } }; // E7BD66BA-0BC7-4C66-BFD4-65D3082CBCA8
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountClientViewFactory>{ 0x616D16A4,0xDE22,0x4855,{ 0xA3,0x26,0x06,0xCE,0xBF,0x2A,0x3F,0x23 } }; // 616D16A4-DE22-4855-A326-06CEBF2A3F23
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics>{ 0xB2E8E1A6,0xD49A,0x4032,{ 0x84,0xBF,0x1A,0x28,0x47,0x74,0x7B,0xF1 } }; // B2E8E1A6-D49A-4032-84BF-1A2847747BF1
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics2>{ 0x68A7A829,0x2D5F,0x4653,{ 0x8B,0xB0,0xBD,0x2F,0xA6,0xBD,0x2D,0x87 } }; // 68A7A829-2D5F-4653-8BB0-BD2FA6BD2D87
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics3>{ 0xDD4523A6,0x8A4F,0x4AA2,{ 0xB1,0x5E,0x03,0xF5,0x50,0xAF,0x13,0x59 } }; // DD4523A6-8A4F-4AA2-B15E-03F550AF1359
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics4>{ 0x59EBC2D2,0xF7DB,0x412F,{ 0xBC,0x3F,0xF2,0xFE,0xA0,0x44,0x30,0xB4 } }; // 59EBC2D2-F7DB-412F-BC3F-F2FEA04430B4
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountMapManagerStatics>{ 0xE8FA446F,0x3A1B,0x48A4,{ 0x8E,0x90,0x1E,0x59,0xCA,0x6F,0x54,0xDB } }; // E8FA446F-3A1B-48A4-8E90-1E59CA6F54DB
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderAddAccountOperation>{ 0x73EBDCCF,0x4378,0x4C79,{ 0x93,0x35,0xA5,0xD7,0xAB,0x81,0x59,0x4E } }; // 73EBDCCF-4378-4C79-9335-A5D7AB81594E
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderBaseReportOperation>{ 0xBBA4ACBB,0x993B,0x4D57,{ 0xBB,0xE4,0x14,0x21,0xE3,0x66,0x8B,0x4C } }; // BBA4ACBB-993B-4D57-BBE4-1421E3668B4C
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderDeleteAccountOperation>{ 0x0ABB48B8,0x9E01,0x49C9,{ 0xA3,0x55,0x7D,0x48,0xCA,0xF7,0xD6,0xCA } }; // 0ABB48B8-9E01-49C9-A355-7D48CAF7D6CA
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderManageAccountOperation>{ 0xED20DC5C,0xD21B,0x463E,{ 0xA9,0xB7,0xC1,0xFD,0x0E,0xDA,0xE9,0x78 } }; // ED20DC5C-D21B-463E-A9B7-C1FD0EDAE978
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation>{ 0x6D5D2426,0x10B1,0x419A,{ 0xA4,0x4E,0xF9,0xC5,0x16,0x15,0x74,0xE6 } }; // 6D5D2426-10B1-419A-A44E-F9C5161574E6
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderRetrieveCookiesOperation>{ 0x5A040441,0x0FA3,0x4AB1,{ 0xA0,0x1C,0x20,0xB1,0x10,0x35,0x85,0x94 } }; // 5A040441-0FA3-4AB1-A01C-20B110358594
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSignOutAccountOperation>{ 0xB890E21D,0x0C55,0x47BC,{ 0x8C,0x72,0x04,0xA6,0xFC,0x7C,0xAC,0x07 } }; // B890E21D-0C55-47BC-8C72-04A6FC7CAC07
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSilentReportOperation>{ 0xE0B545F8,0x3B0F,0x44DA,{ 0x92,0x4C,0x7B,0x18,0xBA,0xAA,0x62,0xA9 } }; // E0B545F8-3B0F-44DA-924C-7B18BAAA62A9
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects>{ 0x408F284B,0x1328,0x42DB,{ 0x89,0xA4,0x0B,0xCE,0x7A,0x71,0x7D,0x8E } }; // 408F284B-1328-42DB-89A4-0BCE7A717D8E
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects2>{ 0x1020B893,0x5CA5,0x4FFF,{ 0x95,0xFB,0xB8,0x20,0x27,0x3F,0xC3,0x95 } }; // 1020B893-5CA5-4FFF-95FB-B820273FC395
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation>{ 0x95C613BE,0x2034,0x4C38,{ 0x94,0x34,0xD2,0x6C,0x14,0xB2,0xB4,0xB2 } }; // 95C613BE-2034-4C38-9434-D26C14B2B4B2
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountProviderUIReportOperation>{ 0x28FF92D3,0x8F80,0x42FB,{ 0x94,0x4F,0xB2,0x10,0x7B,0xBD,0x42,0xE6 } }; // 28FF92D3-8F80-42FB-944F-B2107BBD42E6
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebAccountScopeManagerStatics>{ 0x5C6CE37C,0x12B2,0x423A,{ 0xBF,0x3D,0x85,0xB8,0xD7,0xE5,0x36,0x56 } }; // 5C6CE37C-12B2-423A-BF3D-85B8D7E53656
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest>{ 0x1E18778B,0x8805,0x454B,{ 0x9F,0x11,0x46,0x8D,0x2A,0xF1,0x09,0x5A } }; // 1E18778B-8805-454B-9F11-468D2AF1095A
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest2>{ 0xB5D72E4C,0x10B1,0x4AA6,{ 0x88,0xB1,0x0B,0x6C,0x9E,0x0C,0x1E,0x46 } }; // B5D72E4C-10B1-4AA6-88B1-0B6C9E0C1E46
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest3>{ 0x1B2716AA,0x4289,0x446E,{ 0x92,0x56,0xDA,0xFB,0x6F,0x66,0xA5,0x1E } }; // 1B2716AA-4289-446E-9256-DAFB6F66A51E
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponse>{ 0xEF213793,0xEF55,0x4186,{ 0xB7,0xCE,0x8C,0xB2,0xE7,0xF9,0x84,0x9E } }; // EF213793-EF55-4186-B7CE-8CB2E7F9849E
template <> inline constexpr guid guid_v<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponseFactory>{ 0xFA49D99A,0x25BA,0x4077,{ 0x9C,0xFA,0x9D,0xB4,0xDE,0xA7,0xB7,0x1A } }; // FA49D99A-25BA-4077-9CFA-9DB4DEA7B71A
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountClientView>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountClientView; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderAddAccountOperation>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderAddAccountOperation; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderDeleteAccountOperation>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderDeleteAccountOperation; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderGetTokenSilentOperation>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderManageAccountOperation>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderManageAccountOperation; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderRequestTokenOperation>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderRetrieveCookiesOperation>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderRetrieveCookiesOperation; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderSignOutAccountOperation>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderSignOutAccountOperation; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebAccountProviderTriggerDetails>{ using type = Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebProviderTokenRequest>{ using type = Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest; };
template <> struct default_interface<Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse>{ using type = Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponse; };
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountClientView>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_ApplicationCallbackUri(void**) noexcept = 0;
virtual int32_t __stdcall get_Type(int32_t*) noexcept = 0;
virtual int32_t __stdcall get_AccountPairwiseId(void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountClientViewFactory>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall Create(int32_t, void*, void**) noexcept = 0;
virtual int32_t __stdcall CreateWithPairwiseId(int32_t, void*, void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall UpdateWebAccountPropertiesAsync(void*, void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall AddWebAccountAsync(void*, void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall DeleteWebAccountAsync(void*, void**) noexcept = 0;
virtual int32_t __stdcall FindAllProviderWebAccountsAsync(void**) noexcept = 0;
virtual int32_t __stdcall PushCookiesAsync(void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall SetViewAsync(void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall ClearViewAsync(void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall GetViewsAsync(void*, void**) noexcept = 0;
virtual int32_t __stdcall SetWebAccountPictureAsync(void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall ClearWebAccountPictureAsync(void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics2>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall PullCookiesAsync(void*, void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics3>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall FindAllProviderWebAccountsForUserAsync(void*, void**) noexcept = 0;
virtual int32_t __stdcall AddWebAccountForUserAsync(void*, void*, void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall AddWebAccountWithScopeForUserAsync(void*, void*, void*, void*, int32_t, void**) noexcept = 0;
virtual int32_t __stdcall AddWebAccountWithScopeAndMapForUserAsync(void*, void*, void*, void*, int32_t, void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics4>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall InvalidateAppCacheForAllAccountsAsync(void**) noexcept = 0;
virtual int32_t __stdcall InvalidateAppCacheForAccountAsync(void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountMapManagerStatics>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall AddWebAccountWithScopeAndMapAsync(void*, void*, void*, int32_t, void*, void**) noexcept = 0;
virtual int32_t __stdcall SetPerAppToPerUserAccountAsync(void*, void*, void**) noexcept = 0;
virtual int32_t __stdcall GetPerUserFromPerAppAccountAsync(void*, void**) noexcept = 0;
virtual int32_t __stdcall ClearPerUserFromPerAppAccountAsync(void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderAddAccountOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall ReportCompleted() noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderBaseReportOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall ReportCompleted() noexcept = 0;
virtual int32_t __stdcall ReportError(void*) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderDeleteAccountOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_WebAccount(void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderManageAccountOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_WebAccount(void**) noexcept = 0;
virtual int32_t __stdcall ReportCompleted() noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_Kind(int32_t*) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderRetrieveCookiesOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_Context(void**) noexcept = 0;
virtual int32_t __stdcall get_Cookies(void**) noexcept = 0;
virtual int32_t __stdcall put_Uri(void*) noexcept = 0;
virtual int32_t __stdcall get_Uri(void**) noexcept = 0;
virtual int32_t __stdcall get_ApplicationCallbackUri(void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSignOutAccountOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_WebAccount(void**) noexcept = 0;
virtual int32_t __stdcall get_ApplicationCallbackUri(void**) noexcept = 0;
virtual int32_t __stdcall get_ClientId(void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSilentReportOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall ReportUserInteractionRequired() noexcept = 0;
virtual int32_t __stdcall ReportUserInteractionRequiredWithError(void*) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_Operation(void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects2>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_User(void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_ProviderRequest(void**) noexcept = 0;
virtual int32_t __stdcall get_ProviderResponses(void**) noexcept = 0;
virtual int32_t __stdcall put_CacheExpirationTime(int64_t) noexcept = 0;
virtual int32_t __stdcall get_CacheExpirationTime(int64_t*) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountProviderUIReportOperation>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall ReportUserCanceled() noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebAccountScopeManagerStatics>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall AddWebAccountWithScopeAsync(void*, void*, void*, int32_t, void**) noexcept = 0;
virtual int32_t __stdcall SetScopeAsync(void*, int32_t, void**) noexcept = 0;
virtual int32_t __stdcall GetScope(void*, int32_t*) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_ClientRequest(void**) noexcept = 0;
virtual int32_t __stdcall get_WebAccounts(void**) noexcept = 0;
virtual int32_t __stdcall get_WebAccountSelectionOptions(uint32_t*) noexcept = 0;
virtual int32_t __stdcall get_ApplicationCallbackUri(void**) noexcept = 0;
virtual int32_t __stdcall GetApplicationTokenBindingKeyAsync(int32_t, void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest2>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall GetApplicationTokenBindingKeyIdAsync(int32_t, void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest3>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_ApplicationPackageFamilyName(void**) noexcept = 0;
virtual int32_t __stdcall get_ApplicationProcessName(void**) noexcept = 0;
virtual int32_t __stdcall CheckApplicationForCapabilityAsync(void*, void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponse>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall get_ClientResponse(void**) noexcept = 0;
};
};
template <> struct abi<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponseFactory>
{
struct __declspec(novtable) type : inspectable_abi
{
virtual int32_t __stdcall Create(void*, void**) noexcept = 0;
};
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountClientView
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Uri) ApplicationCallbackUri() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType) Type() const;
[[nodiscard]] WINRT_IMPL_AUTO(hstring) AccountPairwiseId() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountClientView>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountClientView<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountClientViewFactory
{
WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebAccountClientView) Create(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType const& viewType, Windows::Foundation::Uri const& applicationCallbackUri) const;
WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebAccountClientView) CreateWithPairwiseId(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType const& viewType, Windows::Foundation::Uri const& applicationCallbackUri, param::hstring const& accountPairwiseId) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountClientViewFactory>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountClientViewFactory<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics
{
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) UpdateWebAccountPropertiesAsync(Windows::Security::Credentials::WebAccount const& webAccount, param::hstring const& webAccountUserName, param::async_map_view<hstring, hstring> const& additionalProperties) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Credentials::WebAccount>) AddWebAccountAsync(param::hstring const& webAccountId, param::hstring const& webAccountUserName, param::async_map_view<hstring, hstring> const& props) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) DeleteWebAccountAsync(Windows::Security::Credentials::WebAccount const& webAccount) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<Windows::Security::Credentials::WebAccount>>) FindAllProviderWebAccountsAsync() const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) PushCookiesAsync(Windows::Foundation::Uri const& uri, param::async_vector_view<Windows::Web::Http::HttpCookie> const& cookies) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) SetViewAsync(Windows::Security::Credentials::WebAccount const& webAccount, Windows::Security::Authentication::Web::Provider::WebAccountClientView const& view) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) ClearViewAsync(Windows::Security::Credentials::WebAccount const& webAccount, Windows::Foundation::Uri const& applicationCallbackUri) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<Windows::Security::Authentication::Web::Provider::WebAccountClientView>>) GetViewsAsync(Windows::Security::Credentials::WebAccount const& webAccount) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) SetWebAccountPictureAsync(Windows::Security::Credentials::WebAccount const& webAccount, Windows::Storage::Streams::IRandomAccessStream const& webAccountPicture) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) ClearWebAccountPictureAsync(Windows::Security::Credentials::WebAccount const& webAccount) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics2
{
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) PullCookiesAsync(param::hstring const& uriString, param::hstring const& callerPFN) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics2>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics2<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics3
{
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<Windows::Security::Credentials::WebAccount>>) FindAllProviderWebAccountsForUserAsync(Windows::System::User const& user) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Credentials::WebAccount>) AddWebAccountForUserAsync(Windows::System::User const& user, param::hstring const& webAccountId, param::hstring const& webAccountUserName, param::async_map_view<hstring, hstring> const& props) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Credentials::WebAccount>) AddWebAccountForUserAsync(Windows::System::User const& user, param::hstring const& webAccountId, param::hstring const& webAccountUserName, param::async_map_view<hstring, hstring> const& props, Windows::Security::Authentication::Web::Provider::WebAccountScope const& scope) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Credentials::WebAccount>) AddWebAccountForUserAsync(Windows::System::User const& user, param::hstring const& webAccountId, param::hstring const& webAccountUserName, param::async_map_view<hstring, hstring> const& props, Windows::Security::Authentication::Web::Provider::WebAccountScope const& scope, param::hstring const& perUserWebAccountId) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics3>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics3<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics4
{
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) InvalidateAppCacheForAllAccountsAsync() const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) InvalidateAppCacheForAccountAsync(Windows::Security::Credentials::WebAccount const& webAccount) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics4>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountManagerStatics4<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountMapManagerStatics
{
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Credentials::WebAccount>) AddWebAccountAsync(param::hstring const& webAccountId, param::hstring const& webAccountUserName, param::async_map_view<hstring, hstring> const& props, Windows::Security::Authentication::Web::Provider::WebAccountScope const& scope, param::hstring const& perUserWebAccountId) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) SetPerAppToPerUserAccountAsync(Windows::Security::Credentials::WebAccount const& perAppAccount, param::hstring const& perUserWebAccountId) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Credentials::WebAccount>) GetPerUserFromPerAppAccountAsync(Windows::Security::Credentials::WebAccount const& perAppAccount) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) ClearPerUserFromPerAppAccountAsync(Windows::Security::Credentials::WebAccount const& perAppAccount) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountMapManagerStatics>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountMapManagerStatics<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderAddAccountOperation
{
WINRT_IMPL_AUTO(void) ReportCompleted() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderAddAccountOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderAddAccountOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderBaseReportOperation
{
WINRT_IMPL_AUTO(void) ReportCompleted() const;
WINRT_IMPL_AUTO(void) ReportError(Windows::Security::Authentication::Web::Core::WebProviderError const& value) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderBaseReportOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderBaseReportOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderDeleteAccountOperation
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Credentials::WebAccount) WebAccount() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderDeleteAccountOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderDeleteAccountOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderManageAccountOperation
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Credentials::WebAccount) WebAccount() const;
WINRT_IMPL_AUTO(void) ReportCompleted() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderManageAccountOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderManageAccountOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderOperation
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebAccountProviderOperationKind) Kind() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderRetrieveCookiesOperation
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Uri) Context() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Collections::IVector<Windows::Web::Http::HttpCookie>) Cookies() const;
WINRT_IMPL_AUTO(void) Uri(Windows::Foundation::Uri const& uri) const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Uri) Uri() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Uri) ApplicationCallbackUri() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderRetrieveCookiesOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderRetrieveCookiesOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderSignOutAccountOperation
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Credentials::WebAccount) WebAccount() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Uri) ApplicationCallbackUri() const;
[[nodiscard]] WINRT_IMPL_AUTO(hstring) ClientId() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSignOutAccountOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderSignOutAccountOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderSilentReportOperation
{
WINRT_IMPL_AUTO(void) ReportUserInteractionRequired() const;
WINRT_IMPL_AUTO(void) ReportUserInteractionRequired(Windows::Security::Authentication::Web::Core::WebProviderError const& value) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderSilentReportOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderSilentReportOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderTokenObjects
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation) Operation() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderTokenObjects<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderTokenObjects2
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::System::User) User() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects2>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderTokenObjects2<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderTokenOperation
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebProviderTokenRequest) ProviderRequest() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Collections::IVector<Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse>) ProviderResponses() const;
WINRT_IMPL_AUTO(void) CacheExpirationTime(Windows::Foundation::DateTime const& value) const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::DateTime) CacheExpirationTime() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderTokenOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderUIReportOperation
{
WINRT_IMPL_AUTO(void) ReportUserCanceled() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountProviderUIReportOperation>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountProviderUIReportOperation<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebAccountScopeManagerStatics
{
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Credentials::WebAccount>) AddWebAccountAsync(param::hstring const& webAccountId, param::hstring const& webAccountUserName, param::async_map_view<hstring, hstring> const& props, Windows::Security::Authentication::Web::Provider::WebAccountScope const& scope) const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncAction) SetScopeAsync(Windows::Security::Credentials::WebAccount const& webAccount, Windows::Security::Authentication::Web::Provider::WebAccountScope const& scope) const;
WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebAccountScope) GetScope(Windows::Security::Credentials::WebAccount const& webAccount) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebAccountScopeManagerStatics>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebAccountScopeManagerStatics<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenRequest
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Core::WebTokenRequest) ClientRequest() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Collections::IVectorView<Windows::Security::Credentials::WebAccount>) WebAccounts() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebAccountSelectionOptions) WebAccountSelectionOptions() const;
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Foundation::Uri) ApplicationCallbackUri() const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Security::Cryptography::Core::CryptographicKey>) GetApplicationTokenBindingKeyAsync(Windows::Security::Authentication::Web::TokenBindingKeyType const& keyType, Windows::Foundation::Uri const& target) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenRequest<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenRequest2
{
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<Windows::Storage::Streams::IBuffer>) GetApplicationTokenBindingKeyIdAsync(Windows::Security::Authentication::Web::TokenBindingKeyType const& keyType, Windows::Foundation::Uri const& target) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest2>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenRequest2<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenRequest3
{
[[nodiscard]] WINRT_IMPL_AUTO(hstring) ApplicationPackageFamilyName() const;
[[nodiscard]] WINRT_IMPL_AUTO(hstring) ApplicationProcessName() const;
WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperation<bool>) CheckApplicationForCapabilityAsync(param::hstring const& capabilityName) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest3>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenRequest3<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenResponse
{
[[nodiscard]] WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Core::WebTokenResponse) ClientResponse() const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponse>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenResponse<D>;
};
template <typename D>
struct consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenResponseFactory
{
WINRT_IMPL_AUTO(Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse) Create(Windows::Security::Authentication::Web::Core::WebTokenResponse const& webTokenResponse) const;
};
template <> struct consume<Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponseFactory>
{
template <typename D> using type = consume_Windows_Security_Authentication_Web_Provider_IWebProviderTokenResponseFactory<D>;
};
}
#endif
| [
"dtakeda@yamaha.com"
] | dtakeda@yamaha.com |
deef5f63b31629494d9e6e4dfa8fe89c949820af | 5a58b0b1d38fab26992377e6009447d5b9120c84 | /git/Tema4/converter.h | 62fcd034b9cc274913fe497a5ae65dff4daf245a | [] | no_license | iliemihai/EGC | a0256d88a28f4b3b500b974570c60ba032e16874 | 7aa935d6941ad838d26f29248b571914f13fe57b | refs/heads/master | 2016-09-06T09:53:11.455131 | 2014-01-20T12:42:02 | 2014-01-20T12:42:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,931 | h | #ifndef CONVERTER_H
#define CONVERTER_H
#include <sstream>
#include <string>
#include <cstdarg>
#include <iostream>
class Converter
{
public:
Converter();
~Converter();
/************************************************************************/
/* Konwertuje zmienna do stringa */
/************************************************************************/
template <class T>
static std::string toString(T & _type)
{
std::string out;
std::stringstream ss;
ss<<_type;
ss>>out;
ss.clear();
return out;
}
/************************************************************************/
/* Konwertuje stringa do zmiennej, szablon potrzebuje informacji o typie*/
/************************************************************************/
template <class T>
static T fromString(std::string & _string)
{
T out;
std::stringstream ss;
ss<<_string;
ss>>out;
ss.clear();
return out;
}
/************************************************************************/
/* Wypełnia tablicę podanymi danymi, length = ilosc danych */
/************************************************************************/
template <class T>
static void setArray(T * array, int length, ...)
{
va_list ap;
va_start(ap, length);
for (int i=0; i<length; i++)
{
array[i] = va_arg(ap,T);
}
va_end(ap);
}
/************************************************************************/
/* Specjalizacja na float'a, z jakis powodow funkcja wariadyczna kastuje*/
/* floaty na double */
/************************************************************************/
template <>
static void setArray<float>(float * array, int length, ...)
{
va_list ap;
va_start(ap, length);
for (int i=0; i<length; i++)
{
array[i] = va_arg(ap,double);
}
va_end(ap);
}
};
#endif | [
"https://github.com/iliemihai"
] | https://github.com/iliemihai |
f50a2a62da7e2735dcba58c7e08552b1725f85c1 | 6f1190c83e14502f10c853605510898c34fda7f7 | /distributed_hardcoded_streaming_engine/main_simple.cpp | dc58990954766dfc1e258339aa719ab6cffb65e4 | [] | no_license | hpides/mp-ddsp-ws20 | 9cb7b3b5f746bfdfca7f510dc84b580761aed848 | 1fb1e80e1581a46230e31d7f3dfe092620ef7254 | refs/heads/master | 2023-04-06T01:17:30.480484 | 2021-05-04T09:58:25 | 2021-05-04T09:58:25 | 363,420,676 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,575 | cpp | #include <cmath>
#include <cstdint>
#include <iostream>
#include <mpi.h>
#include <mutex>
#include <thread>
inline uint64_t getCurrentUnixTimestampInMilliseconds()
{
const auto t = std::chrono::system_clock::now();
return std::chrono::duration_cast<std::chrono::milliseconds>(t.time_since_epoch()).count();
}
struct MPIConfig
{
int MPIRank, MPISize, providedThreadSupportLevel;
MPI_Datatype MPIAdTupleType, MPICheckoutTupleType;
};
struct AdTuple
{
int adId;
int userId;
double cost;
uint64_t eventTime;
uint64_t processingTime;
uint64_t numTuple;
};
struct CheckoutTuple
{
uint64_t purchaseId;
int userId;
int adId;
double value;
uint64_t eventTime;
uint64_t processingTime;
};
enum MPI_Tag
{
AD_TUPLE,
CHECKOUT_TUPLE
};
void runAdThreadTCPReceiver(MPIConfig mpiConfig)
{
uint64_t sendCount = 0;
MPI_Request forwardingRequest;
while (true) {
AdTuple adTuple{
.adId = rand(),
.userId = 1,
.cost = 0.5,
.eventTime = getCurrentUnixTimestampInMilliseconds(),
.processingTime = getCurrentUnixTimestampInMilliseconds(),
.numTuple = 1};
if (int designatedRank = adTuple.adId % mpiConfig.MPISize; designatedRank != mpiConfig.MPIRank) {
if (forwardingRequest != nullptr) {
MPI_Wait(&forwardingRequest, MPI_STATUS_IGNORE);
}
MPI_Isend(&adTuple, 1, mpiConfig.MPIAdTupleType, designatedRank, MPI_Tag::AD_TUPLE, MPI_COMM_WORLD, &forwardingRequest);
}
if (++sendCount % 100000 == 0) {
std::cout << "Ad processed " << sendCount << " tuple." << std::endl;
}
}
}
void runCheckoutThreadTCPReceiver(MPIConfig mpiConfig)
{
uint64_t sendCount = 0;
MPI_Request forwardingRequest;
while (true) {
CheckoutTuple checkoutTuple{
.purchaseId = 1,
.userId = 1,
.adId = rand(),
.value = 0.5,
.eventTime = getCurrentUnixTimestampInMilliseconds(),
.processingTime = getCurrentUnixTimestampInMilliseconds()};
if (int designatedRank = checkoutTuple.adId % mpiConfig.MPISize; designatedRank != mpiConfig.MPIRank) {
if (forwardingRequest != nullptr) {
MPI_Wait(&forwardingRequest, MPI_STATUS_IGNORE);
}
MPI_Isend(
&checkoutTuple,
1,
mpiConfig.MPICheckoutTupleType,
designatedRank,
MPI_Tag::CHECKOUT_TUPLE,
MPI_COMM_WORLD,
&forwardingRequest);
}
if (++sendCount % 100000 == 0) {
std::cout << "Checkout processed " << sendCount << " tuple." << std::endl;
}
}
}
void runAdThreadMPIReceiver(MPIConfig mpiConfig)
{
AdTuple adTuple;
std::cout << "ad Receiver says: " << sizeof(adTuple) << std::endl;
while (true)
MPI_Recv(&adTuple, 1, mpiConfig.MPIAdTupleType, MPI_ANY_SOURCE, MPI_Tag::AD_TUPLE, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
}
void runCheckoutThreadMPIReceiver(MPIConfig mpiConfig)
{
CheckoutTuple checkoutTuple;
std::cout << "checkout Receiver says: " << sizeof(checkoutTuple) << std::endl;
while (true)
MPI_Recv(
&checkoutTuple, 1, mpiConfig.MPICheckoutTupleType, MPI_ANY_SOURCE, MPI_Tag::CHECKOUT_TUPLE, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
}
MPI_Datatype createMPICheckoutTupleType()
{
const int nitems = 6;
int blocklengths[] = {8, 4, 4, 8, 8, 8};
MPI_Datatype types[] = {MPI_UINT64_T, MPI_INT, MPI_INT, MPI_DOUBLE, MPI_UINT64_T, MPI_UINT64_T};
MPI_Datatype MPICheckoutTupleType;
MPI_Aint offsets[] = {
offsetof(CheckoutTuple, purchaseId),
offsetof(CheckoutTuple, userId),
offsetof(CheckoutTuple, adId),
offsetof(CheckoutTuple, value),
offsetof(CheckoutTuple, eventTime),
offsetof(CheckoutTuple, processingTime)};
MPI_Type_create_struct(nitems, blocklengths, offsets, types, &MPICheckoutTupleType);
MPI_Type_commit(&MPICheckoutTupleType);
return MPICheckoutTupleType;
}
MPI_Datatype createMPIAdTupleType()
{
const int nitems = 6;
int blocklengths[] = {4, 4, 8, 8, 8, 8};
MPI_Datatype types[] = {MPI_INT, MPI_INT, MPI_DOUBLE, MPI_UINT64_T, MPI_UINT64_T, MPI_UINT64_T};
MPI_Datatype MPIAdTupleType;
MPI_Aint offsets[] = {
offsetof(AdTuple, adId),
offsetof(AdTuple, userId),
offsetof(AdTuple, cost),
offsetof(AdTuple, eventTime),
offsetof(AdTuple, processingTime),
offsetof(AdTuple, numTuple)};
MPI_Type_create_struct(nitems, blocklengths, offsets, types, &MPIAdTupleType);
MPI_Type_commit(&MPIAdTupleType);
return MPIAdTupleType;
}
int main(int argc, char** argv)
{
MPIConfig mpiConfig{};
MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &mpiConfig.providedThreadSupportLevel);
MPI_Comm_rank(MPI_COMM_WORLD, &mpiConfig.MPIRank);
MPI_Comm_size(MPI_COMM_WORLD, &mpiConfig.MPISize);
mpiConfig.MPIAdTupleType = createMPIAdTupleType();
mpiConfig.MPICheckoutTupleType = createMPICheckoutTupleType();
std::thread adThreadTCPReceiver([&] { runAdThreadTCPReceiver(mpiConfig); });
std::thread adThreadMPIReceiver([&] { runAdThreadMPIReceiver(mpiConfig); });
std::thread checkoutThreadTCPReceiver([&] { runCheckoutThreadTCPReceiver(mpiConfig); });
std::thread checkoutThreadMPIReceiver([&] { runCheckoutThreadMPIReceiver(mpiConfig); });
adThreadTCPReceiver.join();
}
| [
"ivan.ilic@student.hpi.de"
] | ivan.ilic@student.hpi.de |
bb984b49adabf7084cede86d0d7c7989186ae69f | c39a642616f50bed60c2afa0c197c41bc7d53b57 | /demoFlightDisplays1/SpdLines.cpp | 74105e558790079b299479b1caa99933ac6931ef | [] | no_license | wangfeilong321/OpenEaaglesExamples | e1dc23ec38837ea137cd6c41c95e1192fa6fc2c5 | e2ca52aadd0c4b991ab16aa9891935e5f1f8e5ff | refs/heads/master | 2020-12-24T12:00:49.712347 | 2016-06-14T19:46:30 | 2016-06-14T19:46:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,087 | cpp |
#include "SpdLines.h"
#include "openeaagles/base/Number.h"
#include <GL/glu.h>
using namespace oe;
IMPLEMENT_SUBCLASS(SpdLines, "SpdLines")
EMPTY_SERIALIZER(SpdLines)
EMPTY_DELETEDATA(SpdLines)
BEGIN_SLOTTABLE(SpdLines)
"isAlt", // draw for the altitude scale (instead of making a new class)
"isBackground", // do we draw the background?
END_SLOTTABLE(SpdLines)
BEGIN_SLOT_MAP(SpdLines)
ON_SLOT(1, setSlotIsAlt, base::Number)
ON_SLOT(2, setSlotDrawBack, base::Number)
END_SLOT_MAP()
SpdLines::SpdLines()
{
STANDARD_CONSTRUCTOR()
isAlt = false;
drawBack = true;
}
void SpdLines::copyData(const SpdLines& org, const bool)
{
// copy baseclass stuff first
BaseClass::copyData(org);
isAlt = org.isAlt;
drawBack = org.drawBack;
}
bool SpdLines::setIsAlt(const bool newIsAlt)
{
isAlt = newIsAlt;
return true;
}
bool SpdLines::setDrawBack(const bool newDB)
{
drawBack = newDB;
return true;
}
void SpdLines::drawFunc()
{
GLfloat ocolor[4];
GLfloat lw;
glGetFloatv(GL_CURRENT_COLOR, ocolor);
glGetFloatv(GL_LINE_WIDTH, &lw);
BEGIN_DLIST
if (!isAlt) {
double startPoint = 0;
// now step through and draw all the lines (100 of them)
// draw the big lines first
glLineWidth(2);
for (int i = 0; i < 51; i++) {
glPushMatrix();
glBegin(GL_LINES);
lcVertex2(0.6, startPoint);
lcVertex2(0.48, startPoint);
glEnd();
glPopMatrix();
// move up to the next line
startPoint += 0.9;
}
// now draw the small lines
startPoint = 0.45;
for (int i = 0; i < 50; i++) {
glPushMatrix();
glBegin(GL_LINES);
lcVertex2(0.6, startPoint);
lcVertex2(0.52, startPoint);
glEnd();
glPopMatrix();
// move up to the next line
startPoint += 0.9;
}
if (drawBack) {
glLineWidth(1);
glColor3f(0, 0, 0);
// make the polygon last
glPushMatrix();
glBegin(GL_POLYGON);
glVertex2f(0.0f, 15.0f);
glVertex2f(0.0f, -15.0f);
glVertex2f(0.6f, -15.0f);
glVertex2f(0.6f, 15.0f);
glEnd();
glPopMatrix();
}
}
else {
// if we are drawing the altitude lines
double startPoint = 0;
// now step through and draw all the lines (approx 280 of them, gets us to about 55,800 feet)
// draw the big lines first
glLineWidth(2);
for (int i = 0; i < 281; i++) {
glPushMatrix();
glBegin(GL_LINES);
lcVertex2(0, startPoint);
lcVertex2(0.12, startPoint);
glEnd();
glPopMatrix();
// move up to the next line
startPoint += 0.9;
}
// now draw the small lines
startPoint = 0.45;
for (int i = 0; i < 280; i++) {
glPushMatrix();
glBegin(GL_LINES);
lcVertex2(0, startPoint);
lcVertex2(0.08, startPoint);
glEnd();
glPopMatrix();
// move up to the next line
startPoint += 0.9;
}
if (drawBack) {
glLineWidth(1);
glColor3f(0, 0, 0);
// make the polygon last
glPushMatrix();
glBegin(GL_POLYGON);
glVertex2f(0, 15);
glVertex2f(0, -15);
glVertex2f(0.879f, -15);
glVertex2f(0.879f, 15);
glEnd();
glPopMatrix();
}
}
END_DLIST
glColor4fv(ocolor);
glLineWidth(lw);
}
bool SpdLines::setSlotIsAlt(const base::Number* const newAltFlag)
{
bool ok = false;
if (newAltFlag != nullptr) ok = setIsAlt(newAltFlag->getBoolean());
return ok;
}
//------------------------------------------------------------------------------
// sets our draw background flag
//------------------------------------------------------------------------------
bool SpdLines::setSlotDrawBack(const base::Number* const newDB)
{
bool ok = false;
if (newDB != nullptr) ok = setDrawBack(newDB->getBoolean());
return ok;
}
base::Object* SpdLines::getSlotByIndex(const int si)
{
return BaseClass::getSlotByIndex(si);
}
| [
"doug@openeaagles.org"
] | doug@openeaagles.org |
0c681f432a7fa6246777120802e2015817955b3b | 30e5500d92004cb7f50ce9c6e07345f2eeb0a190 | /Set05/ques6.cpp | aeac044c89827c4a8cb63a99ce4775f3c0b480e3 | [] | no_license | pranavkutty/CS-CP | 49dbe84017c6e06f44cbef92bd5387decb951343 | 9925a4dcfb69101331ec64c3f11e572fe2447086 | refs/heads/master | 2023-08-21T20:04:20.568699 | 2021-09-16T14:26:00 | 2021-09-16T14:26:00 | 379,631,574 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,105 | cpp | // merge k sorted linked lists
// https://leetcode.com/problems/merge-k-sorted-lists/
ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) {
if(l1==NULL)
return l2;
if(l2==NULL)
return l1;
ListNode* l3;
if(l1->val<=l2->val){
l3 = l1;
l1 = l1->next;
}
else{
l3 = l2;
l2 = l2->next;
}
ListNode *l3Head = l3;
while(l1!=NULL && l2!=NULL){
if(l1->val<=l2->val){
l3->next = l1;
l1 = l1->next;
}
else{
l3->next = l2;
l2 = l2->next;
}
l3 = l3->next;
}
while(l1!=NULL){
l3->next = l1;
l1 = l1->next;
l3 = l3->next;
}
while(l2!=NULL){
l3->next = l2;
l2 = l2->next;
l3 = l3->next;
}
return l3Head;
}
ListNode* mergeKLists(vector<ListNode*>& lists) {
while(lists.size()>1){
lists[0] = mergeTwoLists(lists[0],lists[1]);
lists.erase(lists.begin()+1);
}
if(lists.size()==0)
return NULL;
return lists[0];
} | [
"pranavkutty13@gmail.com"
] | pranavkutty13@gmail.com |
f3cda3fb6111191859c9d040caf2ab55df0afe11 | 8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a | /3rdParty/boost/1.78.0/boost/compute/utility/dim.hpp | 210c09cf6e390ce1a38c815ffa0ebb2c306dd34f | [
"BSL-1.0",
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode... | permissive | arangodb/arangodb | 0980625e76c56a2449d90dcb8d8f2c485e28a83b | 43c40535cee37fc7349a21793dc33b1833735af5 | refs/heads/devel | 2023-08-31T09:34:47.451950 | 2023-08-31T07:25:02 | 2023-08-31T07:25:02 | 2,649,214 | 13,385 | 982 | Apache-2.0 | 2023-09-14T17:02:16 | 2011-10-26T06:42:00 | C++ | UTF-8 | C++ | false | false | 2,186 | hpp | //---------------------------------------------------------------------------//
// Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_UTILITY_DIM_HPP
#define BOOST_COMPUTE_UTILITY_DIM_HPP
#include <boost/compute/config.hpp>
#include <boost/compute/utility/extents.hpp>
namespace boost {
namespace compute {
#ifndef BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
/// The variadic \c dim() function provides a concise syntax for creating
/// \ref extents objects.
///
/// For example,
/// \code
/// extents<2> region = dim(640, 480); // region == (640, 480)
/// \endcode
///
/// \see \ref extents "extents<N>"
template<class... Args>
inline extents<sizeof...(Args)> dim(Args... args)
{
return extents<sizeof...(Args)>({ static_cast<size_t>(args)... });
}
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1800)
// for some inexplicable reason passing one parameter to 'dim' variadic template
// generates compile error on msvc 2013 update 4
template<class T>
inline extents<1> dim(T arg)
{
return extents<1>(static_cast<size_t>(arg));
}
#endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1800)
#else
// dim() function definitions for non-c++11 compilers
#define BOOST_COMPUTE_DETAIL_ASSIGN_DIM(z, n, var) \
var[n] = BOOST_PP_CAT(e, n);
#define BOOST_COMPUTE_DETAIL_DEFINE_DIM(z, n, var) \
inline extents<n> dim(BOOST_PP_ENUM_PARAMS(n, size_t e)) \
{ \
extents<n> exts; \
BOOST_PP_REPEAT(n, BOOST_COMPUTE_DETAIL_ASSIGN_DIM, exts) \
return exts; \
}
BOOST_PP_REPEAT(BOOST_COMPUTE_MAX_ARITY, BOOST_COMPUTE_DETAIL_DEFINE_DIM, ~)
#undef BOOST_COMPUTE_DETAIL_ASSIGN_DIM
#undef BOOST_COMPUTE_DETAIL_DEFINE_DIM
#endif // BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
/// \internal_
template<size_t N>
inline extents<N> dim()
{
return extents<N>();
}
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_UTILITY_DIM_HPP
| [
"frank@arangodb.com"
] | frank@arangodb.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.