hexsha
stringlengths 40
40
| size
int64 7
1.05M
| ext
stringclasses 13
values | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 4
269
| max_stars_repo_name
stringlengths 5
109
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
listlengths 1
9
| max_stars_count
int64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 4
269
| max_issues_repo_name
stringlengths 5
116
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
listlengths 1
9
| max_issues_count
int64 1
48.5k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 4
269
| max_forks_repo_name
stringlengths 5
116
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
listlengths 1
9
| max_forks_count
int64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 7
1.05M
| avg_line_length
float64 1.21
330k
| max_line_length
int64 6
990k
| alphanum_fraction
float64 0.01
0.99
| author_id
stringlengths 2
40
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12aaa1f523e7d7863e05204b6c41eeb1e63a610a
| 3,244
|
cpp
|
C++
|
ReviewTheMovie/common.cpp
|
fathurmh/MultiLinkedList
|
2343744155c934f24b46c5e4171a395cd143ed65
|
[
"MIT"
] | null | null | null |
ReviewTheMovie/common.cpp
|
fathurmh/MultiLinkedList
|
2343744155c934f24b46c5e4171a395cd143ed65
|
[
"MIT"
] | null | null | null |
ReviewTheMovie/common.cpp
|
fathurmh/MultiLinkedList
|
2343744155c934f24b46c5e4171a395cd143ed65
|
[
"MIT"
] | null | null | null |
// include library c++
#include <conio.h>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
// include library buatan
#include "common.h"
// using namespace
using namespace std;
// alokasi array 2 dimensi
int *Allocate(int row, int col)
{
// instansiasi baris array
int *arr = new int [row * col + 1];
// kembalikan array
return arr;
}
// dealokasi array 2 dimensi
void Deallocate(int *(&arr))
{
// dealokasi memory baris array
delete[] arr;
}
void Tukar(int *nilai_a, int *nilai_b)
{
int temp = *nilai_a;
*nilai_a = *nilai_b;
*nilai_b = temp;
}
// prosedur menghapus text pada console
void ClearScreen()
{
system("cls");
}
// prosedur menghapus text pada console
// https://stackoverflow.com/questions/10058050/how-to-go-up-a-line-in-console-programs-c
void RemoveLastLine()
{
cout << "\x1b[A";
cout << " ";
cout << "\r";
}
// prosedur cetak text header
void PrintHeader()
{
ClearScreen();
// cetak header
cout << "================================" << endl
<< "======= REVIEW THE MOVIE =======" << endl
<< "================================" << endl << endl;
}
// prosedur cetak text title
void PrintTitle(const char *text)
{
// cetak title
printf("=== %s ===\n\n", text);
}
// prosedur cetak text failed
void Failed(const char *text)
{
// cetak text berwarna merah
printf("\x1B[31m%s\033[0m\n", text);
}
// prosedur cetak text success
void Success(const char *text)
{
// cetak text berwarna hijau
printf("\x1B[32m%s\033[0m\n", text);
}
void Success(const vector<string> ¶ms)
{
stringstream stream;
for (size_t i = 0; i < params.size(); ++i)
{
stream << params[i];
}
Success(stream.str().c_str());
}
// prosedur cetak text warning
void Warning(const char *text)
{
// cetak text berwarna jingga
printf("\x1B[33m%s\033[0m\n", text);
}
void Warning(const vector<string> ¶ms)
{
stringstream stream;
for (size_t i = 0; i < params.size(); ++i)
{
stream << params[i];
}
Warning(stream.str().c_str());
}
// prosedur cetak text information
void Information(const char *text)
{
// cetak text berwarna biru
printf("\x1B[34m%s\033[0m\n", text);
}
// fungsi agar input password menjadi simbol *
// http://www.cplusplus.com/articles/E6vU7k9E/
string GetPassword(const char *prompt, bool show_asterisk)
{
const char BACKSPACE = 8;
const char RETURN = 13;
unsigned char ch = 0;
string password;
cout << prompt;
while ((ch = getch()) != RETURN)
{
if (ch == BACKSPACE)
{
if (password.length() != 0)
{
if (show_asterisk)
{
cout << "\b \b";
}
password.resize(password.length() - 1);
}
}
else if (ch == 0 || ch == 224)
{
getch();
continue;
}
else
{
password += ch;
if (show_asterisk)
{
cout << '*';
}
}
}
cout << endl;
return password;
}
| 19.780488
| 90
| 0.532984
|
fathurmh
|
12ad891131d3699076a86ccfb91948b790002eb7
| 861
|
cpp
|
C++
|
HDU/Bestcoder/87/C/code.cpp
|
sjj118/OI-Code
|
964ea6e799d14010f305c7e4aee269d860a781f7
|
[
"MIT"
] | null | null | null |
HDU/Bestcoder/87/C/code.cpp
|
sjj118/OI-Code
|
964ea6e799d14010f305c7e4aee269d860a781f7
|
[
"MIT"
] | null | null | null |
HDU/Bestcoder/87/C/code.cpp
|
sjj118/OI-Code
|
964ea6e799d14010f305c7e4aee269d860a781f7
|
[
"MIT"
] | null | null | null |
#include<iostream>
#include<cstdio>
#include<cstring>
#define cls(a) memset(a,0,sizeof(a))
#define rg register
#define rep(i,x,y) for(rg int i=(x);i<=(y);++i)
#define per(i,x,y) for(rg int i=(x);i>=(y);--i)
const int maxn=1e6+10,maxm=1e6+10;
inline void up(int&x,int y){if(y>x)x=y;}
using namespace std;
int n,m,a[maxn],b[maxn],da[maxn],db[maxn],pa[maxn],pb[maxn],c[maxm],la[maxm],lb[maxn];
int main(){
int T;scanf("%d",&T);
while(T--){
scanf("%d%d",&n,&m);
rep(i,1,n)scanf("%d",&a[i]);
rep(i,1,m)scanf("%d",&b[i]);
cls(c);
rep(i,1,n)pa[i]=c[a[i]-1],c[a[i]]=i;
cls(c);
rep(i,1,m)pb[i]=c[b[i]-1],c[b[i]]=i;
rep(i,1,n)da[i]=da[pa[i]]+1;
rep(i,1,m)db[i]=db[pb[i]]+1;
cls(la);cls(lb);
rep(i,1,n)up(la[a[i]],da[i]);
rep(i,1,m)up(lb[b[i]],db[i]);
int ans=0;
rep(i,1,maxm-1)up(ans,min(la[i],lb[i]));
printf("%d\n",ans);
}
return 0;
}
| 26.090909
| 86
| 0.557491
|
sjj118
|
12b3a8f7536adbc3e318bac566e8c329658d45d0
| 20,896
|
cpp
|
C++
|
FinalProject/src/preprocess.cpp
|
zuimrs/ImageProcess
|
8a699668c71e45e7910a6bfcb3ab0589d878cbfa
|
[
"MIT"
] | 1
|
2018-06-20T12:29:52.000Z
|
2018-06-20T12:29:52.000Z
|
FinalProject/src/preprocess.cpp
|
zuimrs/ImageProcess
|
8a699668c71e45e7910a6bfcb3ab0589d878cbfa
|
[
"MIT"
] | null | null | null |
FinalProject/src/preprocess.cpp
|
zuimrs/ImageProcess
|
8a699668c71e45e7910a6bfcb3ab0589d878cbfa
|
[
"MIT"
] | null | null | null |
#include "preprocess.h"
#include <iostream>
#include <cmath>
#include <algorithm>
#define PI 3.14159265
#define gFilterx 5
#define gFiltery 5
#define sigma 1
#define threshold_low 100
#define threshold_high 120
#define theta_size 500
using namespace std;
using namespace cimg_library;
Preprocess::Preprocess(string input,string output)
{
// 读取图片
this->point_num = 4;
this->img.load(input.c_str());
CImg<float> temp = this->img;
// 下采样,增加运算速度
this-> scale = temp._width / 300;
temp.resize(img._width/scale,img._height/scale);
// 转灰度图
CImg<float> gray =this->toGrayScale(temp);
// this->gray = this->toGrayScale(this->img);
// 高斯滤波
this->filter = createFilter(gFilterx,gFiltery,sigma);
CImg<float> gFiltered = this->useFilter(gray,this->filter);
// Canny
CImg<float> angles;
CImg<float> sFiltered = this->sobel(gFiltered,angles);
CImg<float> non = this->nonMaxSupp(sFiltered,angles);
this->thres = this->threshold(non,threshold_low,threshold_high);
// 霍夫变换
for(int i = 0 ; i < theta_size; ++i)
{
tabSin.push_back(sin(PI*i/(theta_size)));
tabCos.push_back(cos(PI*i/(theta_size)));
}
this->houghLinesTransform(thres);
this->houghLinesDetect();
// 检测边界
this->findEdge();
this->findPoint();
this->edge_line.display();
// morphing
// 读取并标定角点顺序
this->sort_corner = this->SortCorner(this->corner);
// 判断方向
if(this->direction == VERTICAL)
this->result = CImg<unsigned char>(210*2,297*2,1,3,0);
else
this->result = CImg<unsigned char>(297*2,210*2,1,3,0);
// 初始化投影坐标
vector<pair<int,int> > uv;
uv.push_back(make_pair(0,0));
uv.push_back(make_pair(0,this->result._height));
uv.push_back(make_pair(this->result._width,this->result._height));
uv.push_back(make_pair(this->result._width,0));
// 计算投影矩阵
this->trans_matrix = ComputeMatrix(this->sort_corner,uv);
// 投影
cimg_forXY(this->result,x,y)
{
pair<int, int> point = this->Transform(this->trans_matrix, make_pair(x,y));
int u = point.first;
int v = point.second;
this->result._atXY(x,y,0,0) = this->img._atXY(u,v,0,0);
this->result._atXY(x,y,0,1) = this->img._atXY(u,v,0,1);
this->result._atXY(x,y,0,2) = this->img._atXY(u,v,0,2);
}
this->result.display();
gray = this->toGrayScale(this->result);
// Canny
// gray = this->useFilter(gray,this->filter);
// gray.display();
sFiltered = this->sobel(gray,angles);
non = this->nonMaxSupp(sFiltered,angles);
CImg<float> binary = this->threshold(non,127,180);
binary.display();
CImg<bool> se0(3,3),se1(3,3);
se0.fill(1); // Structuring element 1
se1.fill(0,1,0,1,1,1,0,1,0);
binary = binary.get_dilate(se0);
binary.display();
binary = binary.get_erode(se1);
binary.display();
binary = toBinaryScale(binary);
// // binary = this->useFilter(binary,this->filter);
binary.save(output.c_str());
}
CImg<float> Preprocess::toBinaryScale(CImg<float> input){
CImg<float> output = CImg<float>(input._width,input._height,1,1);
cimg_forXY(input,x,y)
{
if(input._atXY(x,y) == 255){
output._atXY(x,y) = 0;
}else{
output._atXY(x,y) = 255;
}
}
return output;
}
float Preprocess::getMeanPixel(CImg<float> input,int x,int y,int window_size)
{
float sum = 0;
int width = input._width;
int height = input._height;
for(int i = x - window_size/2; i < x + window_size/2;++i)
{
if(i < 0 || i > width)
continue;
for(int j = y - window_size/2;j < y+window_size/2;++j)
{
if(j < 0 || j > height)
continue;
sum += input._atXY(i,j);
}
}
return sum/(window_size*window_size);
}
CImg<float> Preprocess::toGrayScale(CImg<float> input)
{
CImg<float>output = CImg<float>(input._width,input._height,1,1);
cimg_forXY(input,x,y)
{
float r = input._atXY(x,y,0,0);
float g = input._atXY(x,y,0,1);
float b = input._atXY(x,y,0,2);
int newValue = (r * 0.2126 + g * 0.7152 + b * 0.0722);
output._atXY(x,y) = newValue;
}
return output;
}
vector<vector<float> > Preprocess::createFilter(int row,int column,float sigmaIn)
{
vector<vector<float> > filter;
for (int i = 0; i < row; i++)
{
vector<float> col;
for (int j = 0; j < column; j++)
{
col.push_back(-1);
}
filter.push_back(col);
}
float coordSum = 0;
float constant = 2.0 * sigmaIn * sigmaIn;
// Sum is for normalization
float sum = 0.0;
for (int x = - row/2; x <= row/2; x++)
{
for (int y = -column/2; y <= column/2; y++)
{
coordSum = (x*x + y*y);
filter[x + row/2][y + column/2] = (exp(-(coordSum) / constant)) / (M_PI * constant);
sum += filter[x + row/2][y + column/2];
}
}
// Normalize the Filter
for (int i = 0; i < row; i++)
for (int j = 0; j < column; j++)
filter[i][j] /= sum;
return filter;
}
CImg<float> Preprocess::useFilter(CImg<float> & img_in,vector<vector<float> >& filterIn)
{
int size = (int)filterIn.size()/2;
CImg<float> filteredImg(img_in._width , img_in._height , 1,1);
filteredImg.fill(0);
for (int i = size; i < img_in._width - size; i++)
{
for (int j = size; j < img_in._height - size; j++)
{
float sum = 0;
for (int x = 0; x < filterIn.size(); x++)
for (int y = 0; y < filterIn.size(); y++)
{
sum += filterIn[x][y] * (float)(img_in._atXY(i + x - size, j + y - size));
}
filteredImg._atXY(i, j) = sum;
}
}
return filteredImg;
}
CImg<float> Preprocess::sobel(CImg<float> & gFiltered,CImg<float>& angles )
{
//Sobel X Filter
float x1[] = {-1.0, 0, 1.0};
float x2[] = {-2.0, 0, 2.0};
float x3[] = {-1.0, 0, 1.0};
vector<vector<float> > xFilter(3);
xFilter[0].assign(x1, x1+3);
xFilter[1].assign(x2, x2+3);
xFilter[2].assign(x3, x3+3);
//Sobel Y Filter
float y1[] = {-1.0, -2.0, -1.0};
float y2[] = {0, 0, 0};
float y3[] = {1.0, 2.0, 1.0};
vector<vector<float> > yFilter(3);
yFilter[0].assign(y1, y1+3);
yFilter[1].assign(y2, y2+3);
yFilter[2].assign(y3, y3+3);
//Limit Size
int size = (int)xFilter.size()/2;
CImg<float> filteredImg(gFiltered._width , gFiltered._height ,1,1);
filteredImg.fill(0);
angles = CImg<float>(gFiltered._width , gFiltered._height ,1,1); //AngleMap
angles.fill(0);
for (int i = size + gFilterx/2; i < gFiltered._width - size - gFilterx/2 ; i++)
{
for (int j = size + gFilterx/2; j < gFiltered._height - size - gFilterx/2; j++)
{
float sumx = 0;
float sumy = 0;
for (int x = 0; x < xFilter.size(); x++)
for (int y = 0; y < xFilter.size(); y++)
{
sumx += xFilter[y][x] * (float)(gFiltered._atXY(i + x - size, j + y - size)); //Sobel_X Filter Value
sumy += yFilter[y][x] * (float)(gFiltered._atXY(i + x - size, j + y - size)); //Sobel_Y Filter Value
}
float sumxsq = sumx*sumx;
float sumysq = sumy*sumy;
float sq2 = sqrt(sumxsq + sumysq);
if(sq2 > 255) //Unsigned Char Fix
sq2 =255;
filteredImg._atXY(i, j) = sq2;
if(sumx==0) //Arctan Fix
angles._atXY(i, j) = 90;
else
angles._atXY(i, j) = atan(sumy/sumx) * 180 / PI;
}
}
return filteredImg;
}
CImg<float> Preprocess::nonMaxSupp(CImg<float> & sFiltered,CImg<float> & angles)
{
CImg<float> nonMaxSupped (sFiltered._width, sFiltered._height, 1,1);
nonMaxSupped.fill(0);
for (int i=1; i< sFiltered._width - 1; i++) {
for (int j=1; j<sFiltered._height - 1; j++) {
float Tangent = angles._atXY(i,j);
nonMaxSupped._atXY(i, j) = sFiltered._atXY(i,j);
//Horizontal Edge
if ((-22.5 < Tangent) && (Tangent <= 22.5))
{
if ((sFiltered._atXY(i,j) < sFiltered._atXY(i,j+1)) || (sFiltered._atXY(i,j) < sFiltered._atXY(i,j-1)))
nonMaxSupped._atXY(i, j) = 0;
}
//Vertical Edge
if ((Tangent <= -67.5) || (67.5 < Tangent))
{
if ((sFiltered._atXY(i,j) < sFiltered._atXY(i+1,j)) || (sFiltered._atXY(i,j) < sFiltered._atXY(i-1,j)))
nonMaxSupped._atXY(i, j) = 0;
}
//-45 Degree Edge
if ((-67.5 < Tangent) && (Tangent <= -22.5))
{
if ((sFiltered._atXY(i,j) < sFiltered._atXY(i-1,j+1)) || (sFiltered._atXY(i,j) < sFiltered._atXY(i+1,j-1)))
nonMaxSupped._atXY(i, j) = 0;
}
//45 Degree Edge
if ((22.5 < Tangent) && (Tangent <= 67.5))
{
if ((sFiltered._atXY(i,j) < sFiltered._atXY(i+1,j+1)) || (sFiltered._atXY(i,j) < sFiltered._atXY(i-1,j-1)))
nonMaxSupped._atXY(i, j) = 0;
}
}
}
return nonMaxSupped;
}
CImg<float> Preprocess::threshold(CImg<float> & imgin,int low, int high)
{
if(low > 255)
low = 255;
if(high > 255)
high = 255;
CImg<float> EdgeMat(imgin._width, imgin._height, 1,1);
for (int i=0; i<imgin._width; i++)
{
for (int j = 0; j<imgin._height; j++)
{
EdgeMat._atXY(i,j) = imgin._atXY(i,j);
if(EdgeMat._atXY(i,j) > high)
EdgeMat._atXY(i,j) = 255;
else if(EdgeMat._atXY(i,j) < low)
EdgeMat._atXY(i,j) = 0;
else
{
bool anyHigh = false;
bool anyBetween = false;
for (int x=i-1; x < i+2; x++)
{
for (int y = j-1; y<j+2; y++)
{
if(x <= 0 || y <= 0 || EdgeMat._height || y > EdgeMat._width) //Out of bounds
continue;
else
{
if(EdgeMat._atXY(x,y) > high)
{
EdgeMat._atXY(i,j) = 255;
anyHigh = true;
break;
}
else if(EdgeMat._atXY(x,y) <= high && EdgeMat._atXY(x,y) >= low)
anyBetween = true;
}
}
if(anyHigh)
break;
}
if(!anyHigh && anyBetween)
for (int x=i-2; x < i+3; x++)
{
for (int y = j-1; y<j+3; y++)
{
if(x < 0 || y < 0 || x > EdgeMat._height || y > EdgeMat._width) //Out of bounds
continue;
else
{
if(EdgeMat._atXY(x,y) > high)
{
EdgeMat._atXY(i,j) = 255;
anyHigh = true;
break;
}
}
}
if(anyHigh)
break;
}
if(!anyHigh)
EdgeMat._atXY(i,j) = 0;
}
}
}
return EdgeMat;
}
// 映射到霍夫空间
void Preprocess::houghLinesTransform(CImg<float> &imgin)
{
int width = imgin._width;
int height = imgin._height;
int max_length = sqrt((width/2)*(width/2) + (height/2)*(height/2));
int rows = theta_size,cols = max_length*2;
this->houghspace = CImg<float>(cols,rows);
this->houghspace.fill(0);
cimg_forXY(imgin,x,y)
{
int p = imgin._atXY(x,y);
if(p == 0 )
{
continue;
}
int x0 = x - width/2;
int y0 = height/2 - y;
for(int i = 0 ; i < theta_size;++i)
{
int r = int(x0 * tabCos[i] + y0 * tabSin[i] ) + max_length;
if(r < 0 || r >= max_length*2)
{
continue;
}
this->houghspace ._atXY(r,i) += 1;
}
}
}
bool compare(pair<int,int> a,pair<int,int> b)
{
return a.second > b.second;
}
void Preprocess::houghLinesDetect()
{
int width = this->houghspace._width;
int height = this->houghspace._height;
// 霍夫空间取极大值点
int window_size = 40;
for(int i = 0 ; i < height ;i += window_size/2)
{
for(int j = 0 ; j < width ;j += window_size/2)
{
int max = getMaxValue(this->houghspace,window_size,i,j);
int y_max = i + window_size < height?i + window_size : height;
int x_max = j + window_size < width?j + window_size:width;
bool is_max = true;
for(int y = i; y < i + window_size;++y)
{
for(int x = j;x < j + window_size;++x)
{
if(this->houghspace._atXY(x,y) < max)
this->houghspace._atXY(x,y) = 0;
else if(!is_max)
{
this->houghspace._atXY(x,y) = 0;
}
else
{
is_max = false;
}
}
}
}
}
// 所有的极大值点保存到line数组中
cimg_forXY(this->houghspace,x,y)
{
if(this->houghspace._atXY(x,y)>0)
this->lines.push_back(make_pair(y*width+x,this->houghspace._atXY(x,y)));
}
// 根据权重从大到小排序
sort(this->lines.begin(),this->lines.end(),compare);
}
// 获取一个窗口内最大权重
int Preprocess::getMaxValue(CImg<float> &img,int &size,int &y,int &x)
{
int max = 0;
int width = x+size > img._width?img._width:x+size;
int height = y + size > img._height?img._height:y + size;
for(int j = x; j < width;++j )
{
for(int i = y ; i < height ;++i)
{
if(img._atXY(j,i) > max)
max = img._atXY(j,i);
}
}
return max;
}
void Preprocess::findEdge()
{
int max_length = this->houghspace._width / 2;
this->edge_line = CImg<float>(this->thres._width,this->thres._height,1,1,0);
// 取前point_num条边
for(int i = 0 ; i < this->point_num; ++i)
{
int n = this->lines[i].first;
int theta = n / this->houghspace._width;
int r = n % this->houghspace._width - max_length;
this->edge.push_back(make_pair(theta,r));
cout <<"theta:"<< (theta*1.0/500)*180 << " r:" << r <<" weight:" << this->lines[i].second<< endl;
for(int x = 0 ; x < this->thres._width ;++x)
{
for(int y = 0 ; y < this->thres._height ; ++y )
{
int x0 = x - this->thres._width/2 ;
int y0 = this->thres._height/2 - y ;
if(r == int(x0 * tabCos[theta] + y0 * tabSin[theta] ))
{
this->edge_line._atXY(x,y) += 255.0/2;
}
}
}
}
}
void Preprocess::findPoint()
{
int width = this->thres._width;
int height = this->thres._height;
int max_length = this->houghspace._width / 2;
int n1,n2,r1,r2,theta1,theta2;
double x,y;
unsigned char red[3] = {255,0,0};
for(int i = 0; i < this->point_num;++i){
for(int j=i+1;j< this->point_num;++j){
r1 = this->edge[i].second;
r2 = this->edge[j].second;
theta1 =this->edge[i].first;
theta2 =this->edge[j].first;
if(abs(theta1-theta2)<40)
continue;
y = (r2)*1.0/tabCos[int(theta2)] - (r1)*1.0/tabCos[int(theta1)];
y = y*1.0/(tabSin[int(theta2)]/tabCos[int(theta2)] - tabSin[int(theta1)]/tabCos[int(theta1)]);
x = r1/tabCos[int(theta1)] - y*tabSin[int(theta1)]/tabCos[int(theta1)];
cout <<"x: " << (x+width/2) <<" y:" << (height/2-y) << endl;
this->corner.push_back(make_pair(int(scale*(x+width/2)),int(scale*(height/2-y))));
// this->img.draw_circle(int(scale*(x+width/2)) ,int(scale*(height/2-y)) ,3,red);
}
}
}
vector<pair<int,int> > Preprocess::SortCorner(vector<pair<int,int> > & corner)
{
vector<pair<int,int> >result(4);
int center_x = 0,center_y = 0;
for(int i = 0 ; i < corner.size(); ++i)
{
center_x += corner[i].first;
center_y += corner[i].second;
}
center_x /= corner.size();
center_y /= corner.size();
int count = 0;
for(int i = 0 ; i < corner.size(); ++i)
{
if(corner[i].first <= center_x &&
corner[i].second <= center_y)
{
count ++;
}
}
if(count ==1 )
{
for(int i = 0 ; i < corner.size(); ++i)
{
if(corner[i].first <= center_x &&
corner[i].second <= center_y)
result[0] = corner[i];
else if(corner[i].first <= center_x &&
corner[i].second >= center_y)
result[1] = corner[i];
else if(corner[i].first >= center_x &&
corner[i].second >= center_y)
result[2] = corner[i];
else if(corner[i].first >= center_x &&
corner[i].second <= center_y)
result[3] = corner[i];
}
int delta_x = abs(result[0].first - center_x);
int delta_y = abs(result[0].second - center_y);
this->direction = delta_x < delta_y?VERTICAL:HORIZONTAL;
}else if(count == 2)
{
vector<pair<int,int> >left;
vector<pair<int,int> >right;
for(int i = 0 ; i < corner.size(); ++i)
{
if(corner[i].first <= center_x &&
corner[i].second <= center_y)
{
left.push_back(corner[i]);
}
else if(corner[i].first >= center_x &&
corner[i].second >= center_y)
{
right.push_back(corner[i]);
}
}
result[0] = left[0].first > left[1].first ? left[0]:left[1];
result[1] = left[0].first < left[1].first ? left[0]:left[1];
result[2] = right[0].first < right[1].first ? right[0]:right[1];
result[3] = right[0].first > right[1].first ? right[0]:right[1];
int delta_x = abs(result[0].first - center_x);
int delta_y = abs(result[0].second - center_y);
this->direction = delta_x > delta_y?VERTICAL:HORIZONTAL;
}
return result;
}
vector<float> Preprocess::ComputeMatrix(vector<pair<int,int> > uv,vector<pair<int,int> >xy)
{
//get the 8 point
float u1 = uv[0].first;
float u2 = uv[1].first;
float u3 = uv[2].first;
float u4 = uv[3].first;
float x1 = xy[0].first;
float x2 = xy[1].first;
float x3 = xy[2].first;
float x4 = xy[3].first;
float v1 = uv[0].second;
float v2 = uv[1].second;
float v3 = uv[2].second;
float v4 = uv[3].second;
float y1 = xy[0].second;
float y2 = xy[1].second;
float y3 = xy[2].second;
float y4 = xy[3].second;
float A[8][9] = {
{x1, y1, 1, 0, 0, 0, -u1*x1, -u1*y1, u1},
{0, 0, 0, x1, y1, 1, -v1*x1, -v1*y1, v1},
{x2, y2, 1, 0, 0, 0, -u2*x2, -u2*y2, u2},
{0, 0, 0, x2, y2, 1, -v2*x2, -v2*y2, v2},
{x3, y3, 1, 0, 0, 0, -u3*x3, -u3*y3, u3},
{0, 0, 0, x3, y3, 1, -v3*x3, -v3*y3, v3},
{x4, y4, 1, 0, 0, 0, -u4*x4, -u4*y4, u4},
{0, 0, 0, x4, y4, 1, -v4*x4, -v4*y4, v4},
};
if(A[0][0] == 0)
{
for(int i = 1;i < 8;i++)
{
if(A[i][0] != 0)
{
//swap the row and break
float temp;
for(int j = 0;j < 9;j++)
{
temp = A[0][j];
A[0][j] = A[i][j];
A[i][j] = temp;
}
break;
}
}
}
for(int i = 1;i < 8;i++)
{
float max = 0;
int index;
for(int j = i-1;j < 8;j++)
{
if(abs(A[j][i-1]) > max)
{
max = abs(A[j][i-1]);
index = j;
}
}
for(int j = 0;j < 9;j++)
{
float temp = A[i-1][j];
A[i-1][j] = A[index][j];
A[index][j] = temp;
}
for(int j = i;j < 8;j++)
{
float x = A[j][i-1] / A[i-1][i-1];
for(int k = i-1;k < 9;k++)
{
A[j][k] = A[j][k] - x*A[i-1][k];
}
}
if(A[i][i] == 0)
{
for(int j = i+1;j < 8;j++)
{
if(A[j][i] != 0)
{
float temp;
for(int k = 0;k < 9;k++)
{
temp = A[i][k];
A[i][k] = A[j][k];
A[j][k] = temp;
}
break;
}
}
}
}
vector<float> result(8);
for(int i = 7;i >= 0;i--)
{
float b = A[i][8];
for(int j = 7;j >= i+1;j--)
b = b - A[i][j] * result[j];
result[i] = b/A[i][i];
}
return result;
}
pair<int, int> Preprocess::Transform(vector<float> matrix, pair<int,int> point)
{
int u = point.first;
int v = point.second;
float q = matrix[6]*u + matrix[7]*v + 1;
float x = (matrix[0]*u + matrix[1]*v + matrix[2])/q;
float y = (matrix[3]*u + matrix[4]*v + matrix[5])/q;
// 四舍五入,最近临
return pair<int, int>((int)x+0.5f, (int)y+0.5f);
}
| 29.266106
| 123
| 0.496746
|
zuimrs
|
12ba26c5dee285dbb83297a364b73d1766fc7e38
| 21,042
|
cc
|
C++
|
src/Point_ClosedOrbitCheby.cc
|
PaulMcMillan-Astro/TorusLight
|
4a08998a5cc918b369414437ae8df109d7a926ee
|
[
"MIT"
] | 1
|
2015-12-18T16:27:53.000Z
|
2015-12-18T16:27:53.000Z
|
src/Point_ClosedOrbitCheby.cc
|
PaulMcMillan-Astro/TorusLight
|
4a08998a5cc918b369414437ae8df109d7a926ee
|
[
"MIT"
] | null | null | null |
src/Point_ClosedOrbitCheby.cc
|
PaulMcMillan-Astro/TorusLight
|
4a08998a5cc918b369414437ae8df109d7a926ee
|
[
"MIT"
] | null | null | null |
/*
*
* C++ code written by Paul McMillan, 2008 *
* e-mail: paul@astro.lu.se *
* github: https://github.com/PaulMcMillan-Astro/Torus *
*/
#include "Point_ClosedOrbitCheby.h"
#include "PJMNum.h"
#include "Orb.h"
// Routine needed for external integration routines ----------------------------
double PoiClosedOrbit::actint(double theta) const {
double psi = asin(theta/thmaxforactint);
double tmp = vr2.unfit1(psi) * drdth2.unfit1(psi) + pth2.unfit1(psi*psi);
return tmp;
}
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
// function: do_orbit - Integrates an orbit from z=0 upwards and back to z=0
// Tabulates coordinates in between.
void PoiClosedOrbit::do_orbit(PSPD clo, double delt, Potential* Phi,
double* time, double* tbR, double* tbz,
double* tbr, double* tbvr, double* tbpth,
double* tbdrdth, int &np, int Nt, double &zmax)
{
double dt, ot,t=0.;
zmax = 0.;
Record X(clo,Phi,1.e-12);
X.set_maxstep(delt);
PSPD W = clo;
dt = delt;
for(np=0; np!=Nt && W(1)*X.QP(1) > 0;np++) {
ot = t;
W = X.QP();
do {
X.stepRK_by(dt);
t += dt;
} while(t-ot < delt);
time[np] = t;
tbR[np] = X.QP(0);
tbz[np] = X.QP(1);
if( X.QP(1) > zmax ) zmax = X.QP(1);
tbr[np] = hypot(X.QP(0),X.QP(1));
tbvr[np] = (X.QP(0)*X.QP(2) + X.QP(1)*X.QP(3))/tbr[np];
tbpth[np] = X.QP(0)*X.QP(3) - X.QP(1)*X.QP(2);
tbdrdth[np]= tbr[np]*tbr[np]*tbvr[np]/tbpth[np];
}
}
////////////////////////////////////////////////////////////////////////////////
// function: set_Rstart - iterates towards correct Rstart for given energy (E)
void PoiClosedOrbit::set_Rstart(double& Rstart,double Rstop, double& odiff,
double& dr, double zmax,
bool& done, bool& either_side, bool& first)
{
double diff, small =1.e-6, smallish = 1.e-4;
double criterion = (smallish*zmax<small*Rstart) ? smallish*zmax : small*Rstart;
if(fabs(diff=Rstart-Rstop) < criterion) done = true;
else done = false;
if(either_side && !done) {
if(diff*odiff>0.) dr *= 0.5;
else dr *=-0.5;
odiff = diff;
} else if(first && !done) {
odiff = diff;
first=false;
} else if(diff*odiff < 0. && !done) {
either_side = true;
odiff = diff;
dr *= -0.5;
} else if(fabs(diff) > fabs(odiff) && !done) {
dr *= -1.;
Rstart += dr;
}
if(!done) Rstart += dr;
}
////////////////////////////////////////////////////////////////////////////////
// function: set_E - iterates towards correct energy (E) for given J_l
void PoiClosedOrbit::set_E(const double tJl,double& odiffJ,double& E,
double& dE, bool& done,bool& es_Jl,bool& firstE)
{
double diffJ;
if(fabs(diffJ=tJl-Jl)>0.0005*Jl) done = false;
if(es_Jl && !done) {
if(diffJ*odiffJ>0.) dE *= 0.5;
else dE *=-0.5;
odiffJ = diffJ;
} else if(firstE && !done) {
odiffJ = diffJ;
firstE=false;
} else if(diffJ*odiffJ < 0. && !done) {
es_Jl = true;
odiffJ = diffJ;
dE *= -0.5;
} else if(fabs(diffJ) > fabs(odiffJ) && !done) {
dE *= -1.;
E += dE;
}
if(!done) E = (E+dE<0.)? E+dE : 0.95*E;
}
////////////////////////////////////////////////////////////////////////////////
// RewriteTables - organise so we have only the upwards movement, to thmax
void PoiClosedOrbit::RewriteTables(const int n, double *time, double *tbR,double *tbz,
double *tbr, double *tbvr, double *tbpth,
double *tbir, double *tbth, int &imax)
{
int klo,khi;
double tmax,rmax;
thmax=0.;
for(int i=0;i!=n;i++) {
tbth[i] = atan2(tbz[i],tbR[i]);
if(tbth[i] > thmax) {
imax=i; thmax=tbth[i];
}
}
klo = (tbpth[imax] > 0.)? imax : imax-1;
khi = klo + 1;
// Estimate maximum th, and r at that point, assuming ~const acceleration
tmax=(time[klo]*tbpth[khi]-time[khi]*tbpth[klo])/(tbpth[khi]-tbpth[klo]);
thmax=tbth[klo]+(tbpth[klo] + .5*(tbpth[khi]-tbpth[klo])*(tmax-time[klo])
/(time[khi]-time[klo]))*(tmax-time[klo])/pow(.5*(tbr[khi]+tbr[klo]),2);
rmax=tbr[klo]+(tbvr[klo]+.5*(tbvr[khi]-tbvr[klo])*(tmax-time[klo])
/(time[khi]-time[klo]))*(tmax-time[klo]);
imax = khi;
omz = Pih/tmax; // Frequency of vertical oscillation
tbth[imax] = thmax;
tbpth[imax] = 0.;
tbvr[imax] = 0.;
tbr[imax] = rmax;
imax++;
for(int i=0;i!=imax;i++) tbir[i] = 1./tbr[i];
}
////////////////////////////////////////////////////////////////////////////////
// chebderivs - returns dy/dth and dz/dth using Chebyshev fits to the orbit
vec2 PoiClosedOrbit::chebderivs(const double psi, const vec2 yz) {
double t = thmax * sin(psi), t0 = yz[0]*yz[1], ptho,
tvr,tdrdth,tpth,tiny=1.e-20,tmp,tmp2;
vec2 dyzdt;
tvr = vr2.unfit1(psi);
tdrdth = drdth2.unfit1(psi);
tpth = pth2.unfit1(psi*psi);
if(psi == 0.) tdrdth = 0.; // symmetry, should be firmly stated
tmp2 = cos(t0);
tmp = alt2-Lz*Lz/(tmp2*tmp2);
ptho = (tmp>tiny)? sqrt(tmp) : sqrt(tiny);
tmp = (yz[1]>tiny)? yz[1] : tiny;
dyzdt[0] = tvr*tdrdth/(tmp*ptho) * thmax*cos(psi);
dyzdt[1] = tpth/(yz[0]*ptho) * thmax*cos(psi);
return dyzdt;
}
////////////////////////////////////////////////////////////////////////////////
// stepper - take a Runge-Kutta step in y and z, return uncertainty
double PoiClosedOrbit::stepper(vec2 &tyz,vec2 &dyzdt,const double psi,const double h)
{
double hh=h*0.5, psihh=psi+hh;
vec2 tmpyz, k2, tmpyz2, k2b, tmpyz3;
tmpyz = tyz + hh*dyzdt;
k2 = chebderivs(psihh, tmpyz);
tmpyz = tyz + h*k2;
// Try doing that twice:
tmpyz2 = tyz + 0.25*h*dyzdt;
k2b = chebderivs(psi+0.25*h, tmpyz2);
tmpyz2 = tyz+ 0.5*h*k2b;
k2b = chebderivs(psi+0.5*h, tmpyz2);
tmpyz3 = tmpyz2 + 0.25*h*k2b;
k2b = chebderivs(psi+0.75*h, tmpyz3);
tyz = tmpyz2+ 0.5*h*k2b;
double err0 = fabs(tyz[0]-tmpyz[0])*0.15,
err1 = fabs(tyz[1]-tmpyz[1])*0.15; // error estimates (as O(h^3))
tyz = tmpyz;
return (err0>err1)? err0 : err1;
}
////////////////////////////////////////////////////////////////////////////////
// yzrkstep - take a RK step in y & z, step size determined by uncertainty.
void PoiClosedOrbit::yzrkstep(vec2 &yz, vec2 &dyzdt, const double tol, double& psi,
const double h0, double& hnext, const double hmin,
const double hmax) {
bool done=false;
double err,fac =1.4, fac3=pow(fac,3), h=h0;
vec2 tmpyz;
do {
tmpyz = yz;
err = stepper(tmpyz,dyzdt,psi,h);
if(err*fac3<tol && h*fac<hmax) h*=fac;
else done = true;
} while(!done);
while(err>tol && h>hmin) {
h /=fac;
if(h<hmin) h=hmin;
tmpyz = yz;
err = stepper(tmpyz,dyzdt,psi,h);
}
psi += h;
yz = tmpyz;
hnext=h;
}
////////////////////////////////////////////////////////////////////////////////
// yfn - Interpolate to return y(th) or z(th) for given th=t
double PoiClosedOrbit::yfn(double t, vec2 * ys,const int which,double * thet, int n)
{
int klo=0,khi=n-1,k;
while(khi-klo > 1) {
k=(khi+klo)/2;
if(thet[k]>t) khi = k;
else klo = k;
}
double h = thet[khi] - thet[klo];
if(h==0.) cerr << "bad theta input to yfn: klo= "<<klo<<" khi= "<< khi<<"\n";
double a = (thet[khi] - t), b = (t - thet[klo]);
return (a*ys[klo][which] + b*ys[khi][which])/h;
}
////////////////////////////////////////////////////////////////////////////////
// Find point transform suitable for given potential and Actions
////////////////////////////////////////////////////////////////////////////////
void PoiClosedOrbit::set_parameters(Potential *Phi, const Actions J) {
Jl = J(1);
Lz = fabs(J(2));
alt2=(fabs(Lz)+Jl)*(fabs(Lz)+Jl);
Phi->set_Lz(Lz);
if(Jl<=0.) {
cerr << "PoiClosedOrbit called for Jl <= 0. Not possible.\n";
return;
}
bool first=true,firstE=true, either_side=false, es_Jl=false, done=false;
int Nt=1024,np=0,norb=0,nE=0,nEmax = 50000,imax, NCheb=10;
double time[Nt], tbR[Nt], tbz[Nt], tbr[Nt], tbvr[Nt], tbpth[Nt], tbdrdth[Nt],
tbir[Nt],tbth[Nt]; // tables from orbit integration
// Could improve - starting radius should be guessed from Jz+Jphi
double Rstart0 = Phi->RfromLc(Lz), Rstart = Rstart0, dr=0.1*Rstart, Rstop,
E = Phi->eff(Rstart,0.), dE, tiny=1.e-9, small=1.e-5, odiff,odiffJ,
delt=0.002*Rstart*Rstart/Lz, dt,ot,pot, tJl, *psi, *psisq, *tbth2,
Escale = Phi->eff(2.*Rstart,0.)-E, // positive number
zmax;
PSPD clo;
Cheby rr2;
E += tiny*Escale;
dE = 0.08*Escale;
// For any given Jl, we do not know the corresponding closed orbit, and
// don't even know any point on it. Therefore we have to start by guessing
// an energy (E) and iterate to the correct value. Furthermore, for any
// given E, we don't actually know the closed orbit, so we have to guess a
// starting point, then integrate the orbit and use that to improve our
// guess
for(nE=0;!done && nE!=nEmax;nE++) { // iterate energy
for(norb=0;norb!=200 && !done;norb++) { // for each energy, iterate start R
while((pot=Phi->eff(Rstart,tiny))>=E) {// avoid unphysical starting points
if(first) Rstart += 0.5*(Rstart0-Rstart);
else Rstart = 0.01*clo[0] + 0.99*Rstart; // if use mean -> closed loop
}
clo[0] = Rstart; clo[1] = tiny; // clo = starting point
clo[2] = 0.; clo[3] = sqrt(2.*(E-pot));
do { // integrate orbit (with enough datapoints)
delt= (np==Nt)? delt*2 : (np<0.25*Nt &&np)? delt*.9*np/double(Nt):delt;
do_orbit(clo,delt,Phi,time,tbR,tbz,tbr,tbvr,tbpth,tbdrdth,np,Nt,zmax);
} while(np==Nt || np < Nt/4);
Rstop = tbR[np-2]-tbz[np-2]/(tbz[np-1]-tbz[np-2])*(tbR[np-1]-tbR[np-2]);
set_Rstart(Rstart,Rstop,odiff,dr,zmax,done,either_side,first);//pick new Rstart
norb++;
} // end iteration in Rstart
// clean up tables of values
RewriteTables(np, time,tbR,tbz,tbr,tbvr,tbpth,tbir, tbth, imax);
// find Jl, having set up chebyshev functions to do so.
psi = new double[imax];
psisq = new double[imax];
tbth2 = new double[imax];
for(int i=0; i!=imax; i++){
tbth2[i] = tbth[i]*tbth[i];
psi[i] = (tbth[i] >= thmax)? Pih : asin(tbth[i]/thmax);
psisq[i] = psi[i] * psi[i];
}
drdth2.chebyfit(psi,tbdrdth,imax-2,NCheb);
vr2.chebyfit (psi, tbvr, imax,NCheb);
pth2.chebyfit (psisq,tbpth,imax,NCheb);
thmaxforactint = thmax;
//tJl = 2.*qromb(&actint,0,thmax)/Pi; // Find Jl
tJl = 2.*qromb(this,&PoiClosedOrbit::actint,0,thmax)/Pi;
set_E(tJl,odiffJ,E,dE,done,es_Jl,firstE); // pick new E
if(!done && nE!=nEmax-1) { delete[] psi; delete[] psisq; delete[] tbth2; }
dr=0.1*Rstart;
first = true;
either_side = false;
} // end iterative loop
for(int i=0; i!=imax; i++) tbth2[i] = tbth[i]*tbth[i];
xa.chebyfit (tbth2, tbir, imax, NCheb); // x
rr2.chebyfit (tbth2, tbr, imax, NCheb);
double thmax2 = acos(sqrt(Lz*Lz/alt2));
int many=100000;
double tpsi,*thet;
vec2 *yzfull,yz,dyzdt;
thet = new double[many];
yzfull= new vec2[many];
yz[0] = 1.; yz[1] = 0.; tpsi = 0;
dyzdt = chebderivs(tpsi,yz);
int np2, nr=15;
double tol=2.e-10, h0=5.e-4,hnext=h0,tmp=0.;
for(np2=0;tmp<0.99*thmax && yz[0]*yz[1]<0.99*thmax2&& np2!=many;np2++) {
h0 = (hnext<0.002)? hnext : 0.002;
yzrkstep(yz,dyzdt,tol,tpsi,h0,hnext,1.e-8,2.e-3);
tmp = thmax*sin(tpsi);
thet[np2] = tmp;
yzfull[np2][0] = yz[0];
yzfull[np2][1] = yz[1];
dyzdt = chebderivs(tpsi,yz);
}
double rr[nr], yy[nr];
rr[0] = 0.;
yy[0] = 1.;
for(int i=1;i!=nr-1;i++) { // this nr is new and ~15
double tmpth = sqrt((i-1)/double(nr-2))*thmax;
rr[i] = rr2.unfit1(tmpth*tmpth); // possibly unfitn
yy[i] = yfn(tmpth,yzfull,0,thet,np2);
}
rr[nr-1] = 2*rr[nr-2];
yy[nr-1] = yy[nr-2];
int NCheb2 = 2*NCheb;
ya.chebyfit(rr,yy,nr,NCheb2);
//double outyz[nr];
//ya.unfitn(rr,outyz,nr);
//PJMplot2 graph(rr,yy,nr,rr,outyz,nr);
//graph.plot();
// extend zz to all theta<pi/2 and fit to theta*(apoly in theta**2)
double tmpth2[nr], zz[nr];
for(int i=0;i!=nr;i++) {
tmpth2[i] = (i+1.)/double(nr)*thmax*thmax;
tmp = sqrt(tmpth2[i]);
zz[i] = yfn(tmp,yzfull,1,thet,np2)/tmp;
}
za.chebyfit(tmpth2,zz,nr,NCheb); // note that this is in fact z/theta.
//za.unfitn(tmpth2,outyz,nr);
//graph.putvalues(tmpth2,zz,nr,tmpth2,outyz,nr);
//graph.findlimits();
//graph.plot();
double x1 = thmax*thmax, x2=Pih*Pih, y1x, dy1x, y1z, dy1z, delx = x2-x1;
xa.unfitderiv(x1,y1x,dy1x);
za.unfitderiv(x1,y1z,dy1z);
// define coefficients such that quadratic goes through final point and
// has correct gradient at that point. Then take same values of xa and za
// at th = pi/2
ax = -dy1x/delx;
bx = dy1x-2*ax*x1;
cx = y1x - x1*(ax*x1 + bx);
az = -dy1z/delx;
bz = dy1z-2*az*x1;
cz = y1z - x1*(az*x1 + bz);
delete[] psi;
delete[] psisq;
delete[] tbth2;
delete[] thet;
delete[] yzfull;
}
// various numbers needed for Derivatives()
double R,z,r,th,th2,ir,costh,sinth,pr,pth,xpp,ypp,zpp,dx,dy,dz,d2x,d2y,d2z,
rt,tht,prt,ptht;
double drtdr, drtdth, dthtdr, dthtdth;
double dthdtht, dthdrt, drdtht, drdrt;
PoiClosedOrbit::PoiClosedOrbit(const double* param) {
set_parameters(param);
}
void PoiClosedOrbit::set_parameters(const double* param) {
int ncx,ncy,ncz;
Jl = param[0]; Lz = param[1]; thmax = param[2]; omz = param[3];
ncx = int(param[4]);
double chx[ncx];
for(int i=0;i!=ncx;i++) chx[i] = param[5+i];
ncy = int(param[5+ncx]);
double chy[ncy];
for(int i=0;i!=ncy;i++) chy[i] = param[6+ncx+i];
ncz = int(param[6+ncx+ncy]);
double chz[ncz];
for(int i=0;i!=ncz;i++) chz[i] = param[7+ncx+ncy+i];
xa.setcoeffs(chx,ncx);
ya.setcoeffs(chy,ncy);
za.setcoeffs(chz,ncz);
double x1 = thmax*thmax, x2=Pih*Pih, y1x, dy1x, y1z, dy1z, delx = x2-x1;
xa.unfitderiv(x1,y1x,dy1x);
za.unfitderiv(x1,y1z,dy1z);
// define coeeficients such that quadratic goes through final point and
// has correct gradient at that point. Then take same values of xa and za
// at th = pi/2
ax = -dy1x/delx;
bx = dy1x-2*ax*x1;
cx = y1x - x1*(ax*x1 + bx);
az = -dy1z/delx;
bz = dy1z-2*az*x1;
cz = y1z - x1*(az*x1 + bz);
}
PoiClosedOrbit::PoiClosedOrbit(Actions J, Cheby ch1, Cheby ch2, Cheby ch3,
double tmx, double om) {
set_parameters(J,ch1,ch2,ch3,tmx,om);
}
PoiClosedOrbit::PoiClosedOrbit() {}
///////////////////////////////////////////////////////////////////////////////
PoiClosedOrbit::PoiClosedOrbit(Potential *Phi, const Actions J) {
set_parameters(Phi,J);
}
/*/////////////////////////////////////////////////////////////////////////////
* *
* The actual transforms *
* *
/////////////////////////////////////////////////////////////////////////////*/
PSPD PoiClosedOrbit::Forward (const PSPD &qp) const
{
//first convert from toy coords to real
// first guess, th = th^T
th = qp(1);
th2 = th*th;
// then use r^T = x(th)*r
if(fabs(th)<=thmax) xa.unfitderiv(th2,xpp,dx,d2x);
else {
xpp = (ax*th2+bx)*th2+cx;
dx = 2*ax*th2+bx;
d2x= 2*ax;
}
double ixpp = 1./xpp;
dx = 2*th*dx;
r = qp(0)*ixpp;
ya.unfitderiv(r,ypp,dy,d2y);
if(fabs(th)<=thmax) za.unfitderiv(th2,zpp,dz,d2z);
else {
zpp = (az*th2+bz)*th2+cz;
dz = 2*az*th2+bz;
d2z= 2*az;
}
dz = zpp + 2.*th2*dz;
zpp = zpp*th;
double tmptht = ypp*zpp;
int tmpint=0;
do {
tmpint++;
dthtdth = ypp*dz - zpp*dy*r*ixpp*dx; // note not holding usual constants
th += (qp(1)-tmptht)/dthtdth;
th2 = th*th;
// then use r^T = x(th)*r
if(fabs(th)<=thmax) xa.unfitderiv(th2,xpp,dx,d2x);
else {
xpp = (ax*th2+bx)*th2+cx;
dx = 2*ax*th2+bx;
d2x= 2*ax;
}
double ixpp = 1./xpp;
d2x = 2*dx+4*th2*d2x; // because given is d/dth2
dx = 2*th*dx;
r = qp(0)*ixpp;
ya.unfitderiv(r,ypp,dy,d2y);
if(fabs(th)<=thmax) za.unfitderiv(th2,zpp,dz,d2z);
else {
zpp = (az*th2+bz)*th2+cz;
dz = 2*az*th2+bz;
d2z= 2*az;
}
d2z = th*(6.*dz + 4*th2*d2z); // because given is d(z/th)/dth2
dz = zpp + 2.*th2*dz;
zpp = zpp*th;
tmptht = ypp*zpp;
}while(fabs(tmptht-qp(1))>0.00000001 && tmpint<100);
costh = cos(th); sinth = sin(th); ir = 1./r;
drtdr = xpp; drtdth = r*dx; dthtdr = dy*zpp; dthtdth = ypp*dz;
rt = qp(0); tht = qp(1); prt = qp(2); ptht = qp(3);
pr = drtdr*prt + dthtdr*ptht; pth = drtdth*prt + dthtdth*ptht;
double idet = 1./(dthtdth*drtdr-drtdth*dthtdr);
dthdtht = drtdr*idet; dthdrt = -dthtdr*idet; drdtht=-drtdth*idet;
drdrt = dthtdth*idet; // needed by Derivatives()
// last convert from rth to Rz
R = r*costh;
z = r*sinth;
double pR = costh*pr - sinth*ir*pth;
double pz = sinth*pr + costh*ir*pth;
PSPD QP(R,z,pR,pz);
return QP;
}
PSPD PoiClosedOrbit::Backward (const PSPD &QP) const
{
PSPD qp;
R=QP(0); z=QP(1); r=hypot(QP(0),QP(1)); th=atan2(QP(1),QP(0));
double th2=th*th;
ir=1./r; costh=QP(0)*ir; sinth=QP(1)*ir;
pr=QP(2)*costh+QP(3)*sinth; pth=-QP(2)*QP(1)+QP(3)*QP(0);
if(fabs(th)<=thmax) xa.unfitderiv(th2,xpp,dx,d2x);
else {
xpp = (ax*th2+bx)*th2+cx;
dx = 2*ax*th2+bx;
d2x= 2*ax;
}
ya.unfitderiv(r,ypp,dy,d2y);
if(fabs(th)<=thmax) za.unfitderiv(th2,zpp,dz,d2z);
else {
zpp = (az*th2+bz)*th2+cz;
dz = 2*az*th2+bz;
d2z= 2*az;
}
d2x = 2*dx+4*th2*d2x; // because given is d/dth2
dx = 2*th*dx;
d2z = th*(6.*dz + 4*th2*d2z); // given is z/th and d/dth2
dz = zpp + 2.*th2*dz;
zpp = zpp*th;
rt = r * xpp;
tht = ypp * zpp;
qp[0] = rt;
qp[1] = tht;
// unfortunately getting p(r,th)^T is harder. Need to know
// d(r,th)/d(r,th)^t, but can only find inverses directly.
drtdr = xpp; drtdth = r*dx; dthtdr = dy*zpp; dthtdth = ypp*dz;
double idet = 1./(dthtdth*drtdr-drtdth*dthtdr);
dthdtht = drtdr*idet; dthdrt = -dthtdr*idet; drdtht=-drtdth*idet;
drdrt = dthtdth*idet;
prt = pr*drdrt+pth*dthdrt;
ptht = pr*drdtht+pth*dthdtht;
qp[2] = prt;
qp[3] = ptht;
return qp;
}
////////////////////////////////////////////////////////////////////////////////
PSPT PoiClosedOrbit::Forward3D(const PSPT& w3) const
{
PSPT W3 = w3;
PSPD w2 = w3.Give_PSPD();
W3.Take_PSPD(Forward(w2));
W3[5] /= W3(0); // p_phi^T -> v_phi
return W3;
}
////////////////////////////////////////////////////////////////////////////////
PSPT PoiClosedOrbit::Backward3D(const PSPT& W3) const
{
PSPT w3 = W3;
PSPD W2 = W3.Give_PSPD();
w3.Take_PSPD(Backward(W2));
w3[5] *= W3(0); // correct because this is v_phi, not p_phi
return w3;
}
////////////////////////////////////////////////////////////////////////////////
void PoiClosedOrbit::Derivatives(double dQPdqp[4][4]) const {
double dpRdr = pth*sinth*ir*ir, dpRdth = -pr*sinth-pth*costh*ir,
dpRdpr = costh, dpRdpth = -sinth*ir,
dpzdr = -costh*ir*ir*pth, dpzdth = costh*pr+-sinth*ir*pth,
dpzdpr = sinth, dpzdpth = costh*ir;//, dQPdqp[4][4];
double d2rtdr2 = 0., d2rtdrdth = dx, d2rtdth2 = r*d2x,
d2thtdr2 = d2y*zpp, d2thtdrdth = dy*dz, d2thtdth2 = ypp*d2z;
double dprdrt = (d2rtdr2*drdrt + d2rtdrdth*dthdrt)*prt +
(d2thtdr2*drdrt + d2thtdrdth*dthdrt)*ptht,
dprdtht = (d2rtdr2*drdtht + d2rtdrdth*dthdtht)*prt +
(d2thtdr2*drdtht + d2thtdrdth*dthdtht)*ptht,
dprdprt = drtdr, dprdptht = dthtdr;
double dpthdrt = (d2rtdrdth*drdrt + d2rtdth2*dthdrt)*prt +
(d2thtdrdth*drdrt + d2thtdth2*dthdrt)*ptht,
dpthdtht = (d2rtdrdth*drdtht + d2rtdth2*dthdtht)*prt +
(d2thtdrdth*drdtht + d2thtdth2*dthdtht)*ptht,
dpthdprt = drtdth, dpthdptht = dthtdth;
dQPdqp[0][0] = costh*drdrt - z*dthdrt; //dR/dr*dr/drt + dR/dth*dth/drt
dQPdqp[0][1] = costh*drdtht - z*dthdtht; //dR/dr*dr/dtht + dR/dth*dth/dtht
dQPdqp[0][2] = 0.;
dQPdqp[0][3] = 0.;
dQPdqp[1][0] = sinth*drdrt + R*dthdrt; //dz/dr*dr/drt + dz/dth*dth/drt
dQPdqp[1][1] = sinth*drdtht + R*dthdtht; //dz/dr*dr/dtht + dz/dth*dth/dtht
dQPdqp[1][2] = 0.;
dQPdqp[1][3] = 0.;
dQPdqp[2][0] = dpRdr*drdrt + dpRdth*dthdrt + dpRdpr*dprdrt + dpRdpth*dpthdrt;
dQPdqp[2][1] = dpRdr*drdtht+ dpRdth*dthdtht+ dpRdpr*dprdtht+ dpRdpth*dpthdtht;
dQPdqp[2][2] = dpRdpr*dprdprt+ dpRdpth*dpthdprt;
dQPdqp[2][3] = dpRdpr*dprdptht+dpRdpth*dpthdptht;
dQPdqp[3][0] = dpzdr*drdrt + dpzdth*dthdrt + dpzdpr*dprdrt + dpzdpth*dpthdrt;
dQPdqp[3][1] = dpzdr*drdtht+ dpzdth*dthdtht+ dpzdpr*dprdtht+ dpzdpth*dpthdtht;
dQPdqp[3][2] = dpzdpr*dprdprt+ dpzdpth*dpthdprt;
dQPdqp[3][3] = dpzdpr*dprdptht+dpzdpth*dpthdptht;
}
| 32.826833
| 86
| 0.552134
|
PaulMcMillan-Astro
|
52127d9558484f9d16631508c3f8ca167a12b651
| 11,685
|
cpp
|
C++
|
main.cpp
|
tsoding/kkona
|
1957ce783d61490940a681abe1c904f3a7331690
|
[
"MIT"
] | 5
|
2020-04-05T18:56:20.000Z
|
2020-04-13T05:44:02.000Z
|
main.cpp
|
tsoding/kkona
|
1957ce783d61490940a681abe1c904f3a7331690
|
[
"MIT"
] | null | null | null |
main.cpp
|
tsoding/kkona
|
1957ce783d61490940a681abe1c904f3a7331690
|
[
"MIT"
] | null | null | null |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <SDL.h>
#include <png.h>
template <typename T>
struct Rect
{
T x, y, w, h;
};
using Rectf = Rect<float>;
SDL_Rect rectf_for_sdl(Rectf rect)
{
return {(int) floorf(rect.x),
(int) floorf(rect.y),
(int) floorf(rect.w),
(int) floorf(rect.h)};
}
template <typename T>
struct Vec2
{
T x, y;
};
using Vec2f = Vec2<float>;
template <typename T> Vec2<T> vec2(T x, T y) { return {x, y}; }
template <typename T> Vec2<T> constexpr operator+(Vec2<T> a, Vec2<T> b) { return {a.x + b.x, a.y + b.y}; }
template <typename T> Vec2<T> constexpr operator*(Vec2<T> a, Vec2<T> b) { return {a.x * b.x, a.y * b.y}; }
template <typename T> Vec2<T> constexpr operator*(Vec2<T> a, T b) { return {a.x * b, a.y * b}; }
template <typename T> Vec2<T> constexpr &operator+=(Vec2<T> &a, Vec2<T> b) { a = a + b; return a; }
void sec(int code)
{
if (code < 0) {
fprintf(stderr, "SDL pooped itself: %s\n", SDL_GetError());
abort();
}
}
template <typename T>
T *sec(T *ptr)
{
if (ptr == nullptr) {
fprintf(stderr, "SDL pooped itself: %s\n", SDL_GetError());
abort();
}
return ptr;
}
struct Sprite
{
SDL_Rect srcrect;
SDL_Texture *texture;
};
void render_sprite(SDL_Renderer *renderer,
Sprite texture,
Rectf destrect,
SDL_RendererFlip flip = SDL_FLIP_NONE)
{
SDL_Rect rect = rectf_for_sdl(destrect);
sec(SDL_RenderCopyEx(
renderer,
texture.texture,
&texture.srcrect,
&rect,
0.0,
nullptr,
flip));
}
SDL_Surface *load_png_file_as_surface(const char *image_filename)
{
png_image image;
memset(&image, 0, sizeof(image));
image.version = PNG_IMAGE_VERSION;
if (!png_image_begin_read_from_file(&image, image_filename)) {
fprintf(stderr, "Could not read file `%s`: %s\n", image_filename, image.message);
abort();
}
image.format = PNG_FORMAT_RGBA;
uint32_t *image_pixels = new uint32_t[image.width * image.height];
if (!png_image_finish_read(&image, nullptr, image_pixels, 0, nullptr)) {
fprintf(stderr, "libpng pooped itself: %s\n", image.message);
abort();
}
SDL_Surface* image_surface =
sec(SDL_CreateRGBSurfaceFrom(image_pixels,
(int) image.width,
(int) image.height,
32,
(int) image.width * 4,
0x000000FF,
0x0000FF00,
0x00FF0000,
0xFF000000));
return image_surface;
}
SDL_Texture *load_texture_from_png_file(SDL_Renderer *renderer,
const char *image_filename)
{
SDL_Surface *image_surface =
load_png_file_as_surface(image_filename);
SDL_Texture *image_texture =
sec(SDL_CreateTextureFromSurface(renderer,
image_surface));
SDL_FreeSurface(image_surface);
return image_texture;
}
Sprite load_png_file_as_sprite(SDL_Renderer *renderer, const char *image_filename)
{
Sprite sprite = {};
sprite.texture = load_texture_from_png_file(renderer, image_filename);
sec(SDL_QueryTexture(sprite.texture, NULL, NULL, &sprite.srcrect.w, &sprite.srcrect.h));
return sprite;
}
struct Sample_S16
{
int16_t* audio_buf;
Uint32 audio_len;
Uint32 audio_cur;
};
const size_t SAMPLE_MIXER_CAPACITY = 5;
struct Sample_Mixer
{
float volume;
Sample_S16 samples[SAMPLE_MIXER_CAPACITY];
void play_sample(Sample_S16 sample)
{
for (size_t i = 0; i < SAMPLE_MIXER_CAPACITY; ++i) {
if (samples[i].audio_cur >= samples[i].audio_len) {
samples[i] = sample;
samples[i].audio_cur = 0;
return;
}
}
}
};
const size_t SOMETHING_SOUND_FREQ = 48000;
const size_t SOMETHING_SOUND_FORMAT = 32784;
const size_t SOMETHING_SOUND_CHANNELS = 1;
const size_t SOMETHING_SOUND_SAMPLES = 4096;
Sample_S16 load_wav_as_sample_s16(const char *file_path)
{
Sample_S16 sample = {};
SDL_AudioSpec want = {};
if (SDL_LoadWAV(file_path, &want, (Uint8**) &sample.audio_buf, &sample.audio_len) == nullptr) {
fprintf(stderr, "SDL pooped itself: Failed to load %s: %s\n",
file_path, SDL_GetError());
abort();
}
assert(SDL_AUDIO_BITSIZE(want.format) == 16);
assert(SDL_AUDIO_ISLITTLEENDIAN(want.format));
assert(SDL_AUDIO_ISSIGNED(want.format));
assert(SDL_AUDIO_ISINT(want.format));
assert(want.freq == SOMETHING_SOUND_FREQ);
assert(want.channels == SOMETHING_SOUND_CHANNELS);
assert(want.samples == SOMETHING_SOUND_SAMPLES);
sample.audio_len /= 2;
return sample;
}
void sample_mixer_audio_callback(void *userdata, Uint8 *stream, int len)
{
Sample_Mixer *mixer = (Sample_Mixer *)userdata;
int16_t *output = (int16_t *)stream;
size_t output_len = (size_t) len / sizeof(*output);
memset(stream, 0, (size_t) len);
for (size_t i = 0; i < SAMPLE_MIXER_CAPACITY; ++i) {
for (size_t j = 0; j < output_len; ++j) {
int16_t x = 0;
if (mixer->samples[i].audio_cur < mixer->samples[i].audio_len) {
x = mixer->samples[i].audio_buf[mixer->samples[i].audio_cur];
mixer->samples[i].audio_cur += 1;
}
output[j] = (int16_t) std::clamp(
output[j] + x,
(int) std::numeric_limits<int16_t>::min(),
(int) std::numeric_limits<int16_t>::max());
}
}
for (size_t i = 0; i < output_len; ++i) {
output[i] = (int16_t) (output[i] * mixer->volume);
}
}
struct Rubber_Animat
{
float begin;
float end;
float duration;
float t;
Rectf transform_rect(Rectf texbox, Vec2f pos) const
{
const float offset = begin + (end - begin) * (t / duration);
const float w = texbox.w + offset * texbox.h;
const float h = texbox.h - offset * texbox.h;
return {pos.x - w * 0.5f, pos.y + (texbox.h * 0.5f) - h, w, h};
}
void update(float dt)
{
if (!finished()) t += dt;
}
bool finished() const
{
return t >= duration;
}
void reset()
{
t = 0.0f;
}
};
template <size_t N>
struct Compose_Rubber_Animat
{
Rubber_Animat rubber_animats[N];
size_t current;
Rectf transform_rect(Rectf texbox, Vec2f pos) const
{
return rubber_animats[std::min(current, N - 1)].transform_rect(texbox, pos);
}
void update(float dt)
{
if (finished()) return;
if (rubber_animats[current].finished()) {
current += 1;
}
rubber_animats[current].update(dt);
}
bool finished() const
{
return current >= N;
}
void reset()
{
current = 0;
for (size_t i = 0; i < N; ++i) {
rubber_animats[i].reset();
}
}
};
int main(void)
{
sec(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO));
Sample_S16 jump_sample = load_wav_as_sample_s16("./qubodup-cfork-ccby3-jump.wav");
Sample_Mixer mixer = {};
mixer.volume = 0.2f;
SDL_AudioSpec want = {};
want.freq = SOMETHING_SOUND_FREQ;
want.format = SOMETHING_SOUND_FORMAT;
want.channels = SOMETHING_SOUND_CHANNELS;
want.samples = SOMETHING_SOUND_SAMPLES;
want.callback = sample_mixer_audio_callback;
want.userdata = &mixer;
SDL_AudioSpec have = {};
SDL_AudioDeviceID dev = SDL_OpenAudioDevice(
NULL,
0,
&want,
&have,
SDL_AUDIO_ALLOW_FORMAT_CHANGE);
if (dev == 0) {
fprintf(stderr, "SDL pooped itself: Failed to open audio: %s\n", SDL_GetError());
abort();
}
if (have.format != want.format) {
fprintf(stderr, "[WARN] We didn't get expected audio format.\n");
abort();
}
SDL_PauseAudioDevice(dev, 0);
SDL_Window *window =
sec(SDL_CreateWindow(
"KKona",
0, 0, 800, 600,
SDL_WINDOW_RESIZABLE));
SDL_Renderer *renderer =
sec(SDL_CreateRenderer(
window, -1,
SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED));
auto kkona = load_png_file_as_sprite(renderer, "./KKona.png");
Rubber_Animat prepare_animat = {};
prepare_animat.begin = 0.0f;
prepare_animat.end = 0.2f;
prepare_animat.duration = 0.5f;
enum Jump_Animat_Phase
{
ATTACK = 0,
RECOVER,
N
};
Compose_Rubber_Animat<N> jump_animat = {};
jump_animat.rubber_animats[ATTACK].begin = 0.2f;
jump_animat.rubber_animats[ATTACK].end = -0.2f;
jump_animat.rubber_animats[ATTACK].duration = 0.1f;
jump_animat.rubber_animats[RECOVER].begin = -0.2f;
jump_animat.rubber_animats[RECOVER].end = 0.0f;
jump_animat.rubber_animats[RECOVER].duration = 0.2f;
// This is hackish
jump_animat.current = N - 1;
jump_animat.rubber_animats[N - 1].t = jump_animat.rubber_animats[N - 1].duration;
bool jump = true;
const auto TEXBOX_SIZE = 64.0f * 4.0f;
const Rectf texbox_local = {
- (TEXBOX_SIZE / 2), - (TEXBOX_SIZE / 2),
TEXBOX_SIZE, TEXBOX_SIZE
};
float FLOOR = 0.0f;
Vec2f gravity = vec2(0.0f, 3000.0f);
Vec2f position = vec2(0.0f, 0.0f);
Vec2f velocity = vec2(0.0f, 0.0f);
for(;;) {
int window_w = 0, window_h = 0;
SDL_GetWindowSize(window, &window_w, &window_h);
position.x = (float) window_w * 0.5f;
FLOOR = (float) window_h - texbox_local.h * 0.5f;
SDL_Event event;
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_QUIT: {
exit(0);
} break;
case SDL_KEYDOWN: {
switch (event.key.keysym.sym) {
case SDLK_SPACE: {
if (!event.key.repeat) {
jump = false;
prepare_animat.reset();
}
} break;
}
} break;
case SDL_KEYUP: {
switch (event.key.keysym.sym) {
case SDLK_SPACE: {
if (!event.key.repeat) {
jump = true;
jump_animat.reset();
velocity.y = gravity.y * -0.5f;
mixer.play_sample(jump_sample);
}
} break;
}
} break;
}
}
sec(SDL_SetRenderDrawColor(renderer, 18, 8, 8, 255));
sec(SDL_RenderClear(renderer));
const float dt = 1.0f / 60.0f;
velocity += gravity * dt;
position += velocity * dt;
if (position.y >= FLOOR) {
velocity = vec2(0.0f, 0.0f);
position.y = FLOOR;
}
if (jump) {
render_sprite(renderer,
kkona,
jump_animat.transform_rect(texbox_local, position));
jump_animat.update(dt);
} else {
render_sprite(renderer,
kkona,
prepare_animat.transform_rect(texbox_local, position));
prepare_animat.update(dt);
}
SDL_RenderPresent(renderer);
}
}
| 26.986143
| 106
| 0.558922
|
tsoding
|
52166845003e90d0090f800b681e53cfb51b447c
| 307
|
cpp
|
C++
|
AtCoder/ABC079/A/abc079_a.cpp
|
object-oriented-human/competitive
|
9e761020e887d8980a39a64eeaeaa39af0ecd777
|
[
"MIT"
] | 1
|
2022-02-21T15:43:01.000Z
|
2022-02-21T15:43:01.000Z
|
AtCoder/ABC079/A/abc079_a.cpp
|
foooop/competitive
|
9e761020e887d8980a39a64eeaeaa39af0ecd777
|
[
"MIT"
] | null | null | null |
AtCoder/ABC079/A/abc079_a.cpp
|
foooop/competitive
|
9e761020e887d8980a39a64eeaeaa39af0ecd777
|
[
"MIT"
] | null | null | null |
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
using namespace std;
signed main() {
string n; cin >> n;
if ((n[0] == n[1] && n[1] == n[2]) || (n[1] == n[2] && n[2] == n[3])) cout << "Yes";
else cout << "No";
}
| 30.7
| 88
| 0.543974
|
object-oriented-human
|
52177474559eeebe0f9989317ba0a2177a0c0060
| 67
|
cpp
|
C++
|
common/renderer/component/Component.cpp
|
damonwy/vk_launcher
|
ac06969c3429c5b1a49245ee75a275afa22480c8
|
[
"MIT"
] | null | null | null |
common/renderer/component/Component.cpp
|
damonwy/vk_launcher
|
ac06969c3429c5b1a49245ee75a275afa22480c8
|
[
"MIT"
] | 4
|
2020-12-29T00:16:39.000Z
|
2021-01-18T02:04:33.000Z
|
common/renderer/component/Component.cpp
|
damonwy/vk_launcher
|
ac06969c3429c5b1a49245ee75a275afa22480c8
|
[
"MIT"
] | null | null | null |
//
// Created by Daosheng Mu on 8/9/20.
//
#include "Component.h"
| 11.166667
| 36
| 0.626866
|
damonwy
|
5217abbca1119f5eb093537d6bd996ad91786692
| 384
|
cc
|
C++
|
ch04/simplenet/lib/gradient.cc
|
research-note/deep-learning-from-scratch-using-cpp
|
5e11be85fa9c4c7672ce9c3ea2c5ffa8f27defd1
|
[
"MIT"
] | 2
|
2021-08-15T12:38:41.000Z
|
2021-08-15T12:38:51.000Z
|
ch04/simplenet/lib/gradient.cc
|
research-note/deep-learning-from-scratch-using-modern-cpp
|
5e11be85fa9c4c7672ce9c3ea2c5ffa8f27defd1
|
[
"MIT"
] | null | null | null |
ch04/simplenet/lib/gradient.cc
|
research-note/deep-learning-from-scratch-using-modern-cpp
|
5e11be85fa9c4c7672ce9c3ea2c5ffa8f27defd1
|
[
"MIT"
] | null | null | null |
/*
* Build gradient lib.
*
* Copyright Paran Lee
*
*/
#include <iostream>
#include "lib/gradient.hpp"
template <typename F, typename T>
T gradient(F f, T x) {
const auto h = 1e-4;
const auto hh = 2 * h;
std::transform(x.begin(), x.end(), x.begin(),
[f, h, hh](auto v) -> auto {
return ( f(v + h) - f(v - h) ) / hh;
});
return x;
}
| 16.695652
| 49
| 0.510417
|
research-note
|
5218ced965d0b9d1c15bfad696ab2303f3afdf7c
| 3,085
|
hpp
|
C++
|
include/mindsp/window.hpp
|
nsdrozario/guitar-amp
|
bd11d613e11893632d51807fb4b7b08a348d3528
|
[
"MIT"
] | 1
|
2022-03-31T18:35:26.000Z
|
2022-03-31T18:35:26.000Z
|
include/mindsp/window.hpp
|
nsdrozario/granite-amp
|
2f797581f36f733048c7c9c98bdfff82d6fbe1b9
|
[
"MIT"
] | 6
|
2021-07-06T23:21:30.000Z
|
2021-08-15T03:26:27.000Z
|
include/mindsp/window.hpp
|
nsdrozario/granite-amp
|
2f797581f36f733048c7c9c98bdfff82d6fbe1b9
|
[
"MIT"
] | null | null | null |
/*
Copyright (c) 2021 Nathaniel D'Rozario
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.
*/
#pragma once
#include <cmath>
namespace mindsp {
namespace window {
/**
*
* Hann window
* @param n window index
* @param N window size
*
*/
inline float hann(std::size_t n, std::size_t N) {
float sqrt_hann = std::sin(3.141592654f * n / (N-1));
return sqrt_hann * sqrt_hann;
}
/**
*
* Bartlett window (triangular window with L=N)
* @param n window index
* @param N window size
*
*/
inline float bartlett(std::size_t n, std::size_t N) {
return 1.0f - std::abs( (n-(N*0.5)) / (N * 0.5) );
}
/**
*
* Generalized cosine-sum window
* @param n window index
* @param N window size
* @param a Array of coefficients
* @param k Size of coefficient array
*
*/
inline float cosine_sum(std::size_t n, std::size_t N, float *a, std::size_t k) {
float out = 0.0f;
for (std::size_t i = 0; i < k; i++) {
float term = a[i] * std::cos(2.0f * i * 3.1415927f * n / N);
if (i % 2 == 1) {
out -= term;
} else {
out += term;
}
}
return out;
};
/**
*
* Blackman-Harris window
* @param n window index
* @param N window size
*
*/
inline float blackman_harris(std::size_t n, std::size_t N) {
float a[4] = {0.35875, 0.48829, 0.14128, 0.01168};
return cosine_sum(n, N, a, 4);
}
/**
*
* Hamming window
* @param n window index
* @param N window size
*
*/
inline float hamming(std::size_t n, std::size_t N) {
float a[2] = {0.54, 0.46};
return cosine_sum(n, N, a, 2);
}
}
}
| 30.85
| 88
| 0.552026
|
nsdrozario
|
521c417b1daff8a28a7d0f6005b8e10ae6c179df
| 547
|
cpp
|
C++
|
NWNXLib/API/Linux/API/SJournalEntry.cpp
|
acaos/nwnxee-unified
|
0e4c318ede64028c1825319f39c012e168e0482c
|
[
"MIT"
] | 1
|
2019-06-04T04:30:24.000Z
|
2019-06-04T04:30:24.000Z
|
NWNXLib/API/Linux/API/SJournalEntry.cpp
|
presscad/nwnee
|
0f36b281524e0b7e9796bcf30f924792bf9b8a38
|
[
"MIT"
] | null | null | null |
NWNXLib/API/Linux/API/SJournalEntry.cpp
|
presscad/nwnee
|
0f36b281524e0b7e9796bcf30f924792bf9b8a38
|
[
"MIT"
] | 1
|
2019-10-20T07:54:45.000Z
|
2019-10-20T07:54:45.000Z
|
#include "SJournalEntry.hpp"
#include "API/Functions.hpp"
#include "Platform/ASLR.hpp"
namespace NWNXLib {
namespace API {
SJournalEntry::~SJournalEntry()
{
SJournalEntry__SJournalEntryDtor(this);
}
void SJournalEntry__SJournalEntryDtor(SJournalEntry* thisPtr)
{
using FuncPtrType = void(__attribute__((cdecl)) *)(SJournalEntry*, int);
uintptr_t address = Platform::ASLR::GetRelocatedAddress(Functions::SJournalEntry__SJournalEntryDtor);
FuncPtrType func = reinterpret_cast<FuncPtrType>(address);
func(thisPtr, 2);
}
}
}
| 21.88
| 105
| 0.760512
|
acaos
|
521ec656a1d0999a32474e11f55f465aa8c60c07
| 3,131
|
cpp
|
C++
|
source/axPython.cpp
|
alxarsenault/axServer
|
cb5edf5a3d3010abe182e8c8b61bafbb8f3800f4
|
[
"MIT"
] | 1
|
2015-10-18T07:48:20.000Z
|
2015-10-18T07:48:20.000Z
|
source/axPython.cpp
|
alxarsenault/axServer
|
cb5edf5a3d3010abe182e8c8b61bafbb8f3800f4
|
[
"MIT"
] | null | null | null |
source/axPython.cpp
|
alxarsenault/axServer
|
cb5edf5a3d3010abe182e8c8b61bafbb8f3800f4
|
[
"MIT"
] | null | null | null |
//#include <Python.h>
//#include <iostream>
//#include <unistd.h>
//// https://docs.python.org/2/extending/embedding.html
//#include <string>
//#include <vector>
//#include <stdio.h>
#include "axPython.h"
axPython::axPython(int argc, char* argv[])
{
// std::cout << "axPython." << std::endl;
Py_SetProgramName(argv[0]); /* optional but recommended */
Py_Initialize();
PySys_SetArgv(argc, argv); // must call this to get sys.argv and relative imports
// /usr/lib/libpython2.7.dylib
// char pySearchPath[] = "/usr/bin/python2.7";
//char pySearchPath[] = "/usr/lib/libpython2.7.dylib";
// char pySearchPath[] = "/Library/Python/2.7/";///site-packages";
// Py_SetPythonHome(pySearchPath);
InsertCurrentAppDirectory();
// std::cerr << "PATH" << Py_GetPath() << std::endl;
}
axPython::~axPython()
{
Py_Finalize();
}
void axPython::InsertCurrentAppDirectory()
{
char* buffer = new char[1024];
getcwd(buffer, 1024);
std::string app_path(buffer);
delete buffer;
app_path += "/";
// std::cout << app_path << std::endl;
std::string insert_path("import sys \nsys.path.insert(1,'"+ app_path + "')\n ");
PyRun_SimpleString(insert_path.c_str());
}
void axPython::InsertFolder(const std::string& folder_path)
{
std::string insert_path("import sys \nsys.path.insert(1,'"+ folder_path + "')\n ");
PyRun_SimpleString(insert_path.c_str());
}
void axPython::LoadModule(const std::string& module_name)
{
PyObject* moduleString = PyString_FromString((char*)module_name.c_str());
_module = PyImport_Import(moduleString);
Py_DECREF(moduleString);
if(_module == nullptr)
{
std::cerr << "ERROR : " << std::endl;
PyErr_Print();
exit(1);
}
}
std::string axPython::CallFunction(const std::string& fct_name, const std::vector<std::string>& args)
{
PyObject* myFunction = PyObject_GetAttrString(_module, (char*)fct_name.c_str());
//PyObject* fctArg = PyObject_GetAttrString(_module, (char*)fct_name.c_str());
// PyObject* fct_args = NULL;
// if(args.size())
// {
// std::cout << "Add argument" << std::endl;
// fct_args = PyObject_GetAttrString(_module, (char*)args[0].c_str());
// }
// PyObject* tuple_args = PyTuple_Pack(1, fct_args);
PyObject* pArgs = PyTuple_New(1);
PyTuple_SetItem(pArgs, 0, PyString_FromString(args[0].c_str()));
PyObject* myResult = PyObject_CallObject(myFunction, pArgs);
PyObject* objectsRepresentation = PyObject_Repr(myResult);
const char* s = PyString_AsString(objectsRepresentation);
std::string answer(s);
answer = answer.substr(answer.find_first_of("'") + 1, answer.length());
answer = answer.substr(0, answer.find_last_of("'"));
return answer;
}
//
//private:
// PyObject* _module;
//};
//int main(int argc, char *argv[])
//{
// axPython python;
// python.LoadModule("ttt");
//
// std::vector<std::string> args;
// std::string answer = python.CallFunction("StringTest", args);
//
// std::cout << answer << std::endl;
//
// return 0;
//}
| 26.533898
| 101
| 0.634941
|
alxarsenault
|
52208f052772c1c11b1322c7e8e002e64b4f5d10
| 5,959
|
cpp
|
C++
|
utility/DebugLog.cpp
|
salsanci/YRShell
|
7a6073651d2ddef0c258c9943a5f9fd88068a561
|
[
"MIT"
] | 2
|
2017-09-09T15:18:44.000Z
|
2020-02-02T17:08:40.000Z
|
utility/DebugLog.cpp
|
salsanci/YRShell
|
7a6073651d2ddef0c258c9943a5f9fd88068a561
|
[
"MIT"
] | 39
|
2017-10-19T00:44:17.000Z
|
2019-01-19T19:20:24.000Z
|
utility/DebugLog.cpp
|
salsanci/YRShell
|
7a6073651d2ddef0c258c9943a5f9fd88068a561
|
[
"MIT"
] | null | null | null |
#include "DebugLog.h"
void DebugLog::printHexLine( const char* P, int len) {
int i, j;
memset(c_buf, ' ', sizeof(c_buf)-1);
c_buf[ sizeof( c_buf) - 1] = '\0';
for( j = i = 0; i < 16; P++, i++ ) {
if( i >= len) {
print( " ");
} else {
c_buf[ j++] = *P > 0x20 && *P < 0x7E ? *P : '.';
outX(*P, 2);
print( " ");
}
if( i == 7) {
print( " ");
c_buf[ j++] = ' ';
c_buf[ j++] = ' ';
} else if( i == 3 || i == 11) {
print( " ");
c_buf[ j++] = ' ';
}
}
print( c_buf);
print( "\r\n");
}
void DebugLog::flush( ) {
for( uint16_t i = 1; i && valueAvailable(); i++ ) {
}
}
void DebugLog::out( const char c) {
if( m_dq.spaceAvailable( 24)) {
m_dq.put( c);
} else {
m_dq.reset();
out("\r\n\nLOG DATA DROPPED\r\n\n");
}
}
void DebugLog::out( const char* s) {
while( *s != '\0') {
out( *s++);
}
}
void DebugLog::out( uint32_t v, uint32_t n) {
YRShellInterpreter::unsignedToString( v, n, m_buf);
out( m_buf);
}
void DebugLog::outX( uint32_t v, uint32_t n) {
YRShellInterpreter::unsignedToStringX( v, n, m_buf);
out( m_buf);
}
void DebugLog::outPaddedStr( const char* p, uint32_t len) {
size_t sz = strlen( p);
if( sz > len) {
out( p + sz - len);
} else {
len -= sz;
while( len-- > 0) {
out( ' ');
}
out( p);
}
}
void DebugLog::printh( const char* file, uint32_t line) {
uint32_t t = (uint32_t) millis();
out( t);
out( ' ');
out( t - m_lastTime);
out( ' ');
m_lastTime = t;
outPaddedStr( file, 20);
out( ' ');
out( line, 4);
out( ' ');
}
void DebugLog::printu( uint32_t v) {
out( v);
out( ' ');
}
void DebugLog::printx( uint32_t v) {
outX( v);
out( ' ');
}
void DebugLog::printm( const char* m) {
prints( m);
out( "\r\n");
}
void DebugLog::prints( const char* m) {
out( '"');
out( m);
out( '"');
}
void DebugLog::print( const char* m) {
out( m);
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, const char* message) {
if( m_mask & mask) {
printh( file, line);
printm( message);
}
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, const char* m, const char* message) {
if( m_mask & mask) {
printh( file, line);
prints( m);
out( ' ');
printm( message);
}
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, const char* m, const char* m1, const char* message) {
if( m_mask & mask) {
printh( file, line);
prints( m);
out( ' ');
prints( m1);
out( ' ');
printm( message);
}
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, uint32_t v1, const char* m, const char* message) {
if( m_mask & mask) {
printh( file, line);
printu( v1);
prints( m);
out( ' ');
printm( message);
}
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, uint32_t v1, uint32_t v2, const char* m, const char* message) {
if( m_mask & mask) {
printh( file, line);
printu( v1);
printu( v2);
prints( m);
out( ' ');
printm( message);
}
}
void DebugLog::printLog( const char* file, uint32_t line, uint32_t mask, uint32_t v1, uint32_t v2, const char* m) {
if( m_mask & mask) {
printh( file, line);
printu( v1);
printu( v2);
outPaddedStr( m, 64);
out( "\r\n");
}
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, uint32_t v1, const char* message) {
if( m_mask & mask) {
printh( file, line);
printu(v1);
printm( message);
}
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, uint32_t v1, uint32_t v2, const char* message) {
if( m_mask & mask) {
printh( file, line);
printu(v1);
printu(v2);
printm( message);
}
}
void DebugLog::print( const char* file, uint32_t line, uint32_t mask, uint32_t v1, uint32_t v2, uint32_t v3, const char* message) {
if( m_mask & mask) {
printh( file, line);
printu(v1);
printu(v2);
printu(v3);
printm( message);
}
}
void DebugLog::printX( const char* file, uint32_t line, uint32_t mask, uint32_t v1, const char* m, const char* message) {
if( m_mask & mask) {
printh( file, line);
printx( v1);
print( m);
out( ' ');
printm( message);
}
}
void DebugLog::printX( const char* file, uint32_t line, uint32_t mask, uint32_t v1, uint32_t v2, const char* m, const char* message) {
if( m_mask & mask) {
printh( file, line);
printx( v1);
printx( v2);
print( m);
out( ' ');
printm( message);
}
}
void DebugLog::printX( const char* file, uint32_t line, uint32_t mask, uint32_t v1, const char* message) {
if( m_mask & mask) {
printh( file, line);
printx(v1);
printm( message);
}
}
void DebugLog::printX( const char* file, uint32_t line, uint32_t mask, uint32_t v1, uint32_t v2, const char* message) {
if( m_mask & mask) {
printh( file, line);
printx(v1);
printx(v2);
printm( message);
}
}
void DebugLog::printX( const char* file, uint32_t line, uint32_t mask, uint32_t v1, uint32_t v2, uint32_t v3, const char* message) {
if( m_mask & mask) {
printh( file, line);
printx(v1);
printx(v2);
printx(v3);
printm( message);
}
}
void DebugLog::printHex( const char* P, int len) {
for( ; len > 0; P += 16, len -= 16) {
printHexLine( P, len);
}
}
void DebugLog::printHex( String &s) {
printHex( s.c_str(), s.length());
}
| 26.021834
| 134
| 0.523074
|
salsanci
|
522168d31a350d40e16c883515a64b194aed437f
| 3,136
|
cpp
|
C++
|
044_Scattering (light)/Renders/Material.cpp
|
HansWord/HansMemory
|
ae74b8d4f5ebc749508ce43250a604e364950203
|
[
"MIT"
] | null | null | null |
044_Scattering (light)/Renders/Material.cpp
|
HansWord/HansMemory
|
ae74b8d4f5ebc749508ce43250a604e364950203
|
[
"MIT"
] | null | null | null |
044_Scattering (light)/Renders/Material.cpp
|
HansWord/HansMemory
|
ae74b8d4f5ebc749508ce43250a604e364950203
|
[
"MIT"
] | null | null | null |
#include "stdafx.h"
#include "Material.h"
Material::Material()
: shader(NULL)
, diffuseMap(NULL), specularMap(NULL), normalMap(NULL)
, bShaderDelete(false)
{
buffer = new Buffer();
}
Material::Material(wstring shaderFile)
: diffuseMap(NULL), specularMap(NULL), normalMap(NULL)
{
assert(shaderFile.length() > 0);
buffer = new Buffer();
bShaderDelete = true;
shader = new Shader(shaderFile);
}
Material::~Material()
{
if (bShaderDelete == true)
SAFE_DELETE(shader);
SAFE_DELETE(diffuseMap);
SAFE_DELETE(specularMap);
}
void Material::SetShader(string file)
{
SetShader(String::ToWString(file));
}
void Material::SetShader(wstring file)
{
if (bShaderDelete == true)
SAFE_DELETE(shader);
bShaderDelete = false;
if (file.length() > 0)
{
shader = new Shader(file);
bShaderDelete = true;
}
}
void Material::SetShader(Shader * shader)
{
if (bShaderDelete == true)
SAFE_DELETE(shader);
this->shader = shader;
bShaderDelete = false;
}
void Material::SetDiffuseMap(string file, D3DX11_IMAGE_LOAD_INFO * info)
{
SetDiffuseMap(String::ToWString(file), info);
}
void Material::SetDiffuseMap(wstring file, D3DX11_IMAGE_LOAD_INFO * info)
{
SAFE_DELETE(diffuseMap);
diffuseMap = new Texture(file, info);
}
void Material::SetSpecularMap(string file, D3DX11_IMAGE_LOAD_INFO * info)
{
SetSpecularMap(String::ToWString(file), info);
}
void Material::SetSpecularMap(wstring file, D3DX11_IMAGE_LOAD_INFO * info)
{
SAFE_DELETE(specularMap);
specularMap = new Texture(file, info);
}
void Material::SetNormalMap(string file, D3DX11_IMAGE_LOAD_INFO * info)
{
SetNormalMap(String::ToWString(file), info);
}
void Material::SetNormalMap(wstring file, D3DX11_IMAGE_LOAD_INFO * info)
{
SAFE_DELETE(normalMap);
normalMap = new Texture(file, info);
}
void Material::PSSetBuffer()
{
if (shader != NULL)
shader->Render();
UINT slot = 0;
if (diffuseMap != NULL)
{
diffuseMap->SetShaderResource(slot);
diffuseMap->SetShaderSampler(slot);
}
else
{
Texture::SetBlankShaderResource(slot);
Texture::SetBlankSamplerState(slot);
}
slot = 1;
if (specularMap != NULL)
{
specularMap->SetShaderResource(slot);
specularMap->SetShaderSampler(slot);
}
else
{
Texture::SetBlankShaderResource(slot);
Texture::SetBlankSamplerState(slot);
}
slot = 2;
if (normalMap != NULL)
{
normalMap->SetShaderResource(slot);
normalMap->SetShaderSampler(slot);
}
else
{
Texture::SetBlankShaderResource(slot);
Texture::SetBlankSamplerState(slot);
}
buffer->SetPSBuffer(1);
}
void Material::Clone(void ** clone)
{
Material* material = new Material();
material->name = this->name;
if(this->shader != NULL)
material->SetShader(this->shader->GetFile());
material->SetDiffuse(*this->GetDiffuse());
material->SetSpecular(*this->GetSpecular());
if (this->diffuseMap != NULL)
material->SetDiffuseMap(this->diffuseMap->GetFile());
if (this->specularMap != NULL)
material->SetSpecularMap(this->specularMap->GetFile());
if (this->normalMap != NULL)
material->SetNormalMap(this->normalMap->GetFile());
material->SetShininess(*this->GetShininess());
*clone = material;
}
| 18.778443
| 74
| 0.71588
|
HansWord
|
5222c1245620847883752cf0b2e098c5618357f9
| 1,175
|
cpp
|
C++
|
0023-merge-k-sorted-lists.cpp
|
Jamesweng/leetcode
|
1711a2a0e31d831e40137203c9abcba0bf56fcad
|
[
"Apache-2.0"
] | 106
|
2019-06-08T15:23:45.000Z
|
2020-04-04T17:56:54.000Z
|
0023-merge-k-sorted-lists.cpp
|
Jamesweng/leetcode
|
1711a2a0e31d831e40137203c9abcba0bf56fcad
|
[
"Apache-2.0"
] | null | null | null |
0023-merge-k-sorted-lists.cpp
|
Jamesweng/leetcode
|
1711a2a0e31d831e40137203c9abcba0bf56fcad
|
[
"Apache-2.0"
] | 3
|
2019-07-13T05:51:29.000Z
|
2020-04-04T17:56:57.000Z
|
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
bool comp(const ListNode* a, const ListNode* b) {
return a->val > b->val;
}
class Solution {
public:
ListNode* mergeKLists(vector<ListNode*>& lists) {
vector<ListNode*> heaps;
for (int i = 0; i < lists.size(); ++i) {
ListNode* h = lists[i];
if (h == NULL) continue;
heaps.push_back(h);
push_heap(heaps.begin(), heaps.end(), comp);
}
ListNode* ans = NULL, *p = NULL;
while (heaps.size() > 0) {
pop_heap(heaps.begin(), heaps.end(), comp);
ListNode*& h = heaps.back();
if (ans == NULL) {
ans = h;
p = h;
} else {
p->next = h;
p = p->next;
}
h = h->next;
if (h != NULL) {
push_heap(heaps.begin(), heaps.end(), comp);
} else {
heaps.pop_back();
}
}
return ans;
}
};
| 25.543478
| 60
| 0.417021
|
Jamesweng
|
522328eb7705d95a3badd8068af28f86285f4bd8
| 5,360
|
hpp
|
C++
|
libiop/bcs/merkle_tree.hpp
|
alexander-zw/libiop
|
a2ed2ec2f3e85f29b6035951553b02cb737c817a
|
[
"MIT"
] | null | null | null |
libiop/bcs/merkle_tree.hpp
|
alexander-zw/libiop
|
a2ed2ec2f3e85f29b6035951553b02cb737c817a
|
[
"MIT"
] | null | null | null |
libiop/bcs/merkle_tree.hpp
|
alexander-zw/libiop
|
a2ed2ec2f3e85f29b6035951553b02cb737c817a
|
[
"MIT"
] | null | null | null |
/**@file
*****************************************************************************
Merkle tree interfaces.
Includes support for zero knowledge merkle trees, and set membership-proofs.
*****************************************************************************
* @author This file is part of libiop (see AUTHORS)
* @copyright MIT license (see LICENSE file)
*****************************************************************************/
#ifndef LIBIOP_SNARK_COMMON_MERKLE_TREE_HPP_
#define LIBIOP_SNARK_COMMON_MERKLE_TREE_HPP_
#include <cstddef>
#include <numeric>
#include <vector>
#include <bits/stdc++.h>
#include "libiop/algebra/field_subset/field_subset.hpp"
#include "libiop/bcs/hashing/hashing.hpp"
namespace libiop {
/* Authentication paths for a set of positions */
template<typename hash_digest_type>
struct merkle_tree_set_membership_proof {
std::vector<hash_digest_type> auxiliary_hashes;
std::vector<zk_salt_type> randomness_hashes;
/* TODO: Write a test for this */
std::size_t size_in_bytes() const
{
return std::accumulate(this->auxiliary_hashes.begin(),
this->auxiliary_hashes.end(),
0,
[] (const std::size_t av, const hash_digest_type &h) {
return av + get_hash_size<hash_digest_type>(h); }) +
std::accumulate(this->randomness_hashes.begin(),
this->randomness_hashes.end(),
0,
[] (const std::size_t av, const zk_salt_type &h) {
return av + get_hash_size<zk_salt_type>(h); });
}
};
template<typename FieldT, typename hash_digest_type>
class merkle_tree {
protected:
bool constructed_;
std::vector<hash_digest_type> inner_nodes_;
std::size_t num_leaves_;
std::shared_ptr<leafhash<FieldT, hash_digest_type>> leaf_hasher_;
two_to_one_hash_function<hash_digest_type> node_hasher_;
std::size_t digest_len_bytes_;
bool make_zk_;
std::size_t num_zk_bytes_;
/* Each element will be hashed (individually) to produce a random hash digest. */
std::vector<zk_salt_type> zk_leaf_randomness_elements_;
void sample_leaf_randomness();
void compute_inner_nodes();
public:
/* Create a merkle tree with the given configuration.
If make_zk is true, 2 * security parameter random bytes will be appended to each leaf
before hashing, to prevent a low entropy leaf value from being inferred
from its hash. */
merkle_tree(const std::size_t num_leaves,
const std::shared_ptr<leafhash<FieldT, hash_digest_type>> &leaf_hasher,
const two_to_one_hash_function<hash_digest_type> &node_hasher,
const std::size_t digest_len_bytes,
const bool make_zk,
const std::size_t security_parameter);
/** This treats each leaf as a column.
* e.g. The ith leaf is the vector formed by leaf_contents[j][i] for all j */
void construct(const std::vector<std::shared_ptr<std::vector<FieldT>>> &leaf_contents);
// TODO: Remove this overload in favor of only using the former
void construct(const std::vector<std::vector<FieldT> > &leaf_contents);
/** Leaf contents is a table with `r` rows
* (`r` typically being the number of oracles)
* and (MT_num_leaves * coset_serialization_size) columns.
* Each MT leaf is the serialization of a table with `r` rows,
* and coset_serialization_size columns.
*
* This is done here rather than the BCS layer to avoid needing to copy the data,
* as this will take a significant amount of memory.
*/
void construct_with_leaves_serialized_by_cosets(
const std::vector<std::shared_ptr<std::vector<FieldT>>> &leaf_contents,
size_t coset_serialization_size);
/** Takes in a set of query positions to input oracles to a domain of size:
* `num_leaves * coset_serialization_size`,
* and the associated evaluations for each query position.
*
* This function then serializes these evaluations into leaf entries.
* The rows of a leaf entry are the same as in the eva
*/
std::vector<std::vector<FieldT>> serialize_leaf_values_by_coset(
const std::vector<size_t> &query_positions,
const std::vector<std::vector<FieldT> > &query_responses,
const size_t coset_serialization_size) const;
hash_digest_type get_root() const;
merkle_tree_set_membership_proof<hash_digest_type> get_set_membership_proof(
const std::vector<std::size_t> &positions) const;
bool validate_set_membership_proof(
const hash_digest_type &root,
const std::vector<std::size_t> &positions,
const std::vector<std::vector<FieldT>> &leaf_contents,
const merkle_tree_set_membership_proof<hash_digest_type> &proof);
/* Returns number of two to one hashes */
size_t count_hashes_to_verify_set_membership_proof(
const std::vector<std::size_t> &positions) const;
std::size_t num_leaves() const;
std::size_t depth() const;
bool zk() const;
std::size_t num_total_bytes() const;
};
} // namespace libiop
#include "libiop/bcs/merkle_tree.tcc"
#endif // LIBIOP_SNARK_COMMON_MERKLE_TREE_HPP_
| 41.550388
| 91
| 0.649254
|
alexander-zw
|
5224e1fd85d9f81bf067d9db66b48c316fa4e594
| 1,608
|
hpp
|
C++
|
src/core/IList.hpp
|
clearlycloudy/concurrent
|
243246f3244cfaf7ffcbfc042c69980d96f988e4
|
[
"MIT"
] | 9
|
2019-05-14T01:07:08.000Z
|
2020-11-12T01:46:11.000Z
|
src/core/IList.hpp
|
clearlycloudy/concurrent
|
243246f3244cfaf7ffcbfc042c69980d96f988e4
|
[
"MIT"
] | null | null | null |
src/core/IList.hpp
|
clearlycloudy/concurrent
|
243246f3244cfaf7ffcbfc042c69980d96f988e4
|
[
"MIT"
] | null | null | null |
#ifndef ILIST_HPP
#define ILIST_HPP
#include <utility>
#include <functional>
#include "IReclamation.hpp"
#include "IConcurrency.hpp"
#include "ISize.hpp"
template< class T, template< class, trait_reclamation > class ContainerType, trait_size list_size_, trait_concurrency list_concurrency_, trait_method list_method_, trait_reclamation reclam >
class IList final : public ContainerType<T, reclam> {
public:
//container and value traits
using container_type = ContainerType<T, reclam>;
using value_type = T;
using reference = T &;
using const_reference = T const &;
using size_type = typename container_type::_t_size;
//list traits
constexpr static trait_size list_size = list_size_;
constexpr static trait_concurrency list_concurrency = list_concurrency_;
constexpr static trait_method list_method = list_method_;
constexpr static trait_reclamation list_reclamation = reclam;
template< class... Args >
IList( Args... args ) : container_type( std::forward<Args>(args)... ) {}
~IList(){}
bool clear(){ return container_type::clear(); }
bool empty(){ return container_type::empty(); }
size_type size(){ return container_type::size(); }
bool add( const_reference item, size_t key ){ return container_type::add( item, key ); }
bool remove( value_type & item, size_t key ){ return container_type::remove( item, key ); }
bool contains( const_reference item, size_t key ){ return container_type::contains( item, key ); }
};
#endif
| 40.2
| 190
| 0.682836
|
clearlycloudy
|
522695134f9df5b1b3a00a5de9b09f76b7d66d1a
| 1,536
|
inl
|
C++
|
Sources/SolarTears/Rendering/Vulkan/Scene/VulkanScene.inl
|
Sixshaman/SolarTears
|
97d07730f876508fce8bf93c9dc90f051c230580
|
[
"BSD-3-Clause"
] | 4
|
2021-06-30T16:00:20.000Z
|
2021-10-13T06:17:56.000Z
|
Sources/SolarTears/Rendering/Vulkan/Scene/VulkanScene.inl
|
Sixshaman/SolarTears
|
97d07730f876508fce8bf93c9dc90f051c230580
|
[
"BSD-3-Clause"
] | null | null | null |
Sources/SolarTears/Rendering/Vulkan/Scene/VulkanScene.inl
|
Sixshaman/SolarTears
|
97d07730f876508fce8bf93c9dc90f051c230580
|
[
"BSD-3-Clause"
] | null | null | null |
template<typename SubmeshCallback>
void RenderableScene::DrawStaticObjects(VkCommandBuffer commandBuffer, SubmeshCallback submeshCallback) const
{
for(uint32_t meshIndex = mStaticUniqueMeshSpan.Begin; meshIndex < mStaticUniqueMeshSpan.End; meshIndex++)
{
for(uint32_t submeshIndex = mSceneMeshes[meshIndex].FirstSubmeshIndex; submeshIndex < mSceneMeshes[meshIndex].AfterLastSubmeshIndex; submeshIndex++)
{
submeshCallback(commandBuffer, mSceneSubmeshes[submeshIndex].MaterialIndex);
vkCmdDrawIndexed(commandBuffer, mSceneSubmeshes[submeshIndex].IndexCount, mSceneMeshes[meshIndex].InstanceCount, mSceneSubmeshes[submeshIndex].FirstIndex, mSceneSubmeshes[submeshIndex].VertexOffset, 0);
}
}
}
template<typename MeshCallback, typename SubmeshCallback>
void RenderableScene::DrawNonStaticObjects(VkCommandBuffer commandBuffer, MeshCallback meshCallback, SubmeshCallback submeshCallback) const
{
for(uint32_t meshIndex = mNonStaticMeshSpan.Begin; meshIndex < mNonStaticMeshSpan.End; meshIndex++)
{
meshCallback(commandBuffer, mSceneMeshes[meshIndex].PerObjectDataIndex);
for(uint32_t submeshIndex = mSceneMeshes[meshIndex].FirstSubmeshIndex; submeshIndex < mSceneMeshes[meshIndex].AfterLastSubmeshIndex; submeshIndex++)
{
submeshCallback(commandBuffer, mSceneSubmeshes[submeshIndex].MaterialIndex);
vkCmdDrawIndexed(commandBuffer, mSceneSubmeshes[submeshIndex].IndexCount, mSceneMeshes[meshIndex].InstanceCount, mSceneSubmeshes[submeshIndex].FirstIndex, mSceneSubmeshes[submeshIndex].VertexOffset, 0);
}
}
}
| 59.076923
| 205
| 0.836589
|
Sixshaman
|
522ca8d4e556f77c0c963852a12cafa29e87de29
| 7,372
|
cpp
|
C++
|
mazerunner/source/Way.cpp
|
1pkg/dump
|
0ee579cb6a97ae64d5367cc624b2407d7d4b1c7b
|
[
"MIT"
] | null | null | null |
mazerunner/source/Way.cpp
|
1pkg/dump
|
0ee579cb6a97ae64d5367cc624b2407d7d4b1c7b
|
[
"MIT"
] | 3
|
2020-12-11T10:01:27.000Z
|
2022-02-13T22:12:05.000Z
|
mazerunner/source/Way.cpp
|
1pkg/dump
|
0ee579cb6a97ae64d5367cc624b2407d7d4b1c7b
|
[
"MIT"
] | null | null | null |
#include "Way.h"
#include <stdlib.h>
#include <time.h>
int seed(int distance, int seed) {
if (seed == 0)
srand((int)time(NULL));
else
srand(seed);
return rand() % distance;
}
Way::Way(int width, int len) {
this->width = width;
this->len = len;
}
bool Way::gate_Checker(int wall, int position) {
if ((position != 0) && (position != this->len - 1) &&
(position != this->width - 1)) {
switch (wall) {
case 1:
if (this->len - position > 0)
return true;
else
return false;
break;
case 2:
if (this->len - position > 0)
return true;
else
return false;
break;
case 3:
if (this->width - position > 0)
return true;
else
return false;
break;
case 4:
if (this->width - position > 0)
return true;
else
return false;
break;
default:
return false;
}
} else
return false;
}
void Way::do_Gate() {
int wall, position;
int seeds = 0;
l1:
seeds = seed(666 * 666 * 666, seeds);
wall = seeds % 4 + 1;
position =
seed(this->len > this->width ? this->len - 1 : this->width - 1, seeds) +
1;
if (gate_Checker(wall, position)) {
switch (wall) {
case 1:
this->add_node(0, position);
this->add_node(1, position);
break;
case 2:
this->add_node(this->width - 1, position);
this->add_node(this->width - 2, position);
break;
case 3:
this->add_node(position, this->len - 1);
this->add_node(position, this->len - 2);
break;
case 4:
this->add_node(position, 0);
this->add_node(position, 1);
break;
}
}
else
goto l1;
}
void Way::regen_it() {
node *enter;
if (this->head->n < 15) {
while (this->head->n > 2) {
enter = this->head->next;
delete this->head;
this->head = enter;
}
} else {
for (int i = 0; i < 12; i++) {
enter = this->head->next;
delete this->head;
this->head = enter;
}
}
}
bool Way::fin() {
if (this->head->m_lval == 0 || this->head->m_lval == this->len - 1 ||
this->head->m_wval == 0 || this->head->m_wval == this->width - 1) {
node *enter = this->head;
do
this->head = this->head->next;
while (this->head->n != 1);
if (enter->n < this->len * this->width) {
this->head = enter;
this->regen_it();
return true;
}
else if ((this->head->m_lval == enter->m_lval) ||
(this->head->m_wval == enter->m_wval)) {
this->head = enter;
this->regen_it();
return true;
}
else if (((enter->m_lval == 0 || enter->m_lval == this->len - 1) &&
(this->head->m_wval == 0 ||
this->head->m_wval == this->width - 1)) ||
((this->head->m_lval == 0 ||
this->head->m_lval == this->len - 1) &&
(enter->m_wval == 0 || enter->m_wval == this->width - 1))) {
if (abs(((enter->m_wval * this->len) + enter->m_lval) -
((this->head->m_wval * this->len) + this->head->m_lval)) <
(this->len) * (int)(this->width / 6)) {
this->head = enter;
this->regen_it();
return true;
}
else {
this->head = enter;
return false;
}
}
else {
this->head = enter;
return false;
}
}
else
return true;
}
bool Way::check_Way(int route, int size) {
switch (route) {
case 1:
if (this->head->m_wval - size >= 0 &&
(this->head->next->m_wval >= this->head->m_wval))
return true;
else
return false;
break;
case 2:
if (this->head->m_wval + size <= this->width - 1 &&
(this->head->next->m_wval <= this->head->m_wval))
return true;
else
return false;
break;
case 3:
if (this->head->m_lval + size <= this->len - 1 &&
(this->head->next->m_lval <= this->head->m_lval))
return true;
else
return false;
break;
case 4:
if (this->head->m_lval - size >= 0 &&
(this->head->next->m_lval >= this->head->m_lval))
return true;
else
return false;
break;
default:
return false;
}
}
void Way::do_step(int route, int size) {
int len, width;
for (int i = 1; i <= size; i++) {
width = this->head->m_wval;
len = this->head->m_lval;
switch (route) {
case 1:
this->add_node(--width, len);
break;
case 2:
this->add_node(++width, len);
break;
case 3:
this->add_node(width, ++len);
break;
case 4:
this->add_node(width, --len);
break;
}
}
}
void Way::do_Way() {
int seeds = 0;
while (this->fin()) {
if (this->head->n % 50 == 0 &&
(this->head->n > this->width * this->len * 3))
seeds = 0;
seeds = seed(666 * 666 * 666, seeds);
if (this->check_Way(seeds % 4 + 1, seeds % 3 + 2))
this->do_step(seeds % 4 + 1, seeds % 3 + 2);
}
}
void Way::position(int &start_width, int &start_len, int &end_width,
int &end_len) {
node *enter = this->head;
end_width = this->head->m_wval;
end_len = this->head->m_lval;
while (this->head->n != 1)
this->head = this->head->next;
start_width = this->head->m_wval;
start_len = this->head->m_lval;
this->head = enter;
}
void Way::coppy_lab(bool **lab) {
node *enter = this->head;
while (this->head != NULL) {
lab[this->head->m_wval][this->head->m_lval] = 1;
this->head = this->head->next;
}
this->head = enter;
}
void Way::main(bool **lab, int &start_width, int &start_len, int &end_width,
int &end_len) {
this->do_Gate();
this->do_Way();
this->coppy_lab(lab);
this->position(start_width, start_len, end_width, end_len);
}
bool Way::check_sWay(int route, int size) {
switch (route) {
case 1:
if (this->head->m_wval - size > 0 &&
(this->head->next->m_wval >= this->head->m_wval))
return true;
else
return false;
break;
case 2:
if (this->head->m_wval + size < this->width - 1 &&
(this->head->next->m_wval <= this->head->m_wval))
return true;
else
return false;
break;
case 3:
if (this->head->m_lval + size < this->len - 1 &&
(this->head->next->m_lval <= this->head->m_lval))
return true;
else
return false;
break;
case 4:
if (this->head->m_lval - size > 0 &&
(this->head->next->m_lval >= this->head->m_lval))
return true;
else
return false;
break;
default:
return false;
}
}
void Way::do_sWay() {
node *enter = head;
int lim = seed(this->head->n - 1, 0);
while (this->head->n > lim) {
enter = this->head->next;
delete this->head;
this->head = enter;
}
int seeds = 0;
for (int i = 0; i < this->width * this->len; i++) {
seeds = seed(666 * 666 * 666, seeds);
if (this->check_sWay(seeds % 4 + 1, seeds % 6 + 2))
this->do_step(seeds % 4 + 1, seeds % 6 + 2);
}
}
| 21.492711
| 79
| 0.495252
|
1pkg
|
522dad0a3044d987186eda0ccec9ff2467291d47
| 681
|
cpp
|
C++
|
test/zisa/unit_test/flux/hllc.cpp
|
1uc/ZisaFVM
|
75fcedb3bece66499e011228a39d8a364b50fd74
|
[
"MIT"
] | null | null | null |
test/zisa/unit_test/flux/hllc.cpp
|
1uc/ZisaFVM
|
75fcedb3bece66499e011228a39d8a364b50fd74
|
[
"MIT"
] | null | null | null |
test/zisa/unit_test/flux/hllc.cpp
|
1uc/ZisaFVM
|
75fcedb3bece66499e011228a39d8a364b50fd74
|
[
"MIT"
] | 1
|
2021-08-24T11:52:51.000Z
|
2021-08-24T11:52:51.000Z
|
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 ETH Zurich, Luc Grosheintz-Laval
#include <zisa/testing/testing_framework.hpp>
#include <zisa/flux/hllc.hpp>
#include <zisa/model/euler.hpp>
#include <zisa/model/ideal_gas_eos.hpp>
TEST_CASE("HLLC; consistency") {
using eos_t = zisa::IdealGasEOS;
using gravity_t = zisa::ConstantGravityRadial;
using euler_t = zisa::Euler;
auto eos = eos_t{1.6, 1.0};
auto euler = euler_t{};
auto u = zisa::euler_var_t{1.0, -0.2, 0.3, 0.8, 12.0};
auto p = eos.pressure(u);
auto [nf, _] = zisa::HLLCBatten<eos_t>::flux(euler, eos, u, eos, u);
auto pf = euler.flux(u, p);
REQUIRE(zisa::almost_equal(nf, pf, 1e-12));
}
| 25.222222
| 70
| 0.676946
|
1uc
|
52346b8c383fcf4cfb0397a308d50fd394c8ccdf
| 3,122
|
cpp
|
C++
|
test/voiceControlInterfaceTest.cpp
|
rubenacevedo3/cpp-RoboDogVoiceController
|
9583447574531c18a6346f49de460b52bc97bed4
|
[
"MIT"
] | null | null | null |
test/voiceControlInterfaceTest.cpp
|
rubenacevedo3/cpp-RoboDogVoiceController
|
9583447574531c18a6346f49de460b52bc97bed4
|
[
"MIT"
] | null | null | null |
test/voiceControlInterfaceTest.cpp
|
rubenacevedo3/cpp-RoboDogVoiceController
|
9583447574531c18a6346f49de460b52bc97bed4
|
[
"MIT"
] | null | null | null |
/**
*@author Ruben Acevedo
*@file voiceControlInterfaceTest.cpp
*@brief This is the ".cpp" file for testing the voiceControlInterface Class
*@copyright [2017] Ruben Acevedo
*
* This file tests the voiceControlInterface Class using google test
*
*/
/**
* MIT License
*
* Copyright 2017 Ruben Acevedo
*
* 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. © 2017 GitHub, Inc.
*/
#include <voiceControlInterface.hpp>
#include <gtest/gtest.h>
//! test the class constructor sets on bool false
/**
* This tests to make sure that when the class is created
* the on bool is set to false. This also test the
* isOn() bool function as a result.
*/
TEST(voiceControlInterfaceTest, constructorTest) {
voiceControlInterface vci;
EXPECT_FALSE(vci.isOn());
}
//! test the turn on function
/**
* This tests to make sure the function turns the on bool
* to true and it outputs to the user the correct phrase
*/
TEST(voiceControlInterfaceTest, turnOnTest) {
voiceControlInterface vci;
EXPECT_EQ("RoboDog Voice Control Interface is on", vci.turnOn());
EXPECT_TRUE(vci.isOn());
EXPECT_EQ("", vci.turnOn());
}
//! test the turn off function
/**
* This tests to make sure the function turns the on bool
* to false and it outputs to the user the correct phrase
*/
TEST(voiceControlInterfaceTest, turnOffTest) {
voiceControlInterface vci;
vci.turnOn();
EXPECT_EQ("RoboDog Voice Control Interface is off", vci.turnOff());
EXPECT_FALSE(vci.isOn());
EXPECT_EQ("", vci.turnOff());
}
//! test the listen function
/**
* This tests to make sure that the listen function only works
* when the interface is turned on.
*/
TEST(voiceControlInterfaceTest, listenTest) {
voiceControlInterface vci;
EXPECT_FALSE(vci.listen(true));
vci.turnOn();
EXPECT_TRUE(vci.listen(true));
}
//! test the train function
/**
* This tests to make sure that the train function only works
* when the interface is turned on.
*/
TEST(voiceControlInterfaceTest, trainModeTest) {
voiceControlInterface vci;
EXPECT_FALSE(vci.trainMode(true));
vci.turnOn();
EXPECT_TRUE(vci.trainMode(true));
}
| 32.863158
| 80
| 0.741832
|
rubenacevedo3
|
523acc952caa31c8f2b044cd738427da6e0c6ee1
| 16,885
|
cpp
|
C++
|
TheEngineSample/RoomRayModel.cpp
|
natalieagus/Original-Binaural-Reverb
|
15cb56203c432d7768f6674b8e80ea3902c2ff11
|
[
"Zlib"
] | null | null | null |
TheEngineSample/RoomRayModel.cpp
|
natalieagus/Original-Binaural-Reverb
|
15cb56203c432d7768f6674b8e80ea3902c2ff11
|
[
"Zlib"
] | null | null | null |
TheEngineSample/RoomRayModel.cpp
|
natalieagus/Original-Binaural-Reverb
|
15cb56203c432d7768f6674b8e80ea3902c2ff11
|
[
"Zlib"
] | 1
|
2018-12-16T15:03:53.000Z
|
2018-12-16T15:03:53.000Z
|
//
// RoomRayModel.c
// TheEngineSample
//
// Created by Hans on 6/11/15.
// Copyright © 2015 A Tasty Pixel. All rights reserved.
//
#include "RoomRayModel.h"
#include "assert.h"
#include "string.h"
#include "math.h"
#include "FDN.h"
RoomRayModel::RoomRayModel(){
numCorners = 0;
}
//Visibility check when setting a bounce point on the wall
void RoomRayModel::setBouncePoints(Vector3D* bouncePoints, Vector3D wallOrientation, Vector3D wallStart, float wallLength, size_t numPoints, float* outputGains, float* inputGains, Vector3D* BP){
// average space between each pair of points
float pointSpacing = wallLength / numPoints;
Vector3D prevStart = wallStart;
// set the points at even but randomly jittered locations
for (size_t i = 0; i < numPoints; i++) {
float randFlt = (float)rand() / (float)RAND_MAX;
bouncePoints[i] = getBP(pointSpacing, wallStart, i, wallOrientation, randFlt);
if(i>0){
Vector3D start = prevStart;
Vector3D difference = (bouncePoints[i] - bouncePoints[i-1]).scalarMul(0.5f);
Vector3D end = bouncePoints[i-1] + difference;
//check how many points in that line:
// int count = 0;
// for (int k =0; k<numWallPoints ; k++){
// float d1 = BP[k].distance(start);
// float d2 = BP[k].distance(end);
// float d3 = start.distance(end);
// if ((d1+d2)-d3 < 0.0000001f){
// count++;
// // printf("Point : %f %f in S %f %f E %f %f\n", BP[k].x, bouncePoints[k].y, start.x, start.y, end.x, end.y);
// }
// }
// // printf("Count : %d \n", count);
// if (count > 0) {
//// outputGains[i-1] = sqrtf( xAlignedIntegration(listenerLoc, start, end, true) * ROOMCEILING) * sqrtf(float(count));
//// inputGains[i-1] = sqrtf(xAlignedIntegration(soundSourceLoc, start, end, false) * ROOMCEILING) * sqrtf(float(count));
//
// outputGains[i-1] = sqrtf( xAlignedIntegration(listenerLoc, start, end, true) * ROOMCEILING) * float(count);
// inputGains[i-1] = sqrtf(xAlignedIntegration(soundSourceLoc, start, end, false) * ROOMCEILING)* float(count);
//
// }
//
outputGains[i-1] = sqrtf( xAlignedIntegration(listenerLoc, start, end, true) * ROOMCEILING)*sqrtf(1.f/M_PI);
inputGains[i-1] = sqrtf(xAlignedIntegration(soundSourceLoc, start, end, false) * ROOMCEILING);
prevStart = Vector3D(end.x, end.y);
}
}
//do the last gain
Vector3D end = wallStart + wallOrientation.scalarMul(wallLength);
outputGains[numPoints-1] = sqrtf(xAlignedIntegration(listenerLoc, prevStart, end, true))*sqrtf(1.f/M_PI);
inputGains[numPoints-1] = sqrtf(xAlignedIntegration(soundSourceLoc, prevStart, end, false));
printf("\nDone setting ARE");
}
Vector3D RoomRayModel::getBP(float pointSpacing, Vector3D wallStart, size_t i, Vector3D wallOrientation, float randFlt){
float distance = (((float)i+randFlt) * pointSpacing);
Vector3D bp = wallStart + wallOrientation.scalarMul(distance);
return bp;
}
void RoomRayModel::gridBP(Vector3D* floorBouncePoints, size_t floorTaps){
float xSpacing = wallLengths[0] / floorTaps;
float ySpacing = wallLengths[1] / floorTaps;
gridArea = xSpacing * ySpacing;
for (size_t i = 0; i < floorTaps; i++){ //y
for (size_t j = 0; j < floorTaps; j++) { //x
float randFltX = (float)rand() / (float)RAND_MAX;
float randFltY = (float)rand() / (float)RAND_MAX;
//printf("index %lu : ", i*floorTaps+j);
floorBouncePoints[i*floorTaps + j] = Vector3D(((float)j + randFltX) * xSpacing, ((float)i + randFltY) * ySpacing);
//printf(" --- PT x %f y %f \n", floorBouncePoints[i*floorTaps + j].x, floorBouncePoints[i*floorTaps + j].y);
}
}
}
void RoomRayModel::setFloorBouncePointsGain(Vector3D* bouncePoints, float* inputGain, float* outputGain, size_t floorTaps){
for (size_t i = 0; i < floorTaps; i++){
// printf("GridArea is : %f \n", gridArea);
inputGain[i] = gridArea * pythagorasGain(soundSourceLoc, &bouncePoints[i], HEIGHT);
outputGain[i] = gridArea * pythagorasGain(listenerLoc, &bouncePoints[i], HEIGHT);
// printf("Floor input Gain : %f floor output Gain : %f \n", inputGain[i], outputGain[i]);
if (inputGain[i] > maxFloorGain){
inputGain[i] = maxFloorGain;
}
if (outputGain[i] > maxFloorGain){
outputGain[i] = maxFloorGain;
}
}
}
float RoomRayModel::pythagorasGain(Vector3D loc, Vector3D* bouncePoint, float height){
float zVal = ((float)rand()/float(RAND_MAX) * height);
float distance = sqrtf( powf(loc.distance(*bouncePoint), 2.f) + powf(zVal, 2.f));
bouncePoint->z = zVal;
// printf("z : %f", zVal);
return 1.0f/distance;
}
float RoomRayModel::calcMaxGain(float x, float y){
float a = y * logf(x + sqrtf(powf(x, 2.f)+powf(y, 2.f)));
float b = x * (-1.f + logf(y + sqrtf(powf(x, 2.f)+powf(y, 2.f))));
return a+b;
}
float RoomRayModel::getMaxGain(float xLower, float xUpper, float yLower, float yUpper){
float a = calcMaxGain(yUpper, xUpper);
float b = calcMaxGain(yUpper, xLower);
float c = calcMaxGain(yLower, xUpper);
float d = calcMaxGain(yLower, xLower);
return ((a-b) - (c-d));
}
void RoomRayModel::setLocation(float* rayLengths, size_t numTaps, Vector3D listenerLocation, Vector3D soundSourceLocation, Vector3D* bouncePoints, float* outputGains, float* inputGains, size_t floorTaps, Vector3D* BP){
srand (1);
size_t j = numTaps - floorTaps;
floorTapsPerDimension = (size_t) sqrtf(floorTaps);
// this->numWallPoints = numTaps - floorTaps;
// numTaps -= floorTaps;
//
//
// assert(numCorners > 0); // the geometry must be initialised before now
// soundSourceLoc = soundSourceLocation;
// listenerLoc = listenerLocation;
//
// // set the number of taps on each wall proportional to the
// // length of the wall
// size_t numTapsOnWall[RRM_MAX_CORNERS];
// size_t totalTaps = 0;
// for (size_t i = 0; i < RRM_MAX_CORNERS; i++) {
// numTapsOnWall[i] = (size_t)floor(wallLengths[i]/totalWallLength * (float)numTaps);
// totalTaps += numTapsOnWall[i];
// }
//
// // if the number of taps now assigned isn't enough, add one tap to
// // each wall until we have the desired number
// size_t i = 0;
// while (totalTaps < numTaps) {
// numTapsOnWall[i]++;
// i++;
// totalTaps++;
// if (i == RRM_MAX_CORNERS) i = 0;
// }
//
// // set bounce points for each wall
// size_t j = 0;
// for (size_t i = 0; i < numCorners; i++) {
// //must be corner i-1 or shift the corner values firston
// setBouncePoints(&bouncePoints[j], wallOrientations[i], corners[i], wallLengths[i], numTapsOnWall[i],&outputGains[j],&inputGains[j],BP);
// j += numTapsOnWall[i];
// }
////
// for (int i =0; i < numTaps; i++){
// printf("%f, ",bouncePoints[i].x);
// }
// printf("\n\n");
// for (int i =0; i < numTaps; i++){
// printf("%f, ",bouncePoints[i].y);
// }
// set bounce points for the floor
gridBP(&bouncePoints[j], floorTapsPerDimension);
setFloorBouncePointsGain(&bouncePoints[j], &inputGains[j], &outputGains[j], floorTaps);
numTaps += floorTaps;
// // normalize the total input gain to 1.0f
// float totalSquaredInputGain = 0.0f;
// for (size_t i = 0; i < numTaps; i++) {
// inputGains[i] = fabsf(inputGains[i]*ROOMCEILING); //multiply by the room ceiling
// totalSquaredInputGain += inputGains[i]*inputGains[i];
// }
//
// float inGainNormalize = 1.0f / sqrt(totalSquaredInputGain);
// for (size_t i = 0; i < numTaps; i++) {
// inputGains[i] *= inGainNormalize;
// // printf("inputGains[%lu] : %f \n", i, inputGains[i]);
// }
//
// //normalize the total out gain to 1.0f
// float totalSquaredOutputGain = 0.0f;
// for (size_t i = 0; i< numTaps; i++){
// outputGains[i] = fabsf(outputGains[i]);
// // printf("Output gain: %f \n", outputGains[i]);
// totalSquaredOutputGain += outputGains[i]*outputGains[i];
// }
//
// float outputGainNormalize = 1.0f / sqrtf(totalSquaredOutputGain);
// for (size_t i = 0; i< numTaps; i++){
// outputGains[i] *= outputGainNormalize;
// // printf("OutputGain[%lu] : %f \n", i, outputGains[i]);
// }
//
}
void RoomRayModel::setRoomGeometry(Vector3D* corners, size_t numCorners){
assert(numCorners >= 3);
this->numCorners = numCorners;
// save the locations of the corners
memcpy(this->corners,corners,sizeof(Vector3D)*numCorners);
// get normalized vectors to represent the orientation of each wall
// and get length of each wall
assert(numCorners < RRM_MAX_CORNERS);
totalWallLength = 0.0f;
for (size_t i = 1; i < numCorners; i++) {
// get orientation vector
wallOrientations[i] = corners[i] - corners[i-1];
// get wall length
wallLengths[i] = wallOrientations[i].length();
totalWallLength += wallLengths[i];
// normalize the orientation vector
wallOrientations[i].normalize();
}
// get the values that wrap around from the end of the for loop above
wallOrientations[0] = corners[0] - corners[numCorners-1];
wallLengths[0] = wallOrientations[0].length();
totalWallLength += wallLengths[0];
wallOrientations[0].normalize();
assert(totalWallLength > 0.0f);
//change the corner indexes to match the wallOrientation indexes for setLocation method
Vector3D lastCorner = this->corners[numCorners-1];
Vector3D prevCorner = this->corners[0];
Vector3D currCorner;
for (size_t i = 1; i<numCorners; i++){
currCorner = this->corners[i];
this->corners[i] = prevCorner;
prevCorner = currCorner;
}
this->corners[0] = lastCorner;
}
//Simpler integration method with angle
float RoomRayModel::integrationSimple(Vector3D loc, float x, bool listLoc){
//With angle, for input gain, not listloc
if (!listLoc){
float a = -1.0f*loc.x + x;
float b = sqrtf(powf(loc.x, 2.f) + pow(loc.y, 2.f) - 2.f * loc.x * x + pow(x, 2.f));
return (a / (loc.y * b));
}
//Without angle, for output gain
else{
float a = (loc.x - x) / loc.y;
return (- atan(a) / loc.y);
}
}
Vector3D RoomRayModel::align(Vector3D point, Vector3D wallvector){
//normalize wall vector
wallvector.normalize();
float x = wallvector.x * point.x + wallvector.y * point.y;
float y = -1.0f*wallvector.y * point.x + wallvector.x * point.y;
return Vector3D(x,y);
}
//this returns the gain, can be used for both input and output
float RoomRayModel::xAlignedIntegration(Vector3D loc, Vector3D ptStart, Vector3D ptEnd, bool listLoc){
Vector3D wallVector = ptEnd - ptStart;
Vector3D alignedStart = align(ptStart, wallVector);
Vector3D alignedEnd = align(ptEnd, wallVector);
Vector3D alignedLoc = align(loc, wallVector);
alignedEnd = alignedEnd - alignedStart;
alignedLoc = alignedLoc - alignedStart;
float endVal = integrationSimple(alignedLoc, alignedEnd.x, listLoc);
float startVal = integrationSimple(alignedLoc, 0.0f, listLoc);
// printf("endval %f startval %f \n", endVal, startVal);
return fabs(endVal - startVal);
}
//
void RoomRayModel::setRayTracingPoints(Vector3D* bouncePoints, Vector3D ssLoc, float rheight, float rwidth, int numpoints, float* outputGains, float* inputGains, Vector3D listloc){
listenerLoc = listloc;
soundSourceLoc = ssLoc;
float yBot = 0.0f-ssLoc.y;
float yTop = rheight - ssLoc.y;
float xLeft = 0.0f - ssLoc.x;
float xRight = rwidth - ssLoc.x;
float w = ssLoc.x;
float h = ssLoc.y;
for (int i = 0; i < numpoints/2; i++){
float angle = (360.f / float(numpoints)) * float(i);
// printf("Angle : %f \n", angle);
float m = 1.0f/tan(angle * M_PI / 180.f);
//y = mx + 0
Vector3D pointArray[4] = {Vector3D(yBot/m, yBot),
Vector3D(yTop/m, yTop),
Vector3D(xLeft, m*xLeft),
Vector3D(xRight, m*xRight)};
for (int j = 0; j< 4; j++){
float xO = pointArray[j].x + ssLoc.x;
if (xO > rwidth or xO < 0.0f){
pointArray[j].mark = false;
continue;
}
float yO = pointArray[j].y + ssLoc.y;
if (yO > rheight or yO < 0.0f){
pointArray[j].mark = false;
continue;
}
if (pointArray[j].mark == true){
//check for x value
if (pointArray[j].x >= 0){
bouncePoints[i].x = pointArray[j].x + w;
bouncePoints[i].y = pointArray[j].y + h;
}
else{
bouncePoints[i+numpoints/2].x = pointArray[j].x + w;
bouncePoints[i+numpoints/2].y = pointArray[j].y + h;
}
}
}
}
Vector3D prevStart = bouncePoints[0];
// printf("List loc %f %f ssloc %f %f \n", listenerLoc.x, listenerLoc.y, soundSourceLoc.x, soundSourceLoc.y);
// set the points at even but randomly jittered locations
for (size_t i = 1; i < numpoints; i++) {
Vector3D start = prevStart;
Vector3D difference = (bouncePoints[i] - bouncePoints[i-1]).scalarMul(0.5f);
Vector3D end = bouncePoints[i-1] + difference;
// printf("Start : %f %f , difference : %f %f \n", start.x, start.y, difference.x, difference.y);
outputGains[i-1] = sqrtf( xAlignedIntegration(listloc, start, end, true))*sqrtf(1.f/M_PI);
inputGains[i-1] = sqrtf(xAlignedIntegration(ssLoc, start, end, false));
// printf("i : %d OutputGains : %f \n", i,outputGains[i-1]);
// printf("i : %d InputGains : %f \n", i,inputGains[i-1]);
prevStart = Vector3D(end.x, end.y);
}
//do the last gain
Vector3D end = bouncePoints[numpoints-1];
outputGains[numpoints-1] = sqrtf(xAlignedIntegration(listloc, prevStart, end, true)) *sqrtf(1.f/M_PI);
inputGains[numpoints-1] = sqrtf(xAlignedIntegration(ssLoc, prevStart, end, false));
printf("OutputGains : %f \n", outputGains[numpoints-1]);
printf("InputGains : %f \n", inputGains[numpoints-1]);
// printf("S loc x : %f , y : %f \n", ssLoc.x, ssLoc.y);
// for (int i = 0; i<numpoints;i++){
// printf("%f,", bouncePoints[i].x);
// }
// printf("\n\n");
// for (int i = 0; i<numpoints;i++){
// printf("%f,", bouncePoints[i].y);
// }
}
//void RoomRayModel::setRayTracingPoints(Vector3D* bouncePoints, Vector3D ssLoc, float rheight, float rwidth, int numpoints,Vector3D listloc){
//
// listenerLoc = listloc;
// soundSourceLoc = ssLoc;
// float yBot = 0.0f-ssLoc.y;
// float yTop = rheight - ssLoc.y;
// float xLeft = 0.0f - ssLoc.x;
// float xRight = rwidth - ssLoc.x;
//
// float w = ssLoc.x;
// float h = ssLoc.y;
//
// for (int i = 0; i < numpoints/2; i++){
// float angle = (360.f / float(numpoints)) * float(i);
// // printf("Angle : %f \n", angle);
// float m = 1.0f/tan(angle * M_PI / 180.f);
// //y = mx + 0
// Vector3D pointArray[4] = {Vector3D(yBot/m, yBot),
// Vector3D(yTop/m, yTop),
// Vector3D(xLeft, m*xLeft),
// Vector3D(xRight, m*xRight)};
//
// for (int j = 0; j< 4; j++){
// float xO = pointArray[j].x + ssLoc.x;
// if (xO > rwidth or xO < 0.0f){
// pointArray[j].mark = false;
// continue;
// }
// float yO = pointArray[j].y + ssLoc.y;
// if (yO > rheight or yO < 0.0f){
// pointArray[j].mark = false;
// continue;
// }
// if (pointArray[j].mark == true){
// //check for x value
// if (pointArray[j].x >= 0){
// bouncePoints[i].x = pointArray[j].x + w;
// bouncePoints[i].y = pointArray[j].y + h;
// }
// else{
// bouncePoints[i+numpoints/2].x = pointArray[j].x + w;
// bouncePoints[i+numpoints/2].y = pointArray[j].y + h;
// }
// }
// }
// }
//
//
//}
| 37.774049
| 218
| 0.579094
|
natalieagus
|
523d124075a4a5ecbaa4b0fd7003d0058aa6e3cf
| 12,371
|
cpp
|
C++
|
src/ObjEdit/(old)/OE_TexEd.cpp
|
rromanchuk/xptools
|
deff017fecd406e24f60dfa6aae296a0b30bff56
|
[
"X11",
"MIT"
] | 71
|
2015-12-15T19:32:27.000Z
|
2022-02-25T04:46:01.000Z
|
src/ObjEdit/(old)/OE_TexEd.cpp
|
rromanchuk/xptools
|
deff017fecd406e24f60dfa6aae296a0b30bff56
|
[
"X11",
"MIT"
] | 19
|
2016-07-09T19:08:15.000Z
|
2021-07-29T10:30:20.000Z
|
src/ObjEdit/(old)/OE_TexEd.cpp
|
rromanchuk/xptools
|
deff017fecd406e24f60dfa6aae296a0b30bff56
|
[
"X11",
"MIT"
] | 42
|
2015-12-14T19:13:02.000Z
|
2022-03-01T15:15:03.000Z
|
/*
* Copyright (c) 2004, Laminar Research.
*
* 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.
*
*/
#include "OE_TexEd.h"
#include "XPLMGraphics.h"
#include "XPWidgets.h"
#include "XPWidgetUtils.h"
#include "XPStandardWidgets.h"
#include "OE_Notify.h"
#include "OE_Msgs.h"
#include "OE_Globals.h"
#include "OE_TexMgr.h"
const float kHandleRad = 3.0; // Handles are about 6 pixels around
const int kMargin = 5; // 5 pixel margin when zoomed out, so we can see handles, etc.
const int kZoomFactor = 16; // Max zoom out is 16x smaller. Makes 64x64 texture size at Max
// Data stored on the actual tex editor widget
const long kHScrollBarID = 1000;
const long kVScrollBarID = 1001;
const long kZoomID = 1002;
const long kCurHandle = 1003;
const long kHandleSlopX = 1004;
const long kHandleSlopY = 1005;
inline float InterpF(float mi, float ma, float v) { return mi + v * (ma - mi); }
inline float GetInterpF(float mi, float ma, float v) { if (ma == mi) return 0.0; return (v - mi) / (ma - mi); }
// second array is s1, s2, t1, t2
int kHandleWriteFlags[9][4] = {
// s1 s2 t1 t2
{ 1, 0, 0, 1 }, // Top left
{ 0, 1, 0, 1 }, // Top right
{ 0, 1, 1, 0 }, // Bot right
{ 1, 0, 1, 0 }, // Bot left
{ 0, 0, 0, 1 }, // Top
{ 0, 1, 0, 0 }, // Right
{ 0, 0, 1, 0 }, // Bottom
{ 1, 0, 0, 0 }, // Left
{ 1, 1, 1, 1 } }; // Center
static void OE_TexEdNotify(int cat, int msg, void * param, void * ref);
static int OE_TexEdFunc( XPWidgetMessage inMessage,
XPWidgetID inWidget,
long inParam1,
long inParam2);
static void ResyncScrollBars(XPWidgetID);
XPWidgetID OE_CreateTexEd(
int x1, int y1, int x2, int y2)
{
XPWidgetID texEd = XPCreateWidget(x1, y2, x2, y1, 1, "Texture Edit", 1, NULL, xpWidgetClass_MainWindow);
XPSetWidgetProperty(texEd, xpProperty_MainWindowHasCloseBoxes, 0);
XPWidgetID vScrollbar = XPCreateWidget(x2-16, y2-18, x2,y1+16, 1, "", 0, texEd, xpWidgetClass_ScrollBar);
XPSetWidgetProperty(vScrollbar, xpProperty_ScrollBarSliderPosition, 0);
XPSetWidgetProperty(vScrollbar, xpProperty_ScrollBarMin, 0);
XPSetWidgetProperty(vScrollbar, xpProperty_ScrollBarMax, 100);
XPWidgetID hScrollbar = XPCreateWidget(x1, y1+16, x2-16,y1, 1, "", 0, texEd, xpWidgetClass_ScrollBar);
XPSetWidgetProperty(hScrollbar, xpProperty_ScrollBarSliderPosition, 0);
XPSetWidgetProperty(hScrollbar, xpProperty_ScrollBarMin, 0);
XPSetWidgetProperty(hScrollbar, xpProperty_ScrollBarMax, 100);
XPWidgetID pane = XPCreateCustomWidget(x1, y2-18, x2-16, y1+16, 1, "", 0, texEd, OE_TexEdFunc);
XPSetWidgetProperty(pane, kHScrollBarID, (long) hScrollbar);
XPSetWidgetProperty(pane, kVScrollBarID, (long) vScrollbar);
XPSetWidgetProperty(pane, xpProperty_Clip, 1);
XPSetWidgetProperty(pane, kZoomID, kZoomFactor);
XPSetWidgetProperty(pane, kCurHandle, -1);
OE_Register(OE_TexEdNotify, pane);
return texEd;
}
void OE_TexEdNotify(int cat, int msg, void * param, void * ref)
{
if ((cat == catagory_Texture && msg == msg_TexLoaded) ||
(cat == catagory_Object && msg == msg_ObjectLoaded))
{
ResyncScrollBars((XPWidgetID) ref);
}
}
void ResyncScrollBars(XPWidgetID me)
{
if (!gObjects.empty())
{
string tex = gObjects[gLevelOfDetail].texture;
if (!tex.empty())
{
int twidth, theight;
if (FindTexture(tex, false, &twidth, &theight))
{
int zoom = XPGetWidgetProperty(me, kZoomID, NULL);
twidth *= zoom;
twidth /= kZoomFactor;
theight *= zoom;
theight /= kZoomFactor;
int t, l, r, b;
XPGetWidgetGeometry(me, &l, &t, &r, &b);
int hScrollDis = twidth - (r - l);
if (hScrollDis < 0) hScrollDis = 0;
int vScrollDis = theight - (t - b);
if (vScrollDis < 0) vScrollDis = 0;
XPSetWidgetProperty((XPWidgetID) XPGetWidgetProperty(me, kHScrollBarID, NULL),
xpProperty_ScrollBarMax, hScrollDis);
XPSetWidgetProperty((XPWidgetID) XPGetWidgetProperty(me, kVScrollBarID, NULL),
xpProperty_ScrollBarMax, vScrollDis);
}
}
}
}
int OE_TexEdFunc( XPWidgetMessage inMessage,
XPWidgetID inWidget,
long inParam1,
long inParam2)
{
if (XPUSelectIfNeeded(inMessage, inWidget, inParam1, inParam2, true)) return 1;
int left, top, right, bottom; // The dimensions of our total pane
int cleft, ctop, cright, cbottom; // The dimensions in which we actually show the texture
int tleft, ttop, tright, tbottom; // The dimensions of the texture in screen coordinates, after zooming, etc.
int hScroll, vScroll; // How far into the texture are we scrolled?
int zoom; // Zoom level
int twidth = 32, theight = 32; // Texture raw dimensions
GLenum texID = 0; // The texture's OGL ID.
float handles[9][2]; // 8 handles in window coords: TL, TR, BR, BL, then T, R, B, L, Center
/*
* Before we do much of anything, we have a ton of geometry data to calculate...
* stuff we'll need both in drawing and mouse tracking.
*
*/
/* Calculate the locations of the window and its parts */
hScroll = XPGetWidgetProperty((XPWidgetID) XPGetWidgetProperty(inWidget, kHScrollBarID, NULL), xpProperty_ScrollBarSliderPosition, NULL);
vScroll = XPGetWidgetProperty((XPWidgetID) XPGetWidgetProperty(inWidget, kVScrollBarID, NULL), xpProperty_ScrollBarSliderPosition, NULL);
XPGetWidgetGeometry(inWidget, &left, &top, &right, &bottom);
cleft = left + kMargin;
cright = right - kMargin;
cbottom = bottom + kMargin;
ctop = top - kMargin;
/* Calculate the texture's location */
if (!gObjects.empty())
{
string tex = gObjects[gLevelOfDetail].texture;
if (!tex.empty())
texID = FindTexture(tex, false, &twidth, &theight);
}
tleft = cleft - hScroll;
tright = tleft + twidth;
ttop = ctop + vScroll;
tbottom = ttop - theight;
zoom = XPGetWidgetProperty(inWidget, kZoomID, NULL);
twidth *= zoom; twidth /= kZoomFactor;
theight *= zoom; theight /= kZoomFactor;
/* Calculate control handle positions */
if (gCurTexture != -1)
{
handles[0][0] = InterpF(tleft, tright, gTextures[gCurTexture].s1);
handles[1][0] = InterpF(tleft, tright, gTextures[gCurTexture].s2);
handles[2][0] = InterpF(tleft, tright, gTextures[gCurTexture].s2);
handles[3][0] = InterpF(tleft, tright, gTextures[gCurTexture].s1);
handles[0][1] = InterpF(tbottom, ttop, gTextures[gCurTexture].t2);
handles[1][1] = InterpF(tbottom, ttop, gTextures[gCurTexture].t2);
handles[2][1] = InterpF(tbottom, ttop, gTextures[gCurTexture].t1);
handles[3][1] = InterpF(tbottom, ttop, gTextures[gCurTexture].t1);
handles[4][0] = InterpF(tleft, tright, InterpF(gTextures[gCurTexture].s1, gTextures[gCurTexture].s2, 0.5));
handles[5][0] = InterpF(tleft, tright, gTextures[gCurTexture].s2);
handles[6][0] = InterpF(tleft, tright, InterpF(gTextures[gCurTexture].s1, gTextures[gCurTexture].s2, 0.5));
handles[7][0] = InterpF(tleft, tright, gTextures[gCurTexture].s1);
handles[4][1] = InterpF(tbottom, ttop, gTextures[gCurTexture].t2);
handles[5][1] = InterpF(tbottom, ttop, InterpF(gTextures[gCurTexture].t1, gTextures[gCurTexture].t2, 0.5));
handles[6][1] = InterpF(tbottom, ttop, gTextures[gCurTexture].t1);
handles[7][1] = InterpF(tbottom, ttop, InterpF(gTextures[gCurTexture].t1, gTextures[gCurTexture].t2, 0.5));
handles[8][0] = InterpF(tleft, tright, InterpF(gTextures[gCurTexture].s1, gTextures[gCurTexture].s2, 0.5));
handles[8][1] = InterpF(tbottom, ttop, InterpF(gTextures[gCurTexture].t1, gTextures[gCurTexture].t2, 0.5));
}
switch(inMessage) {
case xpMsg_Destroy:
OE_Unregister(OE_TexEdNotify, inWidget);
return 1;
case xpMsg_Draw:
{
// First fill in the whole pane with black...better to see things against black.
XPLMSetGraphicsState(0, 0, 0, 0, 0, 0, 0);
glColor3f(0.0, 0.0, 0.0);
glBegin(GL_QUADS);
glVertex2i(left, top);
glVertex2i(right, top);
glVertex2i(right, bottom);
glVertex2i(left, bottom);
glEnd();
// Now draw the texture if we have one.
if (texID)
{
XPLMBindTexture2d(texID, 0);
XPLMSetGraphicsState(0, 1, 0, 1, 1, 0, 0);
} else
XPLMSetGraphicsState(0, 0, 0, 0, 0, 0, 0);
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 1.0); glVertex2i(tleft, ttop);
glTexCoord2f(1.0, 1.0); glVertex2i(tright, ttop);
glTexCoord2f(1.0, 0.0); glVertex2i(tright, tbottom);
glTexCoord2f(0.0, 0.0); glVertex2i(tleft, tbottom);
glEnd();
if (gCurTexture != -1)
{
// Draw the outline of the texture
XPLMSetGraphicsState(0, 0, 0, 0, 0, 0, 0);
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_LINE_LOOP);
for (int n = 0; n < 4; ++n)
glVertex2fv(handles[n]);
glEnd();
// Draw all 8 control handles
glColor3f(0.5, 1.0, 1.0);
glBegin(GL_QUADS);
for (int n = 0; n < 9; ++n)
{
glVertex2f(handles[n][0] - kHandleRad, handles[n][1] + kHandleRad);
glVertex2f(handles[n][0] + kHandleRad, handles[n][1] + kHandleRad);
glVertex2f(handles[n][0] + kHandleRad, handles[n][1] - kHandleRad);
glVertex2f(handles[n][0] - kHandleRad, handles[n][1] - kHandleRad);
}
glEnd();
}
}
return 1;
case xpMsg_MouseDown:
case xpMsg_MouseDrag:
case xpMsg_MouseUp:
{
if (inMessage == xpMsg_MouseDown)
{
XPSetWidgetProperty(inWidget, kCurHandle, -1);
for (int n = 0; n < 9; ++n)
{
if (((handles[n][0] - kHandleRad) < MOUSE_X(inParam1)) &&
((handles[n][0] + kHandleRad) > MOUSE_X(inParam1)) &&
((handles[n][1] - kHandleRad) < MOUSE_Y(inParam1)) &&
((handles[n][1] + kHandleRad) > MOUSE_Y(inParam1)))
{
XPSetWidgetProperty(inWidget, kCurHandle, n);
XPSetWidgetProperty(inWidget, kHandleSlopX, handles[n][0] - MOUSE_X(inParam1));
XPSetWidgetProperty(inWidget, kHandleSlopY, handles[n][1] - MOUSE_Y(inParam1));
}
}
}
int curHandle = XPGetWidgetProperty(inWidget, kCurHandle, NULL);
if (curHandle != -1)
{
int new_handle_x = MOUSE_X(inParam1) + XPGetWidgetProperty(inWidget, kHandleSlopX, NULL);
int new_handle_y = MOUSE_Y(inParam1) + XPGetWidgetProperty(inWidget, kHandleSlopY, NULL);
float s_loc = GetInterpF(tleft, tright, new_handle_x);
float t_loc = GetInterpF(tbottom, ttop, new_handle_y);
if (curHandle == 8)
{
float s_dif = s_loc - InterpF(gTextures[gCurTexture].s1, gTextures[gCurTexture].s2, 0.5);
float t_dif = t_loc - InterpF(gTextures[gCurTexture].t1, gTextures[gCurTexture].t2, 0.5);
gTextures[gCurTexture].s1 += s_dif;
gTextures[gCurTexture].s2 += s_dif;
gTextures[gCurTexture].t1 += t_dif;
gTextures[gCurTexture].t2 += t_dif;
} else {
if (kHandleWriteFlags[curHandle][0]) gTextures[gCurTexture].s1 = s_loc;
if (kHandleWriteFlags[curHandle][1]) gTextures[gCurTexture].s2 = s_loc;
if (kHandleWriteFlags[curHandle][2]) gTextures[gCurTexture].t1 = t_loc;
if (kHandleWriteFlags[curHandle][3]) gTextures[gCurTexture].t2 = t_loc;
}
OE_Notify(catagory_Texture, msg_TexSelectionEdited, NULL);
}
if (inMessage == xpMsg_MouseUp)
XPSetWidgetProperty(inWidget, kCurHandle, -1);
}
return 1;
default:
return 0;
}
}
| 37.038922
| 138
| 0.671005
|
rromanchuk
|
52440254b28103248dafb8f5f404d1aa859146d6
| 1,161
|
cpp
|
C++
|
tests/piecetypetest.cpp
|
bsamseth/Goldfish
|
c99cb9f2b14bbd04e0c2a9ae32b78e074ff6199b
|
[
"MIT"
] | 6
|
2019-01-23T03:13:36.000Z
|
2020-09-06T09:54:48.000Z
|
tests/piecetypetest.cpp
|
bsamseth/Goldfish
|
c99cb9f2b14bbd04e0c2a9ae32b78e074ff6199b
|
[
"MIT"
] | 33
|
2015-12-28T08:48:01.000Z
|
2019-09-25T11:39:53.000Z
|
tests/piecetypetest.cpp
|
bsamseth/Goldfish
|
c99cb9f2b14bbd04e0c2a9ae32b78e074ff6199b
|
[
"MIT"
] | 6
|
2018-08-06T14:05:11.000Z
|
2022-02-15T01:30:49.000Z
|
#include "piecetype.hpp"
#include "gtest/gtest.h"
using namespace goldfish;
TEST(piecetypetest, test_values)
{
for (auto piecetype : PieceTypes::values)
{
EXPECT_EQ(piecetype, PieceTypes::values[piecetype]);
}
}
TEST(piecetypetest, test_is_validPromotion)
{
EXPECT_TRUE(PieceTypes::is_valid_promotion(PieceType::KNIGHT));
EXPECT_TRUE(PieceTypes::is_valid_promotion(PieceType::BISHOP));
EXPECT_TRUE(PieceTypes::is_valid_promotion(PieceType::ROOK));
EXPECT_TRUE(PieceTypes::is_valid_promotion(PieceType::QUEEN));
EXPECT_FALSE(PieceTypes::is_valid_promotion(PieceType::PAWN));
EXPECT_FALSE(PieceTypes::is_valid_promotion(PieceType::KING));
EXPECT_FALSE(PieceTypes::is_valid_promotion(PieceType::NO_PIECE_TYPE));
}
TEST(piecetypetest, test_is_sliding)
{
EXPECT_TRUE(PieceTypes::is_sliding(PieceType::BISHOP));
EXPECT_TRUE(PieceTypes::is_sliding(PieceType::ROOK));
EXPECT_TRUE(PieceTypes::is_sliding(PieceType::QUEEN));
EXPECT_FALSE(PieceTypes::is_sliding(PieceType::PAWN));
EXPECT_FALSE(PieceTypes::is_sliding(PieceType::KNIGHT));
EXPECT_FALSE(PieceTypes::is_sliding(PieceType::KING));
}
| 33.171429
| 75
| 0.763135
|
bsamseth
|
524449190bc2a46790c6c8d6dcc26c611565ef8a
| 2,315
|
cp
|
C++
|
MacOS/Sources/Application/Address_Book/CAddressFieldMultiLine.cp
|
mbert/mulberry-main
|
6b7951a3ca56e01a7be67aa12e55bfeafc63950d
|
[
"ECL-2.0",
"Apache-2.0"
] | 12
|
2015-04-21T16:10:43.000Z
|
2021-11-05T13:41:46.000Z
|
MacOS/Sources/Application/Address_Book/CAddressFieldMultiLine.cp
|
mtalexander/mulberry-main
|
fa6d96ca6ef4401308bddb56518651b4fd866def
|
[
"ECL-2.0",
"Apache-2.0"
] | 2
|
2015-11-02T13:32:11.000Z
|
2019-07-10T21:11:21.000Z
|
MacOS/Sources/Application/Address_Book/CAddressFieldMultiLine.cp
|
mtalexander/mulberry-main
|
fa6d96ca6ef4401308bddb56518651b4fd866def
|
[
"ECL-2.0",
"Apache-2.0"
] | 6
|
2015-01-12T08:49:12.000Z
|
2021-03-27T09:11:10.000Z
|
/*
Copyright (c) 2007-2011 Cyrus Daboo. 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.
*/
// Source for CAddressFieldMultiLine class
#include "CAddressFieldMultiLine.h"
#include "CStaticText.h"
#include "CTextDisplay.h"
#include <LPopupButton.h>
// C O N S T R U C T I O N / D E S T R U C T I O N M E T H O D S
// Default constructor
CAddressFieldMultiLine::CAddressFieldMultiLine()
{
}
// Constructor from stream
CAddressFieldMultiLine::CAddressFieldMultiLine(LStream *inStream)
: CAddressFieldBase(inStream)
{
}
// Default destructor
CAddressFieldMultiLine::~CAddressFieldMultiLine()
{
}
// O T H E R M E T H O D S ____________________________________________________________________________
// Get details of sub-panes
void CAddressFieldMultiLine::FinishCreateSelf(void)
{
// Do inherited
CAddressFieldBase::FinishCreateSelf();
// Get controls
mData = (CTextDisplay*) mDataMove;
mDataMove = (LView*) FindPaneByID(paneid_AddressFieldBaseMove);
// Link controls to this window
UReanimator::LinkListenerToBroadcasters(this, this, RidL_CAddressFieldMultiLineBtns);
}
void CAddressFieldMultiLine::SetDetails(const cdstring& title, int type, const cdstring& data)
{
// Cache this to check for changes later
mOriginalType = type;
mOriginalData = data;
mTitle->SetText(title);
if (mUsesType)
mType->SetValue(type + 1);
mData->SetText(data);
}
bool CAddressFieldMultiLine::GetDetails(int& newtype, cdstring& newdata)
{
bool changed = false;
if (mUsesType)
{
newtype = mType->GetValue() - 1;
if (newtype != mOriginalType)
changed = true;
}
mData->GetText(newdata);
if (newdata != mOriginalData)
changed = true;
return changed;
}
| 25.722222
| 104
| 0.710583
|
mbert
|
52460eeb9adc725637203e933192aa1e2ff4fe28
| 527
|
cpp
|
C++
|
Curso/AULA 43,44 e 45 - ARQUIVOS/exemplo/src/main.cpp
|
vandodiniz/CursoC--
|
ba979bae23292a59941437dee478f51e7e357abb
|
[
"MIT"
] | 1
|
2022-03-07T21:40:38.000Z
|
2022-03-07T21:40:38.000Z
|
Curso/AULA 43,44 e 45 - ARQUIVOS/exemplo/src/main.cpp
|
vandodiniz/CursoC--
|
ba979bae23292a59941437dee478f51e7e357abb
|
[
"MIT"
] | null | null | null |
Curso/AULA 43,44 e 45 - ARQUIVOS/exemplo/src/main.cpp
|
vandodiniz/CursoC--
|
ba979bae23292a59941437dee478f51e7e357abb
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <fstream>
#include <stdio.h>
using namespace std;
int main() {
char seps[]=",";
int camisa, pool;
string linha;
char *nome, *func;
int maiorPool = 0;
string maiorNome;
fstream arquivo;
arquivo.open("clash.txt",ios::in);
if(arquivo.is_open()){
while(!arquivo.eof()){
getline(arquivo,linha);
camisa = atoi(strktok(&linha[0],seps));
}
arquivo.close();
}
else
cout << "Erro ao abrir arquivo";
}
| 17
| 51
| 0.552182
|
vandodiniz
|
524762c3f33652de9620a276dcfd14dc99f2c40e
| 3,971
|
cc
|
C++
|
lite/backends/nnadapter/nnadapter/src/operation/gather.cc
|
Danielmic/Paddle-Lite
|
8bf08425035cfae077754ac72629292fac7bb996
|
[
"Apache-2.0"
] | 808
|
2018-04-17T17:43:12.000Z
|
2019-08-18T07:39:13.000Z
|
lite/backends/nnadapter/nnadapter/src/operation/gather.cc
|
Danielmic/Paddle-Lite
|
8bf08425035cfae077754ac72629292fac7bb996
|
[
"Apache-2.0"
] | 728
|
2018-04-18T08:15:25.000Z
|
2019-08-16T07:14:43.000Z
|
lite/backends/nnadapter/nnadapter/src/operation/gather.cc
|
Danielmic/Paddle-Lite
|
8bf08425035cfae077754ac72629292fac7bb996
|
[
"Apache-2.0"
] | 364
|
2018-04-18T17:05:02.000Z
|
2019-08-18T03:25:38.000Z
|
// Copyright (c) 2021 PaddlePaddle 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.
#include "operation/gather.h"
#include "core/types.h"
#include "operation/math/gather.h"
#include "utility/debug.h"
#include "utility/hints.h"
#include "utility/logging.h"
#include "utility/micros.h"
#include "utility/modeling.h"
#include "utility/utility.h"
namespace nnadapter {
namespace operation {
NNADAPTER_EXPORT bool ValidateGather(const core::Operation* operation) {
return false;
}
NNADAPTER_EXPORT int PrepareGather(core::Operation* operation) {
GATHER_OPERATION_EXTRACT_INPUTS_OUTPUTS
// Infer the shape and type of output operands
CopyOperandTypeExceptQuantParams(&output_operand->type, input_operand->type);
output_operand->type.lifetime = NNADAPTER_TEMPORARY_VARIABLE;
auto& in_dims = input_operand->type.dimensions;
auto& ids_dims = indices_operand->type.dimensions;
auto& out_dims = output_operand->type.dimensions;
int32_t in_count = in_dims.count;
int32_t ids_count = ids_dims.count;
out_dims.count = in_count + ids_count - 1;
auto infer_output_shape = [&](const int32_t* in_dims_data,
const int32_t* ids_dims_data,
int32_t* out_dims_data) {
memcpy(out_dims_data, in_dims_data, sizeof(int32_t) * axis);
memcpy(out_dims_data + axis, ids_dims_data, sizeof(int32_t) * ids_count);
memcpy(out_dims_data + axis + ids_count,
in_dims_data + axis + 1,
sizeof(int32_t) * (in_count - axis));
};
infer_output_shape(in_dims.data, ids_dims.data, out_dims.data);
for (uint32_t i = 0; i < in_dims.dynamic_count; i++) {
infer_output_shape(in_dims.dynamic_data[i],
ids_dims.dynamic_data[i],
out_dims.dynamic_data[i]);
}
if (IsTemporaryShapeOperand(input_operand) &&
IsConstantOperand(indices_operand)) {
auto indices = reinterpret_cast<int32_t*>(indices_operand->buffer);
auto indices_count =
indices_operand->length / static_cast<uint32_t>(sizeof(int32_t));
output_operand->type.lifetime = NNADAPTER_TEMPORARY_SHAPE;
auto& temporary_shape = *(GetTemporaryShape(input_operand));
NNADAPTER_CHECK(temporary_shape.data);
NNADAPTER_CHECK(temporary_shape.data[0]);
NNAdapterOperandDimensionType dimension_type;
dimension_type.count = output_operand->type.dimensions.data[0];
dimension_type.dynamic_count = input_operand->type.dimensions.dynamic_count;
math::gather<int32_t>(
temporary_shape.data,
std::vector<int32_t>({static_cast<int32_t>(temporary_shape.count)}),
indices,
std::vector<int32_t>({static_cast<int32_t>(indices_count)}),
axis,
dimension_type.data);
for (uint32_t i = 0; i < dimension_type.dynamic_count; i++) {
math::gather<int32_t>(
temporary_shape.dynamic_data[i],
std::vector<int32_t>({static_cast<int32_t>(temporary_shape.count)}),
indices,
std::vector<int32_t>({static_cast<int32_t>(indices_count)}),
axis,
dimension_type.dynamic_data[i]);
}
SetTemporaryShape(output_operand, dimension_type);
}
NNADAPTER_VLOG(5) << "output: " << OperandToString(output_operand);
return NNADAPTER_NO_ERROR;
}
NNADAPTER_EXPORT int ExecuteGather(core::Operation* operation) {
return NNADAPTER_FEATURE_NOT_SUPPORTED;
}
} // namespace operation
} // namespace nnadapter
| 38.553398
| 80
| 0.712163
|
Danielmic
|
5247804ebba4a87ff0167d502f6f65835e7d783b
| 3,470
|
cpp
|
C++
|
test/unit_test/patterns/factory/unit_test_copy_factory.cpp
|
bvanessen/DiHydrogen
|
62e52e22184556a028750bb73d8aed92cedb8884
|
[
"ECL-2.0",
"Apache-2.0"
] | 3
|
2020-01-06T17:26:58.000Z
|
2021-12-11T01:17:43.000Z
|
test/unit_test/patterns/factory/unit_test_copy_factory.cpp
|
bvanessen/DiHydrogen
|
62e52e22184556a028750bb73d8aed92cedb8884
|
[
"ECL-2.0",
"Apache-2.0"
] | 7
|
2020-02-26T06:07:42.000Z
|
2022-02-15T22:51:36.000Z
|
test/unit_test/patterns/factory/unit_test_copy_factory.cpp
|
bvanessen/DiHydrogen
|
62e52e22184556a028750bb73d8aed92cedb8884
|
[
"ECL-2.0",
"Apache-2.0"
] | 6
|
2020-01-06T18:08:42.000Z
|
2021-07-26T14:53:07.000Z
|
////////////////////////////////////////////////////////////////////////////////
// Copyright 2019-2020 Lawrence Livermore National Security, LLC and other
// DiHydrogen Project Developers. See the top-level LICENSE file for details.
//
// SPDX-License-Identifier: Apache-2.0
////////////////////////////////////////////////////////////////////////////////
#include <catch2/catch.hpp>
#include <h2/patterns/factory/CopyFactory.hpp>
#include <memory>
#include <typeinfo>
namespace h2
{
template <typename T>
std::unique_ptr<T> ToUnique(T* ptr)
{
return std::unique_ptr<T>(ptr);
}
} // namespace h2
namespace
{
struct WidgetBase
{
virtual int Data() const noexcept = 0;
virtual ~WidgetBase() = default;
};
struct Widget : WidgetBase
{
Widget(int d) : data_(d) {}
Widget* Copy() const { return new Widget(*this); }
int Data() const noexcept override { return data_; }
int data_;
};
struct Gizmo : WidgetBase
{
Gizmo(int d) : data_(d) {}
std::unique_ptr<Gizmo> Clone() const
{
return h2::ToUnique(new Gizmo(*this));
}
int Data() const noexcept override { return data_; }
int data_;
};
std::unique_ptr<WidgetBase> CopyGizmo(WidgetBase const& obj)
{
auto const& gizmo = dynamic_cast<Gizmo const&>(obj);
return gizmo.Clone();
}
std::unique_ptr<WidgetBase> CopyWidget(WidgetBase const& obj)
{
auto const& widget = dynamic_cast<Widget const&>(obj);
return h2::ToUnique(widget.Copy());
}
} // namespace
TEST_CASE("testing the copy factory class", "[factory][utilities]")
{
using WidgetFactory = h2::factory::CopyFactory<WidgetBase>;
WidgetFactory factory;
SECTION("Register new classes")
{
CHECK(factory.register_builder(typeid(Gizmo), CopyGizmo));
CHECK(factory.register_builder(typeid(Widget), CopyWidget));
CHECK(factory.size() == 2UL);
SECTION("Re-registering a type fails.")
{
CHECK_FALSE(factory.register_builder(typeid(Widget), CopyWidget));
CHECK(factory.size() == 2UL);
}
SECTION("Copy objects by concrete type")
{
Widget w(17);
auto w2 = factory.copy_object(w);
auto const& w2_ref = *w2;
CHECK(w2->Data() == w.Data());
CHECK(typeid(w2_ref) == typeid(w));
Gizmo g(13);
auto g2 = factory.copy_object(g);
auto const& g2_ref = *g2;
CHECK(g2->Data() == g.Data());
CHECK(typeid(g2_ref) == typeid(g));
}
SECTION("Copy objects through base type")
{
auto g = std::unique_ptr<WidgetBase>(new Gizmo(37));
auto w = std::unique_ptr<WidgetBase>(new Widget(73));
auto w2 = factory.copy_object(*w);
auto g2 = factory.copy_object(*g);
CHECK(w2->Data() == w->Data());
CHECK(g2->Data() == g->Data());
}
SECTION("Get list of supported types")
{
auto names = factory.registered_types();
CHECK(names.size() == factory.size());
}
SECTION("Unregister types.")
{
CHECK(factory.unregister(typeid(Widget)));
CHECK(factory.size() == 1UL);
CHECK(factory.unregister(typeid(Gizmo)));
CHECK(factory.size() == 0UL);
}
}
SECTION("Cannot copy unregistered widgets")
{
Gizmo g(13);
CHECK_THROWS(factory.copy_object(g));
}
}
| 25.703704
| 80
| 0.563112
|
bvanessen
|
5250d23eb93b67242ce7adcb1c49443d482be03b
| 1,177
|
cpp
|
C++
|
thdatwrapper.cpp
|
BearKidsTeam/thplayer
|
54db11c02ad5fb7b6534b93e5c2ef03ecb91bc03
|
[
"BSD-2-Clause"
] | 13
|
2019-01-02T13:52:09.000Z
|
2022-01-30T10:17:01.000Z
|
thdatwrapper.cpp
|
BearKidsTeam/thplayer
|
54db11c02ad5fb7b6534b93e5c2ef03ecb91bc03
|
[
"BSD-2-Clause"
] | null | null | null |
thdatwrapper.cpp
|
BearKidsTeam/thplayer
|
54db11c02ad5fb7b6534b93e5c2ef03ecb91bc03
|
[
"BSD-2-Clause"
] | 1
|
2018-11-20T04:41:53.000Z
|
2018-11-20T04:41:53.000Z
|
#include "thdatwrapper.hpp"
#include <cstdlib>
#include <cstring>
thDatWrapper::thDatWrapper(const char *datpath,unsigned ver)
{
thtk_error_t *e=NULL;
datf=thtk_io_open_file(datpath,"rb",&e);
thtk_error_free(&e);
dat=thdat_open(ver,datf,&e);
if(!dat)
//just try the latest supported version instead
{
thtk_error_free(&e);
dat=thdat_open(17,datf,&e);
}
thtk_error_free(&e);
}
ssize_t thDatWrapper::getFileSize(const char *path)
{
thtk_error_t *e=NULL;
int en=thdat_entry_by_name(dat,path,&e);
thtk_error_free(&e);
if(!~en)return -1;
return thdat_entry_get_size(dat,en,&e);
}
int thDatWrapper::getFile(const char *path,char *dest)
{
thtk_error_t *e=NULL;
int en=thdat_entry_by_name(dat,path,&e);
thtk_error_free(&e);
if(!~en)return -1;
ssize_t sz=thdat_entry_get_size(dat,en,&e);
thtk_error_free(&e);
void *m=malloc(sz);
thtk_io_t* mf=thtk_io_open_memory(m,sz,&e);
thtk_error_free(&e);
ssize_t r=thdat_entry_read_data(dat,en,mf,&e);
if(!~r)return -1;
thtk_error_free(&e);
memcpy(dest,m,sz);
thtk_io_close(mf);
return 0;
}
thDatWrapper::~thDatWrapper()
{
thtk_error_t *e=NULL;
thdat_close(dat,&e);
thtk_error_free(&e);
thtk_io_close(datf);
}
| 22.634615
| 60
| 0.724724
|
BearKidsTeam
|
525f30084180d15cc0be1cec8c6b4f3cc4d13a28
| 745
|
cpp
|
C++
|
oop_ex24.cpp
|
85105/HW
|
2161a1a7ac1082a85454672d359c00f2d42ef21f
|
[
"MIT"
] | null | null | null |
oop_ex24.cpp
|
85105/HW
|
2161a1a7ac1082a85454672d359c00f2d42ef21f
|
[
"MIT"
] | null | null | null |
oop_ex24.cpp
|
85105/HW
|
2161a1a7ac1082a85454672d359c00f2d42ef21f
|
[
"MIT"
] | null | null | null |
/* oop_ex24.cpp
dynamic 2D array using new and delete */
#include <iostream>
using namespace std;
void main()
{
// obtain the matrix size from user
int size;
cout << "Please input the size of the square matrix." << endl;
cin >> size;
// create the matrix using new
int** m = new int*[size];
for (int i = 0; i<size; i++)
m[i] = new int[size];
// assign the values to the created matrix
for (int i = 0; i<size; i++)
for (int j = 0; j<size; j++)
m[i][j] = i + j;
// show the matrix on the screen
for (int i = 0; i<size; i++)
{
for (int j = 0; j<size; j++)
cout << m[i][j] << " ";
cout << endl;
}
// release the matrix using delete
for (int i = 0; i<size; i++)
delete m[i];
delete m;
system("pause");
}
| 16.555556
| 63
| 0.575839
|
85105
|
5263bf24530cc7230166ab82f9e372d55ef2963c
| 26
|
cpp
|
C++
|
source/vgraphics/opengl/unused/vix_glmodel.cpp
|
ritgraphics/VixenEngine
|
294a6c69b015ec8bce7920f604176e4f92ffba23
|
[
"MIT"
] | null | null | null |
source/vgraphics/opengl/unused/vix_glmodel.cpp
|
ritgraphics/VixenEngine
|
294a6c69b015ec8bce7920f604176e4f92ffba23
|
[
"MIT"
] | 3
|
2015-10-28T01:29:03.000Z
|
2015-11-10T15:20:02.000Z
|
source/vgraphics/opengl/unused/vix_glmodel.cpp
|
ritgraphics/VixenEngine
|
294a6c69b015ec8bce7920f604176e4f92ffba23
|
[
"MIT"
] | null | null | null |
#include <vix_glmodel.h>
| 8.666667
| 24
| 0.730769
|
ritgraphics
|
5266eaf478d912daf91cd52c27e984db42cb1c43
| 688
|
cpp
|
C++
|
solved/PT07Y.cpp
|
mrpandey/spoj
|
d63378200806e595af2958b15e757383bed692cd
|
[
"WTFPL"
] | 4
|
2018-04-23T18:37:09.000Z
|
2019-04-03T16:28:02.000Z
|
solved/PT07Y.cpp
|
mrpandey/spoj
|
d63378200806e595af2958b15e757383bed692cd
|
[
"WTFPL"
] | null | null | null |
solved/PT07Y.cpp
|
mrpandey/spoj
|
d63378200806e595af2958b15e757383bed692cd
|
[
"WTFPL"
] | 1
|
2021-07-01T03:54:33.000Z
|
2021-07-01T03:54:33.000Z
|
#include<iostream>
#include<vector>
#include<queue>
using namespace std;
int main(){
//ios::sync_with_stdio(false);
int n, m; cin >> n >> m;
if(n-m!=1) {cout << "NO\n"; return 0;}
vector<vector<int> > adj(n, vector<int>());
int u, v;
for(int i=0; i<m; i++){
cin >> u >> v;
adj[u-1].push_back(v-1);
adj[v-1].push_back(u-1);
}
int comp=1;
queue<int> q;
vector<bool> vis(n, false);
q.push(0);
while(!q.empty()){
int u = q.front();
vis[u] = true;
q.pop();
for(int i=0; i<adj[u].size(); i++){
v = adj[u][i];
if(vis[v]) continue;
q.push(v);
}
}
for(int i=0; i<n; i++){
if(!vis[i]){
cout << "NO\n";
return 0;
}
}
cout << "YES\n";
return 0;
}
| 17.2
| 44
| 0.526163
|
mrpandey
|
5278d45c9ec457ca7bb2f5c797ad4bca1e02ebc1
| 20
|
cpp
|
C++
|
Ursa/src/ursapch.cpp
|
quiniks/Ursa
|
4f6c7c153d9d4c2ccb4c42f06d2fa88910d15c8c
|
[
"Apache-2.0"
] | null | null | null |
Ursa/src/ursapch.cpp
|
quiniks/Ursa
|
4f6c7c153d9d4c2ccb4c42f06d2fa88910d15c8c
|
[
"Apache-2.0"
] | null | null | null |
Ursa/src/ursapch.cpp
|
quiniks/Ursa
|
4f6c7c153d9d4c2ccb4c42f06d2fa88910d15c8c
|
[
"Apache-2.0"
] | null | null | null |
#include "ursapch.h"
| 20
| 20
| 0.75
|
quiniks
|
5279fd930680f6b1642fd5eb1943d8bae0d1492a
| 2,350
|
cpp
|
C++
|
src/zk/connection_tests.cpp
|
vexingcodes/zookeeper-cpp
|
9dce1fce5370ecfdad713caf411a5ae9b851db33
|
[
"Apache-2.0"
] | 126
|
2017-08-09T22:26:09.000Z
|
2022-01-21T22:39:46.000Z
|
src/zk/connection_tests.cpp
|
vexingcodes/zookeeper-cpp
|
9dce1fce5370ecfdad713caf411a5ae9b851db33
|
[
"Apache-2.0"
] | 97
|
2017-08-09T23:08:41.000Z
|
2022-03-29T21:54:24.000Z
|
src/zk/connection_tests.cpp
|
vexingcodes/zookeeper-cpp
|
9dce1fce5370ecfdad713caf411a5ae9b851db33
|
[
"Apache-2.0"
] | 38
|
2017-08-11T00:33:17.000Z
|
2021-05-13T09:19:27.000Z
|
#include <zk/tests/test.hpp>
#include "connection.hpp"
namespace zk
{
// This test is mostly to check that we still use the defaults.
GTEST_TEST(connection_params_tests, defaults)
{
const auto res = connection_params::parse("zk://localhost/");
CHECK_EQ("zk", res.connection_schema());
CHECK_EQ(1U, res.hosts().size());
CHECK_EQ("localhost", res.hosts()[0]);
CHECK_EQ("/", res.chroot());
CHECK_TRUE(res.randomize_hosts());
CHECK_FALSE(res.read_only());
CHECK_TRUE(connection_params::default_timeout == res.timeout());
connection_params manual;
manual.hosts() = { "localhost" };
CHECK_EQ(manual, res);
}
GTEST_TEST(connection_params_tests, multi_hosts)
{
const auto res = connection_params::parse("zk://server-a,server-b,server-c/");
connection_params manual;
manual.hosts() = { "server-a", "server-b", "server-c" };
CHECK_EQ(manual, res);
}
GTEST_TEST(connection_params_tests, chroot)
{
const auto res = connection_params::parse("zk://localhost/some/sub/path");
connection_params manual;
manual.hosts() = { "localhost" };
manual.chroot() = "/some/sub/path";
CHECK_EQ(manual, res);
}
GTEST_TEST(connection_params_tests, randomize_hosts)
{
const auto res = connection_params::parse("zk://localhost/?randomize_hosts=false");
connection_params manual;
manual.hosts() = { "localhost" };
manual.randomize_hosts() = false;
CHECK_EQ(manual, res);
}
GTEST_TEST(connection_params_tests, read_only)
{
const auto res = connection_params::parse("zk://localhost/?read_only=true");
connection_params manual;
manual.hosts() = { "localhost" };
manual.read_only() = true;
CHECK_EQ(manual, res);
}
GTEST_TEST(connection_params_tests, randomize_and_read_only)
{
const auto res = connection_params::parse("zk://localhost/?randomize_hosts=false&read_only=1");
connection_params manual;
manual.hosts() = { "localhost" };
manual.randomize_hosts() = false;
manual.read_only() = true;
CHECK_EQ(manual, res);
}
GTEST_TEST(connection_params_tests, timeout)
{
const auto res = connection_params::parse("zk://localhost/?timeout=0.5");
connection_params manual;
manual.hosts() = { "localhost" };
manual.timeout() = std::chrono::milliseconds(500);
CHECK_EQ(manual, res);
}
}
| 29.375
| 99
| 0.680851
|
vexingcodes
|
527a4107bc4e574ccc3c8ac5610b866f797ccd82
| 6,209
|
hpp
|
C++
|
include/instr/instruction_set.hpp
|
jaller200/comp4300-project3
|
f2106f6acaf44a84b3cb305b7c8f345bf037efae
|
[
"BSL-1.0"
] | null | null | null |
include/instr/instruction_set.hpp
|
jaller200/comp4300-project3
|
f2106f6acaf44a84b3cb305b7c8f345bf037efae
|
[
"BSL-1.0"
] | null | null | null |
include/instr/instruction_set.hpp
|
jaller200/comp4300-project3
|
f2106f6acaf44a84b3cb305b7c8f345bf037efae
|
[
"BSL-1.0"
] | null | null | null |
#pragma once
#include "instr/instruction_handler.hpp"
#include "instr/instruction_metadata.hpp"
#include "instr/instruction_parser.hpp"
#include "instr/instruction_type.hpp"
#include "pipeline/execution_buffer.hpp"
#include "pipeline/instruction_decode_buffer.hpp"
#include "pipeline/instruction_fetch_buffer.hpp"
#include "pipeline/memory_buffer.hpp"
#include "types.hpp"
#include <array>
#include <memory>
#include <string>
#include <unordered_map>
/**
* A basic class that holds an instruction set.
*
* Instructions will be registered by Opcode & Function (if defined) as a key:
*
* Opcode : 6 bits
* Function : 6 bits
*
* Registration will be done with 16 bits, where the first 6 bits are the opcode
* and the second 6 bits are the function (if necessary). This way I-Type (opcode 0)
* instructions can be stored just as easily as R-Type and branch.
*/
class InstructionSet {
public:
// MARK: -- Public Types
/** Instruction Opcode/Funct Keys (lower 8 bits = opcode, upper 8 bits = funct) */
using instr_id_t = hword_t;
// MARK: -- Construction
InstructionSet();
~InstructionSet() = default;
// MARK: -- Getter Methods
/**
* Returns an instruction handler for the opcode/funct pair.
* @param opcode The opcode
* @param funct The function
* @return A raw pointer to the instruction handler, or nullptr if not found
*/
InstructionHandler * getInstructionHandler(word_t opcode, word_t funct) const;
/**
* Returns an instruction parser for the name. Trims and converts the
* name to lower case.
* @param name The name
* @return A raw pointer to the instruction parser, or nullptr if not found
*/
InstructionParser * getInstructionParser(const std::string& name) const;
// MARK: -- Registration Methods
/**
* Registers an I-Type instruction with the instruction set.
* If the opcode is registered to another type, this will fail.
*
* In addition, the name will automatically be converted to lower case.
* If there is a duplicate name found, or the name contains whitespace, this
* returns false.
*
* @param name The name
* @param opcode The opcode
* @param parser The parser for the instruction
* @param handler The handler for the instruction
* @return Whether or not the registration succeeded
*/
bool registerIType(const std::string& name, word_t opcode, std::unique_ptr<InstructionParser> parser, std::unique_ptr<InstructionHandler> handler);
/**
* Registers a J-Type instruction with the instruction set.
* If the opcode is registered to another type, this will fail.
*
* In addition, the name will automatically be converted to lower case.
* If there is a duplicate name found, or if the name contains any
* whitespace, this returns false.
*
* @param name The name
* @param opcode The opcode
* @param parser The parser for the instruction
* @param handler The handler for the instruction
* @return Whether or not the registration succeeded
*/
bool registerJType(const std::string& name, word_t opcode, std::unique_ptr<InstructionParser> parser, std::unique_ptr<InstructionHandler> handler);
/**
* Registers an R-Type instruction with the instruction set.
*
* If the opcode is registered as R-type, and there is a duplicate funct,
* or if the opcode is registered as another type, this returns false.
*
* In addition, the name is automatically converted to lower case. If there
* is a duplicate name found, or the name contains whitespace, the function
* returns false.
*
* @param name The name
* @param opcode The opcode
* @param funct The function
* @param parser The parser for the instruction
* @param handler The handler for the instruction
* @return Whether or not the registration succeeded
*/
bool registerRType(const std::string& name, word_t opcode, word_t funct, std::unique_ptr<InstructionParser> parser, std::unique_ptr<InstructionHandler> handler);
// MARK: -- Psuedo Registration Methods
/**
* Registers a psuedo instruction type (no opcode / name)
* @param name The name
* @param parser The parser
* @return Whether or not the registration succeeded
*/
bool registerPsuedoType(const std::string& name, std::unique_ptr<InstructionParser> parser);
// MARK: -- Getter Methods
/**
* Returns the instruction type for an opcode
* @param opcode The opcode
* @return The instruction type, or UNKNOWN
*/
InstructionType getType(word_t opcode) const;
/**
* Returns the instruction type for an instruction name. Converts the
* name to lower case first.
* @param name The name
* @return The instruction type, or UNKNOWN
*/
InstructionType getType(const std::string& name) const;
private:
// MARK: -- Private Variables;
/** An array marking the registered type of the opcode. */
std::array<InstructionType, Instruction::LIMIT_OPCODE+1> m_arrOpcodeTypes;
/** A map of instruction names to instruction metadata. */
std::unordered_map<std::string, std::shared_ptr<InstructionMetadata>> m_mapNameToMetadata;
/** A map of instruction IDs (opcode/funct) to instruction metadata. */
std::unordered_map<instr_id_t, std::shared_ptr<InstructionMetadata>> m_mapIDToMetadata;
// MARK: -- Private Methods
/**
* A private method to handle instruction registration.
* @param name The name to register with
* @param opcode The opcode to register with
* @param funct The funct to register with
* @param type The type to register with
* @param parser The parser to register with
* @param handler The handler to register with
* @return True if successfully registered, false if the name, opcode, funct, or metadata are invalid or null
*/
bool registerInstruction(const std::string& name, word_t opcode, word_t funct, InstructionType type, std::unique_ptr<InstructionParser> parser, std::unique_ptr<InstructionHandler> handler);
};
| 36.098837
| 193
| 0.692865
|
jaller200
|
527e58590ab1a684db26d01f832b8b83e76c5fa2
| 235
|
cpp
|
C++
|
Chapter12/Exercise75/Exercise75.cpp
|
Siddharth-Puhan/The-CPP-Workshop
|
220fbcf89d3d35b875ecadc885405984304ca9c6
|
[
"MIT"
] | 86
|
2020-03-23T20:50:05.000Z
|
2022-02-19T21:41:38.000Z
|
Chapter12/Exercise75/Exercise75.cpp
|
Siddharth-Puhan/The-CPP-Workshop
|
220fbcf89d3d35b875ecadc885405984304ca9c6
|
[
"MIT"
] | 7
|
2020-02-14T12:14:39.000Z
|
2021-12-27T09:15:01.000Z
|
Chapter12/Exercise75/Exercise75.cpp
|
Siddharth-Puhan/The-CPP-Workshop
|
220fbcf89d3d35b875ecadc885405984304ca9c6
|
[
"MIT"
] | 66
|
2020-03-23T22:25:17.000Z
|
2022-02-01T09:01:41.000Z
|
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector < int > vec = {1,2,3,4,5,6,7,8,9,10};
for (auto v: vec)
{
cout << v << " ";
}
cout << vec[3];
return 0;
}
| 12.368421
| 48
| 0.451064
|
Siddharth-Puhan
|
528b90db80b723eace4d1fd5b780da15a9dc2686
| 2,748
|
cc
|
C++
|
Source/Content/Asset.cc
|
dkrutsko/OpenGL-Engine
|
2e61e6f9106a03915a21aba94c81af2360cc85bf
|
[
"Zlib"
] | 3
|
2016-01-05T05:04:35.000Z
|
2020-01-08T22:17:14.000Z
|
Source/Content/Asset.cc
|
dkrutsko/OpenGL-Engine
|
2e61e6f9106a03915a21aba94c81af2360cc85bf
|
[
"Zlib"
] | null | null | null |
Source/Content/Asset.cc
|
dkrutsko/OpenGL-Engine
|
2e61e6f9106a03915a21aba94c81af2360cc85bf
|
[
"Zlib"
] | null | null | null |
////////////////////////////////////////////////////////////////////////////////
// -------------------------------------------------------------------------- //
// //
// (C) 2012-2013 David Krutsko //
// See LICENSE.md for copyright //
// //
// -------------------------------------------------------------------------- //
////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------//
// Prefaces //
//----------------------------------------------------------------------------//
#include "Content/Asset.h"
#include "Content/Content.h"
#include "Engine/Console.h"
//----------------------------------------------------------------------------//
// Static Asset //
//----------------------------------------------------------------------------//
quint16 Asset::mAssetIDCounter = 0;
//----------------------------------------------------------------------------//
// Constructors Asset //
//----------------------------------------------------------------------------//
////////////////////////////////////////////////////////////////////////////////
/// <summary> </summary>
Asset::Asset (quint16 assetID)
{
mReferences = 1;
mAssetID = assetID;
mManaged = false;
}
////////////////////////////////////////////////////////////////////////////////
/// <summary> </summary>
Asset::Asset (const Asset& asset)
{
mReferences = 1;
mManaged = false;
mAssetID = asset.mAssetID;
mSource = asset.mSource;
}
//----------------------------------------------------------------------------//
// Methods Asset //
//----------------------------------------------------------------------------//
////////////////////////////////////////////////////////////////////////////////
/// <summary> </summary>
void Asset::Retain (void)
{
++mReferences;
}
////////////////////////////////////////////////////////////////////////////////
/// <summary> </summary>
void Asset::Release (bool force)
{
// Check if the asset needs to be deleted
if (force || mReferences == 1)
{
// Asset is managed by the content manager
if (mManaged) Content::mLoaded.remove (mSource);
// Delete asset
delete this;
}
// Decrement references
else --mReferences;
}
| 32.329412
| 80
| 0.227074
|
dkrutsko
|
5290908f40b27ecb84dd434ea61817b34b578087
| 273
|
cpp
|
C++
|
Exercicios/Exercicios C - Uri #2/1070.cpp
|
yunger7/SENAI
|
85093e0ce3ed83e50dcd570d7c42b1dda4111929
|
[
"MIT"
] | 1
|
2020-09-07T12:19:27.000Z
|
2020-09-07T12:19:27.000Z
|
Exercicios/Exercicios C - Uri #2/1070.cpp
|
yunger7/SENAI
|
85093e0ce3ed83e50dcd570d7c42b1dda4111929
|
[
"MIT"
] | null | null | null |
Exercicios/Exercicios C - Uri #2/1070.cpp
|
yunger7/SENAI
|
85093e0ce3ed83e50dcd570d7c42b1dda4111929
|
[
"MIT"
] | null | null | null |
#include <iostream>
using namespace std;
int main() {
int x=0;
scanf("%d",&x);
if (x % 2 == 0){
x++;
for (int c = 1; c <= 6; c++){
printf("%d\n",x);
x += 2;
}
} else {
for (int c = 1; c <= 6; c++){
printf("%d\n",x);
x += 2;
}
}
return 0;
}
| 10.92
| 31
| 0.410256
|
yunger7
|
52a4dbe5f32625a9707455c1890d974e04646835
| 374
|
cpp
|
C++
|
cfi/call-wrong-num-func-vtable-stack.cpp
|
comparch-security/cpu-sec-bench
|
34506323a80637fae2a4d2add3bbbdaa4e6d8473
|
[
"MIT"
] | 4
|
2021-11-12T03:41:54.000Z
|
2022-02-28T12:23:49.000Z
|
cfi/call-wrong-num-func-vtable-stack.cpp
|
comparch-security/cpu-sec-bench
|
34506323a80637fae2a4d2add3bbbdaa4e6d8473
|
[
"MIT"
] | null | null | null |
cfi/call-wrong-num-func-vtable-stack.cpp
|
comparch-security/cpu-sec-bench
|
34506323a80637fae2a4d2add3bbbdaa4e6d8473
|
[
"MIT"
] | 1
|
2021-11-29T08:38:28.000Z
|
2021-11-29T08:38:28.000Z
|
#include <cstdlib>
#include "include/cfi.hpp"
void fake_func() {
exit(0);
}
int main() {
Helper *orig = new Helper();
//create a fake vtable with 3 function pointers
pfunc_t fake_vtable[3];
for(int i=0; i<3; i++)
fake_vtable[i] = fake_func;
// replace the vtable pointer
write_vtable_pointer(orig, fake_vtable);
orig->virtual_func();
return 4;
}
| 17
| 49
| 0.663102
|
comparch-security
|
52a5c046dd736f7f68106486587a68a59de74e22
| 958
|
cpp
|
C++
|
raygame/button.cpp
|
LegendaryyDoc/Inheritance
|
23b5d360209e1d4031e0c2f06a827a7ab6b6664f
|
[
"MIT"
] | null | null | null |
raygame/button.cpp
|
LegendaryyDoc/Inheritance
|
23b5d360209e1d4031e0c2f06a827a7ab6b6664f
|
[
"MIT"
] | null | null | null |
raygame/button.cpp
|
LegendaryyDoc/Inheritance
|
23b5d360209e1d4031e0c2f06a827a7ab6b6664f
|
[
"MIT"
] | null | null | null |
#include "raylib.h"
#include "button.h"
void Button::Draw()
{
}
bool Button::CheckForClick()
{
bool rtn = false;
Vector2 cursor = GetMousePosition();
if (CheckCollisionPointRec(cursor, rec))
{
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
{
currentFrame = 1;
rtn= true;
}
else
{
currentFrame = 0;
rtn= false;
}
}
//std::cout << currentFrame;
DrawTexture(spriteCells[currentFrame], x, y, WHITE);
return rtn;
}
Button::Button(const std::string * filename, const Vector2 & position, const int cellCount)
{
spriteCells = new Texture2D[cellCount];
frameCount = cellCount;
for (int i = 0; i < cellCount; ++i)
{
spriteCells[i] = LoadTexture(filename[i].c_str());
}
//rec = { x,y,w,h };
x = position.x;
y = position.y;
rec.x = position.x;
rec.y = position.y;
rec.width = spriteCells->width;
rec.height = spriteCells->height;
}
Button::Button()
{
}
Button::~Button()
{
UnloadTexture(spriteCells[currentFrame]);
}
| 15.966667
| 91
| 0.65762
|
LegendaryyDoc
|
52a634ae2ca0f5584870f7fc30931b47abe97c2b
| 9,764
|
cpp
|
C++
|
src/MushGame/MushGameUtil.cpp
|
mushware/adanaxis-core-app
|
679ac3e8a122e059bb208e84c73efc19753e87dd
|
[
"MIT"
] | 9
|
2020-11-02T17:20:40.000Z
|
2021-12-25T15:35:36.000Z
|
src/MushGame/MushGameUtil.cpp
|
mushware/adanaxis-core-app
|
679ac3e8a122e059bb208e84c73efc19753e87dd
|
[
"MIT"
] | 2
|
2020-06-27T23:14:13.000Z
|
2020-11-02T17:28:32.000Z
|
src/MushGame/MushGameUtil.cpp
|
mushware/adanaxis-core-app
|
679ac3e8a122e059bb208e84c73efc19753e87dd
|
[
"MIT"
] | 1
|
2021-05-12T23:05:42.000Z
|
2021-05-12T23:05:42.000Z
|
//%Header {
/*****************************************************************************
*
* File: src/MushGame/MushGameUtil.cpp
*
* Copyright: Andy Southgate 2002-2007, 2020
*
* 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.
*
****************************************************************************/
//%Header } oQaGYO8jpftpyXnIPKJgUw
/*
* $Id: MushGameUtil.cpp,v 1.17 2006/12/14 00:33:49 southa Exp $
* $Log: MushGameUtil.cpp,v $
* Revision 1.17 2006/12/14 00:33:49 southa
* Control fix and audio pacing
*
* Revision 1.16 2006/10/04 13:35:24 southa
* Selective targetting
*
* Revision 1.15 2006/09/29 10:47:56 southa
* Object AI
*
* Revision 1.14 2006/07/07 18:13:59 southa
* Menu start and stop
*
* Revision 1.13 2006/06/29 11:40:40 southa
* X11 and 64 bit fixes
*
* Revision 1.12 2006/06/01 15:39:27 southa
* DrawArray verification and fixes
*
* Revision 1.11 2005/08/01 13:09:58 southa
* Collision messaging
*
* Revision 1.10 2005/07/06 19:08:27 southa
* Adanaxis control work
*
* Revision 1.9 2005/06/30 16:29:25 southa
* Adanaxis work
*
* Revision 1.8 2005/06/29 11:11:15 southa
* Camera and rendering work
*
* Revision 1.7 2005/06/23 17:25:25 southa
* MushGame link work
*
* Revision 1.6 2005/06/23 13:56:59 southa
* MushGame link work
*
* Revision 1.5 2005/06/23 11:58:29 southa
* MushGame link work
*
* Revision 1.4 2005/06/22 20:01:59 southa
* MushGame link work
*
* Revision 1.3 2005/06/21 15:57:48 southa
* MushGame work
*
* Revision 1.2 2005/06/21 13:10:52 southa
* MushGame work
*
* Revision 1.1 2005/06/20 16:14:31 southa
* Adanaxis work
*
*/
#include "MushGameUtil.h"
#include "MushGameAppHandler.h"
#include "MushGameClient.h"
#include "MushGameData.h"
#include "MushGameHostData.h"
#include "MushGameHostSaveData.h"
#include "MushGameHostVolatileData.h"
#include "MushGameJobAdmission.h"
#include "MushGameJobPlayerCreate.h"
#include "MushGameLogic.h"
#include "MushGameLink.h"
#include "MushGameMessage.h"
#include "MushGameRender.h"
#include "MushGameSaveData.h"
#include "MushGameServer.h"
#include "MushGameVolatileData.h"
using namespace Mushware;
using namespace std;
void
MushGameUtil::MailboxToDigestMove(MushGameDigest& ioDigest, MushGameMailbox& ioMailbox)
{
MushGameMessage *pMessage;
while (ioMailbox.TakeIfAvailable(pMessage))
{
ioDigest.Give(pMessage);
}
}
void
MushGameUtil::MailboxToServerMove(MushGameServer& ioServer, MushGameMailbox& ioBoxToMove, MushGameLogic& ioLogic)
{
MushGameMessage *pMessage;
while (ioBoxToMove.TakeIfAvailable(pMessage))
{
ioServer.MessageConsume(ioLogic, *pMessage);
}
}
void
MushGameUtil::MailboxToClientMove(MushGameClient& ioClient, MushGameMailbox& ioBoxToMove, MushGameLogic& ioLogic)
{
MushGameMessage *pMessage;
while (ioBoxToMove.TakeIfAvailable(pMessage))
{
ioClient.MessageConsume(ioLogic, *pMessage);
}
}
std::string
MushGameUtil::ObjectName(const std::string& inPrefix, const std::string& inSuffix)
{
std::string basePrefix = "MushGame";
std::string retName = inPrefix + inSuffix;
if (!MushcoreFactory::Sgl().Exists(retName))
{
retName = basePrefix + inSuffix;
if (!MushcoreFactory::Sgl().Exists(retName))
{
throw MushcoreLogicFail("Unknown object name '"+inPrefix+"/"+basePrefix+inSuffix+"'");
}
}
return retName;
}
void
MushGameUtil::LocalGameCreate(const std::string& inName, const std::string& inPrefix)
{
// Create the game objects
DataObjectCreate<MushGameData>(inName, inPrefix, "Data")->GroupingNameSet(inName);
DataObjectCreate<MushGameSaveData>(inName, inPrefix, "SaveData")->GroupingNameSet(inName);
DataObjectCreate<MushGameVolatileData>(inName, inPrefix, "VolatileData")->GroupingNameSet(inName);
DataObjectCreate<MushGameHostData>(inName, inPrefix, "HostData")->GroupingNameSet(inName);
DataObjectCreate<MushGameHostSaveData>(inName, inPrefix, "HostSaveData")->GroupingNameSet(inName);
DataObjectCreate<MushGameHostVolatileData>(inName, inPrefix, "HostVolatileData")->GroupingNameSet(inName);
DataObjectCreate<MushGameServer>(inName, inPrefix, "Server")->GroupingNameSet(inName);
DataObjectCreate<MushGameClient>(inName, inPrefix, "Client")->GroupingNameSet(inName);
DataObjectCreate<MushGameRender>(inName, inPrefix, "Render")->GroupingNameSet(inName);
MushGameLogic *pLogic = DataObjectCreate<MushGameLogic>(inName, inPrefix, "Logic");
pLogic->GroupingNameSet(inName);
// Create local addresses and links
std::string serverName = inName+"-localserver";
std::string clientName = inName+"-localclient";
pLogic->SaveData().ClientNameSet(clientName);
pLogic->SaveData().RenderNameSet(inName);
pLogic->SaveData().ControlMailboxNameSet(inName+"-controlmailbox");
pLogic->HostSaveData().ServerNameSet(serverName);
DataObjectCreate<MushGameAddress>(serverName, inPrefix, "Address")->NameSet(serverName);
DataObjectCreate<MushGameAddress>(clientName, inPrefix, "Address")->NameSet(clientName);
DataObjectCreate<MushGameLink>(serverName, inPrefix, "LinkLocal")->SrcDestSet(clientName, serverName);
DataObjectCreate<MushGameLink>(clientName, inPrefix, "LinkLocal")->SrcDestSet(serverName, clientName);
pLogic->ServerAddressSet(serverName);
pLogic->ClientAddressAdd(clientName);
}
void
MushGameUtil::LocalGameJobsCreate(MushGameLogic& ioLogic)
{
std::string admissionName = "admission";
MushGameJobAdmission *pAdmissionCreate = new MushGameJobAdmission("j:"+admissionName);
ioLogic.HostSaveData().JobListWRef().Give(admissionName, pAdmissionCreate);
std::string localPlayerCreateName = "localplayercreate";
MushGameJobPlayerCreate *pLocalPlayerCreate = new MushGameJobPlayerCreate("j:"+localPlayerCreateName);
ioLogic.SaveData().JobListWRef().Give(localPlayerCreateName, pLocalPlayerCreate);
}
std::string
MushGameUtil::KeyFromString(const std::string& inStr)
{
if (inStr.size() < 2)
{
throw MushcoreDataFail("Message ID '"+inStr+"' too short to extract key");
}
string::size_type barPos = inStr.find("|");
if (barPos == inStr.npos || barPos < 2)
{
return inStr.substr(2);
}
else
{
return inStr.substr(2, barPos - 2);
}
}
std::string
MushGameUtil::KeyFromMessage(const MushGameMessage& inMessage)
{
return KeyFromString(inMessage.Id());
}
std::string
MushGameUtil::ReplyIDFromMessage(const MushGameMessage& inMessage)
{
const std::string& idRef = inMessage.Id();
if (idRef.size() < 2)
{
throw MushcoreDataFail("Message ID '"+idRef+"' too short to extract key");
}
string::size_type barPos = idRef.find("|");
if (barPos == idRef.npos)
{
barPos = 0;
}
return idRef.substr(barPos+1);
}
MushGameAppHandler&
MushGameUtil::AppHandler(void)
{
MushGameAppHandler *pAppHandler=dynamic_cast<MushGameAppHandler *>(&MushcoreAppHandler::Sgl());
if (pAppHandler == NULL)
{
throw MushcoreRequestFail("AppHandler of wrong type for MushGameAppHandler");
}
return *pAppHandler;
}
MushGameLogic&
MushGameUtil::LogicWRef(void)
{
return AppHandler().LogicWRef();
}
const MushGameLogic&
MushGameUtil::LogicRef(void)
{
return AppHandler().LogicWRef();
}
std::string
MushGameUtil::ObjectName(const std::string& inPrefix, Mushware::U32 inNumber)
{
ostringstream nameStream;
nameStream << inPrefix << ':' << inNumber;
return nameStream.str();
}
void
MushGameUtil::ObjectNameDecode(std::string& outPrefix, Mushware::U32& outNumber, const std::string& inName)
{
string::size_type pos = inName.find(':');
if (pos == string::npos || pos == 0)
{
throw MushcoreDataFail("Cannot decode object name from '"+inName+"' - no colon");
}
outPrefix = inName.substr(0, pos);
istringstream nameStream(inName.substr(pos+1));
if (nameStream) nameStream >> outNumber;
if (!nameStream)
{
throw MushcoreDataFail("Cannot decode object name from '"+inName+"'");
}
}
std::string
MushGameUtil::StripFlags(std::vector<std::string> outFlags, const std::string& inString)
{
string::size_type startPos = 0;
string::size_type endPos = 0;
while (inString.size() > startPos && inString[startPos] == '[')
{
endPos = inString.find(']', startPos);
if (endPos == string::npos)
{
throw MushcoreDataFail("Malformed flags in '"+inString+"'");
}
outFlags.push_back(inString.substr(startPos+1, endPos-startPos-1));
startPos = endPos+1;
}
return inString.substr(startPos);
}
| 31.701299
| 113
| 0.695924
|
mushware
|
52abcb2d2463f30400de695309b43093980da152
| 1,028
|
cpp
|
C++
|
UI/NewGameHUD/Widget/Widget_PressKey/SCpt_PressKey.cpp
|
Bornsoul/Revenger_JoyContinue
|
599716970ca87a493bf3a959b36de0b330b318f1
|
[
"MIT"
] | null | null | null |
UI/NewGameHUD/Widget/Widget_PressKey/SCpt_PressKey.cpp
|
Bornsoul/Revenger_JoyContinue
|
599716970ca87a493bf3a959b36de0b330b318f1
|
[
"MIT"
] | null | null | null |
UI/NewGameHUD/Widget/Widget_PressKey/SCpt_PressKey.cpp
|
Bornsoul/Revenger_JoyContinue
|
599716970ca87a493bf3a959b36de0b330b318f1
|
[
"MIT"
] | null | null | null |
// Fill out your copyright notice in the Description page of Project Settings.
#include "SCpt_PressKey.h"
#include "WCpt_PressKey.h"
#include "Widget_PressKeyItem.h"
USCpt_PressKey::USCpt_PressKey()
{
PrimaryComponentTick.bCanEverTick = true;
m_pWidgetComp_PressKey = CreateDefaultSubobject<UWCpt_PressKey>(TEXT("Widget"));
if (m_pWidgetComp_PressKey == nullptr)
{
ULOG(TEXT("Widget is nullptr"));
return;
}
}
void USCpt_PressKey::BeginPlay()
{
Super::BeginPlay();
}
void USCpt_PressKey::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
Super::EndPlay(EndPlayReason);
if (m_pWidgetComp_PressKey != nullptr)
{
if (m_pWidgetComp_PressKey->IsValidLowLevel())
{
m_pWidgetComp_PressKey = nullptr;
}
}
}
void USCpt_PressKey::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
/*if (m_pWidgetComp_PressKey != nullptr)
{
m_pWidgetComp_PressKey->SetWorldLocation(m_vLocation);
}*/
}
| 20.979592
| 119
| 0.765564
|
Bornsoul
|
52abedf1089d41f26c66fdee47412282f04a64ba
| 22,784
|
cpp
|
C++
|
src/binfhe/lib/fhew.cpp
|
cs854paper58/PerfEvaFHE
|
4913920e20c3488556702bd15095cc2055fa381a
|
[
"BSD-2-Clause"
] | null | null | null |
src/binfhe/lib/fhew.cpp
|
cs854paper58/PerfEvaFHE
|
4913920e20c3488556702bd15095cc2055fa381a
|
[
"BSD-2-Clause"
] | null | null | null |
src/binfhe/lib/fhew.cpp
|
cs854paper58/PerfEvaFHE
|
4913920e20c3488556702bd15095cc2055fa381a
|
[
"BSD-2-Clause"
] | null | null | null |
// @file fhew.cpp - FHEW scheme (RingGSW accumulator) implementation
// The scheme is described in https://eprint.iacr.org/2014/816 and in
// Daniele Micciancio and Yuriy Polyakov, "Bootstrapping in FHEW-like
// Cryptosystems", Cryptology ePrint Archive, Report 2020/086,
// https://eprint.iacr.org/2020/086.
//
// Full reference to https://eprint.iacr.org/2014/816:
// @misc{cryptoeprint:2014:816,
// author = {Leo Ducas and Daniele Micciancio},
// title = {FHEW: Bootstrapping Homomorphic Encryption in less than a second},
// howpublished = {Cryptology ePrint Archive, Report 2014/816},
// year = {2014},
// note = {\url{https://eprint.iacr.org/2014/816}},
// @author TPOC: contact@palisade-crypto.org
//
// @copyright Copyright (c) 2019, Duality Technologies Inc.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution. THIS SOFTWARE IS
// PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "fhew.h"
namespace lbcrypto {
// Encryption as described in Section 5 of https://eprint.iacr.org/2014/816
// skNTT corresponds to the secret key z
std::shared_ptr<RingGSWCiphertext> RingGSWAccumulatorScheme::EncryptAP(
const std::shared_ptr<RingGSWCryptoParams> params, const NativePoly &skNTT,
const LWEPlaintext &m) const {
NativeInteger Q = params->GetLWEParams()->GetQ();
int64_t q = params->GetLWEParams()->Getq().ConvertToInt();
uint32_t N = params->GetLWEParams()->GetN();
uint32_t digitsG = params->GetDigitsG();
uint32_t digitsG2 = params->GetDigitsG2();
const shared_ptr<ILNativeParams> polyParams = params->GetPolyParams();
auto result = std::make_shared<RingGSWCiphertext>(digitsG2, 2);
DiscreteUniformGeneratorImpl<NativeVector> dug;
dug.SetModulus(Q);
// Reduce mod q (dealing with negative number as well)
int64_t mm = (((m % q) + q) % q) * (2 * N / q);
int64_t sign = 1;
if (mm >= N) {
mm -= N;
sign = -1;
}
// tempA is introduced to minimize the number of NTTs
std::vector<NativePoly> tempA(digitsG2);
for (uint32_t i = 0; i < digitsG2; ++i) {
// populate result[i][0] with uniform random a
(*result)[i][0] = NativePoly(dug, polyParams, Format::COEFFICIENT);
tempA[i] = (*result)[i][0];
// populate result[i][1] with error e
(*result)[i][1] = NativePoly(params->GetLWEParams()->GetDgg(), polyParams,
Format::COEFFICIENT);
}
for (uint32_t i = 0; i < digitsG; ++i) {
if (sign > 0) {
// Add G Multiple
(*result)[2 * i][0][mm].ModAddEq(params->GetGPower()[i], Q);
// [a,as+e] + X^m*G
(*result)[2 * i + 1][1][mm].ModAddEq(params->GetGPower()[i], Q);
} else {
// Subtract G Multiple
(*result)[2 * i][0][mm].ModSubEq(params->GetGPower()[i], Q);
// [a,as+e] - X^m*G
(*result)[2 * i + 1][1][mm].ModSubEq(params->GetGPower()[i], Q);
}
}
// 3*digitsG2 NTTs are called
result->SetFormat(Format::EVALUATION);
for (uint32_t i = 0; i < digitsG2; ++i) {
tempA[i].SetFormat(Format::EVALUATION);
(*result)[i][1] += tempA[i] * skNTT;
}
return result;
}
// Encryption for the GINX variant, as described in "Bootstrapping in FHEW-like
// Cryptosystems"
std::shared_ptr<RingGSWCiphertext> RingGSWAccumulatorScheme::EncryptGINX(
const std::shared_ptr<RingGSWCryptoParams> params, const NativePoly &skNTT,
const LWEPlaintext &m) const {
NativeInteger Q = params->GetLWEParams()->GetQ();
uint32_t digitsG = params->GetDigitsG();
uint32_t digitsG2 = params->GetDigitsG2();
const shared_ptr<ILNativeParams> polyParams = params->GetPolyParams();
auto result = std::make_shared<RingGSWCiphertext>(digitsG2, 2);
DiscreteUniformGeneratorImpl<NativeVector> dug;
dug.SetModulus(Q);
// tempA is introduced to minimize the number of NTTs
std::vector<NativePoly> tempA(digitsG2);
for (uint32_t i = 0; i < digitsG2; ++i) {
(*result)[i][0] = NativePoly(dug, polyParams, Format::COEFFICIENT);
tempA[i] = (*result)[i][0];
(*result)[i][1] = NativePoly(params->GetLWEParams()->GetDgg(), polyParams,
Format::COEFFICIENT);
}
for (uint32_t i = 0; i < digitsG; ++i) {
if (m > 0) {
// Add G Multiple
(*result)[2 * i][0][0].ModAddEq(params->GetGPower()[i], Q);
// [a,as+e] + G
(*result)[2 * i + 1][1][0].ModAddEq(params->GetGPower()[i], Q);
}
}
// 3*digitsG2 NTTs are called
result->SetFormat(Format::EVALUATION);
for (uint32_t i = 0; i < digitsG2; ++i) {
tempA[i].SetFormat(Format::EVALUATION);
(*result)[i][1] += tempA[i] * skNTT;
}
return result;
}
// wrapper for KeyGen methods
RingGSWEvalKey RingGSWAccumulatorScheme::KeyGen(
const std::shared_ptr<RingGSWCryptoParams> params,
const std::shared_ptr<LWEEncryptionScheme> lwescheme,
const std::shared_ptr<const LWEPrivateKeyImpl> LWEsk) const {
if (params->GetMethod() == AP)
return KeyGenAP(params, lwescheme, LWEsk);
else // GINX
return KeyGenGINX(params, lwescheme, LWEsk);
}
// Key generation as described in Section 4 of https://eprint.iacr.org/2014/816
RingGSWEvalKey RingGSWAccumulatorScheme::KeyGenAP(
const std::shared_ptr<RingGSWCryptoParams> params,
const std::shared_ptr<LWEEncryptionScheme> lwescheme,
const std::shared_ptr<const LWEPrivateKeyImpl> LWEsk) const {
const auto &LWEParams = params->GetLWEParams();
const std::shared_ptr<const LWEPrivateKeyImpl> skN =
lwescheme->KeyGenN(LWEParams);
RingGSWEvalKey ek;
ek.KSkey = lwescheme->KeySwitchGen(LWEParams, LWEsk, skN);
NativePoly skNPoly = NativePoly(params->GetPolyParams());
skNPoly.SetValues(skN->GetElement(), Format::COEFFICIENT);
skNPoly.SetFormat(Format::EVALUATION);
NativeInteger q = LWEParams->Getq();
NativeInteger qHalf = q >> 1;
int32_t qInt = q.ConvertToInt();
uint32_t n = LWEParams->Getn();
uint32_t baseR = params->GetBaseR();
std::vector<NativeInteger> digitsR = params->GetDigitsR();
ek.BSkey = std::make_shared<RingGSWBTKey>(n, baseR, digitsR.size());
#pragma omp parallel for
for (uint32_t i = 0; i < n; ++i)
for (uint32_t j = 1; j < baseR; ++j)
for (uint32_t k = 0; k < digitsR.size(); ++k) {
int32_t signedSK;
if (LWEsk->GetElement()[i] < qHalf)
signedSK = LWEsk->GetElement()[i].ConvertToInt();
else
signedSK = (int32_t)LWEsk->GetElement()[i].ConvertToInt() - qInt;
if (LWEsk->GetElement()[i] >= qHalf) signedSK -= qInt;
(*ek.BSkey)[i][j][k] = *(EncryptAP(
params, skNPoly,
signedSK * (int32_t)j * (int32_t)digitsR[k].ConvertToInt()));
}
return ek;
}
// Bootstrapping keys generation for the GINX variant, as described in
// "Bootstrapping in FHEW-like Cryptosystems"
RingGSWEvalKey RingGSWAccumulatorScheme::KeyGenGINX(
const std::shared_ptr<RingGSWCryptoParams> params,
const std::shared_ptr<LWEEncryptionScheme> lwescheme,
const std::shared_ptr<const LWEPrivateKeyImpl> LWEsk) const {
RingGSWEvalKey ek;
const std::shared_ptr<const LWEPrivateKeyImpl> skN =
lwescheme->KeyGenN(params->GetLWEParams());
ek.KSkey = lwescheme->KeySwitchGen(params->GetLWEParams(), LWEsk, skN);
NativePoly skNPoly = NativePoly(params->GetPolyParams());
skNPoly.SetValues(skN->GetElement(), Format::COEFFICIENT);
skNPoly.SetFormat(Format::EVALUATION);
uint64_t q = params->GetLWEParams()->Getq().ConvertToInt();
uint32_t n = params->GetLWEParams()->Getn();
ek.BSkey = std::make_shared<RingGSWBTKey>(1, 2, n);
int64_t qHalf = (q >> 1);
// handles ternary secrets using signed mod 3 arithmetic; 0 -> {0,0}, 1 ->
// {1,0}, -1 -> {0,1}
#pragma omp parallel for
for (uint32_t i = 0; i < n; ++i) {
int64_t s = LWEsk->GetElement()[i].ConvertToInt();
if (s > qHalf) s -= q;
switch (s) {
case 0:
(*ek.BSkey)[0][0][i] = *(EncryptGINX(params, skNPoly, 0));
(*ek.BSkey)[0][1][i] = *(EncryptGINX(params, skNPoly, 0));
break;
case 1:
(*ek.BSkey)[0][0][i] = *(EncryptGINX(params, skNPoly, 1));
(*ek.BSkey)[0][1][i] = *(EncryptGINX(params, skNPoly, 0));
break;
case -1:
(*ek.BSkey)[0][0][i] = *(EncryptGINX(params, skNPoly, 0));
(*ek.BSkey)[0][1][i] = *(EncryptGINX(params, skNPoly, 1));
break;
default:
std::string errMsg =
"ERROR: only ternary secret key distributions are supported.";
PALISADE_THROW(not_implemented_error, errMsg);
}
}
return ek;
}
// SignedDigitDecompose is a bottleneck operation
// There are two approaches to do it.
// The current approach appears to give the best performance
// results. The two variants are labeled A and B.
void RingGSWAccumulatorScheme::SignedDigitDecompose(
const std::shared_ptr<RingGSWCryptoParams> params,
const std::vector<NativePoly> &input,
std::vector<NativePoly> *output) const {
uint32_t N = params->GetLWEParams()->GetN();
uint32_t digitsG = params->GetDigitsG();
NativeInteger Q = params->GetLWEParams()->GetQ();
NativeInteger QHalf = Q >> 1;
NativeInteger::SignedNativeInt Q_int = Q.ConvertToInt();
NativeInteger::SignedNativeInt baseG =
NativeInteger(params->GetBaseG()).ConvertToInt();
NativeInteger::SignedNativeInt d = 0;
NativeInteger::SignedNativeInt gBits =
(NativeInteger::SignedNativeInt)std::log2(baseG);
// VARIANT A
NativeInteger::SignedNativeInt gBitsMaxBits =
NativeInteger::MaxBits() - gBits;
// VARIANT B
// NativeInteger::SignedNativeInt gminus1 = (1 << gBits) - 1;
// NativeInteger::SignedNativeInt baseGdiv2 =
// (baseG >> 1)-1;
// Signed digit decomposition
for (uint32_t j = 0; j < 2; j++) {
for (uint32_t k = 0; k < N; k++) {
NativeInteger t = input[j][k];
if (t < QHalf)
d += t.ConvertToInt();
else
d += (NativeInteger::SignedNativeInt)t.ConvertToInt() - Q_int;
for (uint32_t l = 0; l < digitsG; l++) {
// remainder is signed
// This approach gives a slightly better performance
// VARIANT A
NativeInteger::SignedNativeInt r = d << gBitsMaxBits;
r >>= gBitsMaxBits;
// VARIANT B
// NativeInteger::SignedNativeInt r = d & gminus1;
// if (r > baseGdiv2) r -= baseG;
d -= r;
d >>= gBits;
if (r >= 0)
(*output)[j + 2 * l][k] += NativeInteger(r);
else
(*output)[j + 2 * l][k] += NativeInteger(r + Q_int);
}
d = 0;
}
}
}
// AP Accumulation as described in "Bootstrapping in FHEW-like Cryptosystems"
void RingGSWAccumulatorScheme::AddToACCAP(
const std::shared_ptr<RingGSWCryptoParams> params,
const RingGSWCiphertext &input,
std::shared_ptr<RingGSWCiphertext> acc) const {
uint32_t digitsG2 = params->GetDigitsG2();
const shared_ptr<ILNativeParams> polyParams = params->GetPolyParams();
std::vector<NativePoly> ct = acc->GetElements()[0];
std::vector<NativePoly> dct(digitsG2);
// initialize dct to zeros
for (uint32_t i = 0; i < digitsG2; i++)
dct[i] = NativePoly(polyParams, Format::COEFFICIENT, true);
// calls 2 NTTs
for (uint32_t i = 0; i < 2; i++) ct[i].SetFormat(Format::COEFFICIENT);
SignedDigitDecompose(params, ct, &dct);
// calls digitsG2 NTTs
for (uint32_t j = 0; j < digitsG2; j++) dct[j].SetFormat(Format::EVALUATION);
// acc = dct * input (matrix product);
// uses in-place * operators for the last call to dct[i] to gain performance
// improvement
for (uint32_t j = 0; j < 2; j++) {
(*acc)[0][j].SetValuesToZero();
for (uint32_t l = 0; l < digitsG2; l++) {
if (j == 0)
(*acc)[0][j] += dct[l] * input[l][j];
else
(*acc)[0][j] += (dct[l] *= input[l][j]);
}
}
}
// GINX Accumulation as described in "Bootstrapping in FHEW-like Cryptosystems"
void RingGSWAccumulatorScheme::AddToACCGINX(
const std::shared_ptr<RingGSWCryptoParams> params,
const RingGSWCiphertext &input, const NativeInteger &a,
std::shared_ptr<RingGSWCiphertext> acc) const {
// cycltomic order
uint32_t m = 2 * params->GetLWEParams()->GetN();
uint32_t digitsG2 = params->GetDigitsG2();
int64_t q = params->GetLWEParams()->Getq().ConvertToInt();
const shared_ptr<ILNativeParams> polyParams = params->GetPolyParams();
std::vector<NativePoly> ct = acc->GetElements()[0];
std::vector<NativePoly> dct(digitsG2);
// initialize dct to zeros
for (uint32_t i = 0; i < digitsG2; i++)
dct[i] = NativePoly(polyParams, Format::COEFFICIENT, true);
// calls 2 NTTs
for (uint32_t i = 0; i < 2; i++) ct[i].SetFormat(Format::COEFFICIENT);
SignedDigitDecompose(params, ct, &dct);
for (uint32_t j = 0; j < digitsG2; j++) dct[j].SetFormat(Format::EVALUATION);
uint64_t index = a.ConvertToInt() * (m / q);
// index is in range [0,m] - so we need to adjust the edge case when
// index = m to index = 0
if (index == m) index = 0;
const NativePoly &monomial = params->GetMonomial(index);
// acc = dct * input (matrix product);
// uses in-place * operators for the last call to dct[i] to gain performance
// improvement
for (uint32_t j = 0; j < 2; j++) {
NativePoly temp1 = (j < 1) ? dct[0] * input[0][j] : (dct[0] *= input[0][j]);
for (uint32_t l = 1; l < digitsG2; l++) {
if (j == 0)
temp1 += dct[l] * input[l][j];
else
temp1 += (dct[l] *= input[l][j]);
}
(*acc)[0][j] += (temp1 *= monomial);
}
}
std::shared_ptr<RingGSWCiphertext> RingGSWAccumulatorScheme::BootstrapCore(
const std::shared_ptr<RingGSWCryptoParams> params, const BINGATE gate,
const RingGSWEvalKey &EK, const NativeVector &a, const NativeInteger &b,
const std::shared_ptr<LWEEncryptionScheme> LWEscheme) const {
if ((EK.BSkey == nullptr) || (EK.KSkey == nullptr)) {
std::string errMsg =
"Bootstrapping keys have not been generated. Please call BTKeyGen "
"before calling bootstrapping.";
PALISADE_THROW(config_error, errMsg);
}
const shared_ptr<ILNativeParams> polyParams = params->GetPolyParams();
NativeInteger q = params->GetLWEParams()->Getq();
NativeInteger Q = params->GetLWEParams()->GetQ();
uint32_t N = params->GetLWEParams()->GetN();
uint32_t baseR = params->GetBaseR();
uint32_t n = params->GetLWEParams()->Getn();
std::vector<NativeInteger> digitsR = params->GetDigitsR();
// Specifies the range [q1,q2) that will be used for mapping
uint32_t qHalf = q.ConvertToInt() >> 1;
NativeInteger q1 = params->GetGateConst()[static_cast<int>(gate)];
NativeInteger q2 = q1.ModAddFast(NativeInteger(qHalf), q);
// depending on whether the value is the range, it will be set
// to either Q/8 or -Q/8 to match binary arithmetic
NativeInteger Q8 = Q / NativeInteger(8) + 1;
NativeInteger Q8Neg = Q - Q8;
NativeVector m(params->GetLWEParams()->GetN(),
params->GetLWEParams()->GetQ());
// Since q | (2*N), we deal with a sparse embedding of Z_Q[x]/(X^{q/2}+1) to
// Z_Q[x]/(X^N+1)
uint32_t factor = (2 * N / q.ConvertToInt());
for (uint32_t j = 0; j < qHalf; j++) {
NativeInteger temp = b.ModSub(j, q);
if (q1 < q2)
m[j * factor] = ((temp >= q1) && (temp < q2)) ? Q8Neg : Q8;
else
m[j * factor] = ((temp >= q2) && (temp < q1)) ? Q8 : Q8Neg;
}
std::vector<NativePoly> res(2);
// no need to do NTT as all coefficients of this poly are zero
res[0] = NativePoly(polyParams, Format::EVALUATION, true);
res[1] = NativePoly(polyParams, Format::COEFFICIENT, false);
res[1].SetValues(std::move(m), Format::COEFFICIENT);
res[1].SetFormat(Format::EVALUATION);
// main accumulation computation
// the following loop is the bottleneck of bootstrapping/binary gate
// evaluation
auto acc = std::make_shared<RingGSWCiphertext>(1, 2);
(*acc)[0] = std::move(res);
if (params->GetMethod() == AP) {
for (uint32_t i = 0; i < n; i++) {
NativeInteger aI = q.ModSub(a[i], q);
for (uint32_t k = 0; k < digitsR.size();
k++, aI /= NativeInteger(baseR)) {
uint32_t a0 = (aI.Mod(baseR)).ConvertToInt();
if (a0) this->AddToACCAP(params, (*EK.BSkey)[i][a0][k], acc);
}
}
} else { // if GINX
for (uint32_t i = 0; i < n; i++) {
// handles -a*E(1)
this->AddToACCGINX(params, (*EK.BSkey)[0][0][i], q.ModSub(a[i], q), acc);
// handles -a*E(-1) = a*E(1)
this->AddToACCGINX(params, (*EK.BSkey)[0][1][i], a[i], acc);
}
}
return acc;
}
// Full evaluation as described in "Bootstrapping in FHEW-like
// Cryptosystems"
std::shared_ptr<LWECiphertextImpl> RingGSWAccumulatorScheme::EvalBinGate(
const std::shared_ptr<RingGSWCryptoParams> params, const BINGATE gate,
const RingGSWEvalKey &EK,
const std::shared_ptr<const LWECiphertextImpl> ct1,
const std::shared_ptr<const LWECiphertextImpl> ct2,
const std::shared_ptr<LWEEncryptionScheme> LWEscheme) const {
NativeInteger q = params->GetLWEParams()->Getq();
NativeInteger Q = params->GetLWEParams()->GetQ();
uint32_t n = params->GetLWEParams()->Getn();
uint32_t N = params->GetLWEParams()->GetN();
NativeInteger Q8 = Q / NativeInteger(8) + 1;
if (ct1 == ct2) {
std::string errMsg =
"ERROR: Please only use independent ciphertexts as inputs.";
PALISADE_THROW(config_error, errMsg);
}
// By default, we compute XOR/XNOR using a combination of AND, OR, and NOT
// gates
if ((gate == XOR) || (gate == XNOR)) {
auto ct1NOT = EvalNOT(params, ct1);
auto ct2NOT = EvalNOT(params, ct2);
auto ctAND1 = EvalBinGate(params, AND, EK, ct1, ct2NOT, LWEscheme);
auto ctAND2 = EvalBinGate(params, AND, EK, ct1NOT, ct2, LWEscheme);
auto ctOR = EvalBinGate(params, OR, EK, ctAND1, ctAND2, LWEscheme);
// NOT is free so there is not cost to do it an extra time for XNOR
if (gate == XOR)
return ctOR;
else // XNOR
return EvalNOT(params, ctOR);
} else {
NativeVector a(n, q);
NativeInteger b;
// the additive homomorphic operation for XOR/NXOR is different from the
// other gates we compute 2*(ct1 - ct2) mod 4 for XOR, me map 1,2 -> 1 and
// 3,0 -> 0
if ((gate == XOR_FAST) || (gate == XNOR_FAST)) {
a = ct1->GetA() - ct2->GetA();
a += a;
b = ct1->GetB().ModSubFast(ct2->GetB(), q);
b.ModAddFastEq(b, q);
} else {
// for all other gates, we simply compute (ct1 + ct2) mod 4
// for AND: 0,1 -> 0 and 2,3 -> 1
// for OR: 1,2 -> 1 and 3,0 -> 0
a = ct1->GetA() + ct2->GetA();
b = ct1->GetB().ModAddFast(ct2->GetB(), q);
}
auto acc = BootstrapCore(params, gate, EK, a, b, LWEscheme);
NativeInteger bNew;
NativeVector aNew(N, Q);
// the accumulator result is encrypted w.r.t. the transposed secret key
// we can transpose "a" to get an encryption under the original secret key
NativePoly temp = (*acc)[0][0];
temp = temp.Transpose();
temp.SetFormat(Format::COEFFICIENT);
aNew = temp.GetValues();
temp = (*acc)[0][1];
temp.SetFormat(Format::COEFFICIENT);
// we add Q/8 to "b" to to map back to Q/4 (i.e., mod 2) arithmetic.
bNew = Q8.ModAddFast(temp[0], Q);
auto eQN =
std::make_shared<LWECiphertextImpl>(std::move(aNew), std::move(bNew));
// Key switching
const std::shared_ptr<const LWECiphertextImpl> eQ =
LWEscheme->KeySwitch(params->GetLWEParams(), EK.KSkey, eQN);
// Modulus switching
return LWEscheme->ModSwitch(params->GetLWEParams(), eQ);
}
}
// Full evaluation as described in "Bootstrapping in FHEW-like
// Cryptosystems"
std::shared_ptr<LWECiphertextImpl> RingGSWAccumulatorScheme::Bootstrap(
const std::shared_ptr<RingGSWCryptoParams> params, const RingGSWEvalKey &EK,
const std::shared_ptr<const LWECiphertextImpl> ct1,
const std::shared_ptr<LWEEncryptionScheme> LWEscheme) const {
NativeInteger q = params->GetLWEParams()->Getq();
NativeInteger Q = params->GetLWEParams()->GetQ();
uint32_t n = params->GetLWEParams()->Getn();
uint32_t N = params->GetLWEParams()->GetN();
NativeInteger Q8 = Q / NativeInteger(8) + 1;
NativeVector a(n, q);
NativeInteger b;
a = ct1->GetA();
b = ct1->GetB().ModAddFast(q >> 2, q);
auto acc = BootstrapCore(params, AND, EK, a, b, LWEscheme);
NativeInteger bNew;
NativeVector aNew(N, Q);
// the accumulator result is encrypted w.r.t. the transposed secret key
// we can transpose "a" to get an encryption under the original secret key
NativePoly temp = (*acc)[0][0];
temp = temp.Transpose();
temp.SetFormat(Format::COEFFICIENT);
aNew = temp.GetValues();
temp = (*acc)[0][1];
temp.SetFormat(Format::COEFFICIENT);
// we add Q/8 to "b" to to map back to Q/4 (i.e., mod 2) arithmetic.
bNew = Q8.ModAddFast(temp[0], Q);
auto eQN =
std::make_shared<LWECiphertextImpl>(std::move(aNew), std::move(bNew));
// Key switching
const std::shared_ptr<const LWECiphertextImpl> eQ =
LWEscheme->KeySwitch(params->GetLWEParams(), EK.KSkey, eQN);
// Modulus switching
return LWEscheme->ModSwitch(params->GetLWEParams(), eQ);
}
// Evaluation of the NOT operation; no key material is needed
std::shared_ptr<LWECiphertextImpl> RingGSWAccumulatorScheme::EvalNOT(
const std::shared_ptr<RingGSWCryptoParams> params,
const std::shared_ptr<const LWECiphertextImpl> ct) const {
NativeInteger q = params->GetLWEParams()->Getq();
uint32_t n = params->GetLWEParams()->Getn();
NativeVector a(n, q);
for (uint32_t i = 0; i < n; i++) a[i] = q - ct->GetA(i);
NativeInteger b = (q >> 2).ModSubFast(ct->GetB(), q);
return std::make_shared<LWECiphertextImpl>(std::move(a), b);
}
}; // namespace lbcrypto
| 36.689211
| 80
| 0.654231
|
cs854paper58
|
52ac0a177d59b88600e4f2ab5b7924807eee94ad
| 12,317
|
cpp
|
C++
|
HoodieScript/GameUtilities/PlayerUtilities.cpp
|
NamelessHoodie/HoodieScript
|
bc3b250af0a1c5dbf545779ba5ef11780edb299b
|
[
"MIT"
] | 2
|
2021-12-16T22:53:45.000Z
|
2022-03-26T21:05:29.000Z
|
HoodieScript/GameUtilities/PlayerUtilities.cpp
|
NamelessHoodie/HoodieScript
|
bc3b250af0a1c5dbf545779ba5ef11780edb299b
|
[
"MIT"
] | null | null | null |
HoodieScript/GameUtilities/PlayerUtilities.cpp
|
NamelessHoodie/HoodieScript
|
bc3b250af0a1c5dbf545779ba5ef11780edb299b
|
[
"MIT"
] | 2
|
2022-01-13T19:27:52.000Z
|
2022-01-30T18:19:01.000Z
|
#include "pch.h"
#include "PlayerUtilities.h"
#include <Amir/player_network_session.h>
#include "GameDebugClasses/game_data_man.h"
#include "GameDebugClasses/world_chr_man.h"
#include <script_runtime.h>
namespace hoodie_script
{
void PlayerUtilities::clearInventory() {
EquipGameData equipGameData = PlayerIns::getMainChr().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
auto inventoryItems = equipInventoryData.GetInventoryItems();
for (auto i = inventoryItems.begin(); i != inventoryItems.end(); i++) {
auto inventoryItem = *i;
if (inventoryItem.itemType != ItemParamIdPrefix::Goods)
equipInventoryData.discardInventoryItems(inventoryItem.inventoryIndex,
inventoryItem.quantity);
else equipGameData.modifyInventoryItemQuantity(inventoryItem.inventoryIndex,
-(int32_t)inventoryItem.quantity);
}
}
void PlayerUtilities::setSheathStateNetworked(uint16_t newSheatState)
{
if (!PlayerIns::isMainChrLoaded())
return;
auto playableCharacter = PlayerIns::getMainChr();
if (!playableCharacter.hasHkbCharacter())
return;
playableCharacter.getPlayerGameData().setWeaponSheathState(newSheatState);
uint16_t sheathData[2] = { newSheatState, PlayerIns::getMainChr().getForwardId() };
PlayerNetworkSession session(PlayerNetworkSession::getInstance());
session.sessionPacketSend(13, (char*)sheathData, 4);
}
int32_t PlayerUtilities::GetInventorySlotDurability(InventorySlot slot)
{
EquipGameData equipGameData = PlayerIns::getMainChr().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
auto index = equipGameData.getInventoryItemIdBySlot(slot);
auto inventoryItemInternal = equipInventoryData.getInventoryItemById(index);
InventoryItem inventoryItem = InventoryItem(inventoryItemInternal, index);
std::cout << std::dec << "InventoryItem : Index = " << inventoryItem.inventoryIndex << ", " << "UID = " << std::hex << inventoryItem.uniqueId << ", " << "ItemId = " << std::dec << inventoryItem.itemId << ", " << "ItemType = " << std::hex << (int32_t)inventoryItem.itemType << ", " << "Quantity = " << std::dec << inventoryItem.quantity << ", " << std::hex << "Unk1 = " << inventoryItem.unknown1 << std::endl;
auto gaitemIns = inventoryItem.GetGaitemInstance();
if (gaitemIns.isValid())
{
return gaitemIns.getDurability();
}
return 0;
}
void PlayerUtilities::RemoveItemFromInventoryByItemId(ItemParamIdPrefix paramIdPrefix, int32_t paramItemId)
{
EquipGameData equipGameData = PlayerIns::getMainChr().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
std::optional<int32_t> indexOfItem = findInventoryIdByGiveId((uint32_t)paramIdPrefix + paramItemId);
if (indexOfItem.has_value())
{
auto a = equipInventoryData.getInventoryItemById(indexOfItem.value());
equipInventoryData.discardInventoryItems(indexOfItem.value(), 1);
}
}
void PlayerUtilities::ReplaceWeaponRightActiveNetworked(const int32_t& equipParamWeaponTarget, const int32_t equipParamWeaponReplacement)
{
if (!PlayerIns::isMainChrLoaded())
return;
PlayerIns mainPlayer = PlayerIns::getMainChr();
auto rightWeaponActiveIndex = mainPlayer.getPlayerGameData().getActiveRightHandSlot();
ReplaceWeaponRightHandBySlotIndexNetworked(rightWeaponActiveIndex, equipParamWeaponTarget, equipParamWeaponReplacement);
}
void PlayerUtilities::ReplaceWeaponLeftActiveNetworked(const int32_t& equipParamWeaponTarget, const int32_t equipParamWeaponReplacement)
{
if (!PlayerIns::isMainChrLoaded())
return;
PlayerIns mainPlayer = PlayerIns::getMainChr();
auto leftWeaponActiveIndex = mainPlayer.getPlayerGameData().getActiveLeftHandSlot();
ReplaceWeaponLeftHandBySlotIndexNetworked(leftWeaponActiveIndex, equipParamWeaponTarget, equipParamWeaponReplacement);
}
void PlayerUtilities::ReplaceWeaponLeftHandBySlotIndexNetworked(uint32_t weaponSlot, int32_t equipParamWeaponTarget, const int32_t equipParamWeaponReplacement)
{
int array[]{ 0,2,4 };
ReplaceWeaponByInventorySlotNetworked((InventorySlot)array[weaponSlot], ItemParamIdPrefix::Weapon, equipParamWeaponTarget, equipParamWeaponReplacement, -1);
}
void PlayerUtilities::ReplaceWeaponRightHandBySlotIndexNetworked(uint32_t weaponSlot, int32_t equipParamWeaponTarget, const int32_t equipParamWeaponReplacement)
{
int array[]{ 1,3,5 };
ReplaceWeaponByInventorySlotNetworked((InventorySlot)array[weaponSlot], ItemParamIdPrefix::Weapon, equipParamWeaponTarget, equipParamWeaponReplacement, -1);
}
void PlayerUtilities::ReplaceWeaponByInventorySlotNetworked(InventorySlot inventorySlot, ItemParamIdPrefix paramIdPrefix, int32_t paramItemIdTarget, int32_t paramItemIdReplacement, int32_t durability)
{
if (!PlayerIns::isMainChrLoaded() || !PlayerIns::getMainChr().hasPlayerGameData())
return;
if (durability == -1)
durability = GetInventorySlotDurability(inventorySlot);
else
durability = getItemMaxDurability(paramIdPrefix, paramItemIdReplacement);
PlayerGameData playerGameData = GameDataMan::getInstance().getPlayerGameData();
auto sheatState = playerGameData.getWeaponSheathState();
RemoveItemFromInventoryByInventorySlot(inventorySlot, paramIdPrefix);
giveItemAndEquipInInventorySlot(inventorySlot, paramIdPrefix, paramItemIdReplacement, durability);
setSheathStateNetworked(sheatState);
}
void PlayerUtilities::ReloadC0000()
{
if (PlayerIns::isMainChrLoaded())
return;
if (!accessMultilevelPointer<uintptr_t>(PlayerIns::getMainChr().getAddress() + 0x1F90, 0x58, 0x8, 0x1F90, 0x28, 0x10, 0x28, 0xB8))
return;
WorldChrMan::reloadCharacterFiles(L"c0000");
}
int32_t PlayerUtilities::getItemMaxDurability(ItemParamIdPrefix paramIdPrefix, int32_t paramItemId)
{
uint16_t durabilityStage;
if (paramIdPrefix == ItemParamIdPrefix::Weapon)
{
if (hoodie_script::script_runtime::paramPatcher->GetParamEntry(L"EquipParamWeapon", paramItemId, 0xBE, &durabilityStage))
{
return (int16_t)(durabilityStage);
}
else
{
return NULL;
}
}
else if (paramIdPrefix == ItemParamIdPrefix::Protector)
{
if (script_runtime::paramPatcher->GetParamEntry(L"EquipParamProtector", paramItemId, 0xAC, &durabilityStage))
{
std::cout << durabilityStage << std::endl;
return (int16_t)(durabilityStage);
}
else
{
return NULL;
}
}
else
{
return NULL;
}
}
void PlayerUtilities::RemoveItemFromInventoryByInventorySlot(InventorySlot slot, ItemParamIdPrefix paramIdPrefix)
{
EquipGameData equipGameData = PlayerIns::getMainChr().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
auto index = equipGameData.getInventoryItemIdBySlot(slot);
EquipItemInInventoryIfPresentOrGiveAndEquip(slot, paramIdPrefix, 110000, -1);
equipInventoryData.discardInventoryItems(index, 1);
}
void PlayerUtilities::EquipItemInInventoryIfPresentOrGiveAndEquip(InventorySlot slot, ItemParamIdPrefix paramIdPrefix, int32_t paramItemId, int32_t durability)
{
if (!tryEquipItemInInventorySlot(slot, paramIdPrefix, paramItemId))
{
giveItemAndEquipInInventorySlot(slot, paramIdPrefix, paramItemId, durability);
}
}
void PlayerUtilities::unequipAllEquipment()
{
GameDataMan gameDataMan = GameDataMan::getInstance();
PlayerGameData playerGameData = gameDataMan.getPlayerGameData();
EquipGameData equipGameData = playerGameData.getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
for (int32_t i = 0; i <= 21; ++i) {
switch (i) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
EquipItemInInventoryIfPresentOrGiveAndEquip((InventorySlot)i, ItemParamIdPrefix::Weapon, 110000, -1);
break;
case 12:
EquipItemInInventoryIfPresentOrGiveAndEquip((InventorySlot)i, ItemParamIdPrefix::Protector, 900000, -1);
break;
case 13:
EquipItemInInventoryIfPresentOrGiveAndEquip((InventorySlot)i, ItemParamIdPrefix::Protector, 901000, -1);
break;
case 14:
EquipItemInInventoryIfPresentOrGiveAndEquip((InventorySlot)i, ItemParamIdPrefix::Protector, 902000, -1);
break;
case 15:
EquipItemInInventoryIfPresentOrGiveAndEquip((InventorySlot)i, ItemParamIdPrefix::Protector, 903000, -1);
break;
case 6:
case 7:
case 8:
case 9:
case 17:
case 18:
case 19:
case 20:
case 21:
{
equipGameData.equipInventoryItem((InventorySlot)i, -1);
break;
}
default:
break;
}
}
for (int32_t i = 0; i <= 0xE; ++i) {
equipGameData.equipGoodsInventoryItem((GoodsSlot)i, -1);
}
for (int32_t i = 1; i <= 14; ++i) {
playerGameData.setSpell(i, -1);
}
}
std::optional<int32_t> PlayerUtilities::findInventoryIdByGiveId(int32_t giveId, bool disallowEquipped)
{
EquipGameData equipGameData = GameDataMan::getInstance().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
std::optional<int32_t> indexOfItem;
auto items = equipInventoryData.GetInventoryItems();
for (auto i = items.begin(); i != items.end(); i++) {
auto item = *i;
auto itemFullyQualifiedGiveId = item.itemId + (int32_t)item.itemType;
if (itemFullyQualifiedGiveId == giveId)
{
if (disallowEquipped)
if (isInventoryItemEquipped(&item))
continue;
indexOfItem = item.inventoryIndex;
break;
}
}
return indexOfItem;
}
bool PlayerUtilities::isInventoryItemEquipped(InventoryItem* item)
{
GameDataMan gameDataMan = GameDataMan::getInstance();
PlayerGameData playerGameData = gameDataMan.getPlayerGameData();
EquipGameData equipGameData = playerGameData.getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
for (int32_t i = 0; i <= 5; ++i) {
auto indexOfInventoryItem = equipGameData.getInventoryItemIdBySlot((InventorySlot)i);
auto inventoryItemInternal = equipInventoryData.getInventoryItemById(indexOfInventoryItem);
auto inventoryItem = InventoryItem(inventoryItemInternal, indexOfInventoryItem);
if (inventoryItem.uniqueId == item->uniqueId)
return true;
}
return false;
}
void PlayerUtilities::giveItemAndEquipInInventorySlot(InventorySlot inventorySlot, ItemParamIdPrefix paramIdPrefix, int32_t paramItemId, int32_t durability)
{
EquipGameData equipGameData = PlayerIns::getMainChr().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
equipInventoryData.addItem(paramIdPrefix, paramItemId, 1, durability);
tryEquipItemInInventorySlot(inventorySlot, paramIdPrefix, paramItemId);
}
bool PlayerUtilities::tryEquipItemInInventorySlot(InventorySlot inventorySlot, ItemParamIdPrefix paramIdPrefix, int32_t paramItemId)
{
EquipGameData equipGameData = PlayerIns::getMainChr().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
std::optional<int32_t>indexOfItem = findInventoryIdByGiveId((uint32_t)paramIdPrefix + paramItemId, true);
if (!indexOfItem.has_value())
return false;
equipGameData.equipInventoryItem(inventorySlot, indexOfItem.value());
PlayerNetworkSession::queueEquipmentPacket();
return true;
}
void PlayerUtilities::giveGoodsAndEquipInGoodSlot(GoodsSlot goodsSlot, int32_t paramItemId, int32_t quantity)
{
if (!PlayerIns::isMainChrLoaded())
return;
EquipGameData equipGameData = PlayerIns::getMainChr().
getPlayerGameData().
getEquipGameData();
EquipInventoryData equipInventoryData = equipGameData.getEquipInventoryData();
std::optional<int32_t> indexOfItem = findInventoryIdByGiveId((uint32_t)ItemParamIdPrefix::Goods + paramItemId);
if (!indexOfItem.has_value()) {
equipInventoryData.addItem(ItemParamIdPrefix::Goods, paramItemId, quantity, 0);
indexOfItem = findInventoryIdByGiveId((uint32_t)ItemParamIdPrefix::Goods + paramItemId);
}
if (indexOfItem.has_value()) {
equipGameData.equipGoodsInventoryItem(goodsSlot, indexOfItem.value());
}
}
}
| 36.548961
| 410
| 0.766177
|
NamelessHoodie
|
52acea0cd8473acad382677cc4855ea389d0c0f5
| 2,415
|
cpp
|
C++
|
CsPlugin/Source/CsCore/Public/Collision/Script/CsScriptLibrary_Collision.cpp
|
closedsum/core
|
c3cae44a177b9684585043a275130f9c7b67fef0
|
[
"Unlicense"
] | 2
|
2019-03-17T10:43:53.000Z
|
2021-04-20T21:24:19.000Z
|
CsPlugin/Source/CsCore/Public/Collision/Script/CsScriptLibrary_Collision.cpp
|
closedsum/core
|
c3cae44a177b9684585043a275130f9c7b67fef0
|
[
"Unlicense"
] | null | null | null |
CsPlugin/Source/CsCore/Public/Collision/Script/CsScriptLibrary_Collision.cpp
|
closedsum/core
|
c3cae44a177b9684585043a275130f9c7b67fef0
|
[
"Unlicense"
] | null | null | null |
// Copyright 2017-2021 Closed Sum Games, LLC. All Rights Reserved.
#include "Collision/Script/CsScriptLibrary_Collision.h"
#include "CsCore.h"
// Library
#include "Library/CsLibrary_Property.h"
#include "Object/CsLibrary_Object.h"
// Cached
#pragma region
namespace NCsScriptLibraryCollision
{
namespace NCached
{
namespace Str
{
CS_DEFINE_CACHED_FUNCTION_NAME_AS_STRING(UCsScriptLibrary_Collision, Set_CollisionPreset);
CS_DEFINE_CACHED_FUNCTION_NAME_AS_STRING(UCsScriptLibrary_Collision, SetFromObject_CollisionPreset);
}
namespace Name
{
const FName CollisionPreset = FName("CollisionPreset");
}
}
}
#pragma endregion Cached
UCsScriptLibrary_Collision::UCsScriptLibrary_Collision(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
bool UCsScriptLibrary_Collision::Set_CollisionPreset(const FString& Context, UPrimitiveComponent* Component, const FCsCollisionPreset& Preset)
{
using namespace NCsScriptLibraryCollision::NCached;
const FString& Ctxt = Context.IsEmpty() ? Str::Set_CollisionPreset : Context;
return Preset.SetSafe(Ctxt, Component);
}
bool UCsScriptLibrary_Collision::SetFromObject_CollisionPreset(const FString& Context, UObject* Object, UPrimitiveComponent* Component)
{
using namespace NCsScriptLibraryCollision::NCached;
const FString& Ctxt = Context.IsEmpty() ? Str::SetFromObject_CollisionPreset : Context;
// Check for properties of type: FCsCollisionPreset
typedef NCsProperty::FLibrary PropertyLibrary;
bool Success = false;
typedef FCsCollisionPreset StructType;
if (StructType* ImplAsStruct = PropertyLibrary::GetStructPropertyValuePtr<StructType>(Ctxt, Object, Object->GetClass(), Name::CollisionPreset))
{
return ImplAsStruct->SetSafe(Ctxt, Component);
}
typedef NCsObject::FLibrary ObjectLibrary;
UE_LOG(LogCs, Warning, TEXT("%s: Failed to find any properties from %s for CollisionPreset."), *Ctxt, *(ObjectLibrary::PrintObjectAndClass(Object)));
UE_LOG(LogCs, Warning, TEXT("%s: - Failed to get struct property of type: FCsCollisionPreset with name: CollisionPreset."), *Context);
return false;
}
FCollisionResponseContainer UCsScriptLibrary_Collision::SetCollisionResponse(const FCollisionResponseContainer& Container, const ECollisionChannel& Channel, const ECollisionResponse& NewResponse)
{
FCollisionResponseContainer Copy = Container;
Copy.SetResponse(Channel, NewResponse);
return Copy;
}
| 32.2
| 195
| 0.804969
|
closedsum
|
52b2dbabe4832e3e3240b827e44c4c3c4d45b8a8
| 1,756
|
cpp
|
C++
|
PressureEngineCore/Src/Graphics/Particles/ParticleMaster.cpp
|
Playturbo/PressureEngine
|
6b023165fcaecb267e13cf5532ea26a8da3f1450
|
[
"MIT"
] | 1
|
2017-09-13T13:29:27.000Z
|
2017-09-13T13:29:27.000Z
|
PressureEngineCore/Src/Graphics/Particles/ParticleMaster.cpp
|
Playturbo/PressureEngine
|
6b023165fcaecb267e13cf5532ea26a8da3f1450
|
[
"MIT"
] | null | null | null |
PressureEngineCore/Src/Graphics/Particles/ParticleMaster.cpp
|
Playturbo/PressureEngine
|
6b023165fcaecb267e13cf5532ea26a8da3f1450
|
[
"MIT"
] | 1
|
2019-01-18T07:16:59.000Z
|
2019-01-18T07:16:59.000Z
|
#include "ParticleMaster.h"
namespace Pressure {
std::map<ParticleTexture, std::list<Particle>> ParticleMaster::s_Particles;
std::unique_ptr<ParticleRenderer> ParticleMaster::s_Renderer = nullptr;
void ParticleMaster::init(Loader& loader, GLFWwindow* window) {
s_Renderer = std::make_unique<ParticleRenderer>(loader, Matrix4f().createProjectionMatrix(window));
}
void ParticleMaster::tick(Camera& camera) {
// Creates a loop that loop through all elements in all the lists in the map.
auto map = s_Particles.begin();
while (map != s_Particles.end()) {
bool empty = false;
auto& list = map->second;
auto particle = list.begin();
while (particle != list.end()) {
if (!particle->isAlive(camera)) {
particle = list.erase(particle);
empty = list.size() == 0;
}
else
particle++;
}
if (!map->first.isUseAdditiveBlending())
list.sort(sort_particles);
if (empty)
map = s_Particles.erase(map);
else map++;
}
}
void ParticleMaster::renderParticles(Camera& camera) {
s_Renderer.get()->render(s_Particles, camera);
}
void ParticleMaster::cleanUp() {
s_Renderer.get()->cleanUp();
}
void ParticleMaster::addParticle(Particle& particle) {
// Creates new list if it does not exist, else grabs existing one.
auto it = s_Particles.find(particle.getTexture());
if (it == s_Particles.end())
s_Particles.emplace(particle.getTexture(), std::list<Particle>({ particle }));
else
it->second.emplace_front(particle);
}
void ParticleMaster::updateProjectionMatrix(Window& window) {
s_Renderer->updateProjectionMatrix(window);
}
bool ParticleMaster::sort_particles(const Particle& left, const Particle& right) {
return left.getDistance() > right.getDistance();
}
}
| 27.4375
| 101
| 0.699886
|
Playturbo
|
52b2fdf2ce67c3f0b97c874549a2661d671b6dc4
| 1,393
|
cpp
|
C++
|
src/argos_lib/cpp/subsystems/swappable_controllers_subsystem.cpp
|
FRC1756-Argos/ArgosLib-Cpp
|
bd6f50329b9ddd1e603ee520b54c60d65f4fb6e7
|
[
"BSD-3-Clause"
] | null | null | null |
src/argos_lib/cpp/subsystems/swappable_controllers_subsystem.cpp
|
FRC1756-Argos/ArgosLib-Cpp
|
bd6f50329b9ddd1e603ee520b54c60d65f4fb6e7
|
[
"BSD-3-Clause"
] | null | null | null |
src/argos_lib/cpp/subsystems/swappable_controllers_subsystem.cpp
|
FRC1756-Argos/ArgosLib-Cpp
|
bd6f50329b9ddd1e603ee520b54c60d65f4fb6e7
|
[
"BSD-3-Clause"
] | null | null | null |
/// \copyright Copyright (c) Argos FRC Team 1756.
/// Open Source Software; you can modify and/or share it under the terms of
/// the license file in the root directory of this project.
#include "argos_lib/subsystems/swappable_controllers_subsystem.h"
using namespace argos_lib;
SwappableControllersSubsystem::SwappableControllersSubsystem(int driverControllerPort, int operatorControllerPort)
: m_driverController(driverControllerPort), m_operatorController(operatorControllerPort), m_swapped(false) {}
void SwappableControllersSubsystem::Swap() {
m_driverController.SwapSettings(m_operatorController);
m_swapped = !m_swapped;
}
XboxController& SwappableControllersSubsystem::DriverController() {
return m_swapped ? m_operatorController : m_driverController;
}
XboxController& SwappableControllersSubsystem::OperatorController() {
return m_swapped ? m_driverController : m_operatorController;
}
/**
* Will be called periodically whenever the CommandScheduler runs.
*/
void SwappableControllersSubsystem::Periodic() {
UpdateVibration();
}
void SwappableControllersSubsystem::VibrateAll(VibrationModel newModel) {
m_driverController.SetVibration(newModel);
m_operatorController.SetVibration(newModel);
}
void SwappableControllersSubsystem::UpdateVibration() {
m_driverController.UpdateVibration();
m_operatorController.UpdateVibration();
}
| 34.825
| 114
| 0.803302
|
FRC1756-Argos
|
52b64a8477f85d51f197e22e247e5e5eca124c96
| 952
|
cpp
|
C++
|
arrays/array_basics2.cpp
|
neerajsingh869/data-structures-and-algorithms
|
96087e68fdce743f90f75228af1c7d111f6b92b7
|
[
"MIT"
] | null | null | null |
arrays/array_basics2.cpp
|
neerajsingh869/data-structures-and-algorithms
|
96087e68fdce743f90f75228af1c7d111f6b92b7
|
[
"MIT"
] | null | null | null |
arrays/array_basics2.cpp
|
neerajsingh869/data-structures-and-algorithms
|
96087e68fdce743f90f75228af1c7d111f6b92b7
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <queue>
using namespace std;
void changes(int arr[], int n)
{
for (int i = 0; i < n; i++)
{
arr[i] = 10;
}
}
int main()
{
int nums[] = {0, 1, 2, 3, 4, 5, 6, 7};
int n = sizeof(nums) / sizeof(nums[0]);
// Before calling changes()
for (int i = 0; i < n; i++)
{
cout << nums[i] << " ";
}
/* nums behaves like a pointer because it stores the adress of nums[0]. So if you
have passed it to other function as argument, then it is call by reference.*/
changes(nums, n);
cout <<"\n"<< nums << endl;
// after calling changes()
for (int i = 0; i < n; i++)
{
cout << nums[i] << " ";
}
// CONCLUSION
/*So, if you don't want to make changes/modifications in original array,
then first decalare another array, copy the original array elements
in it and then pass the other array as arguments of the function*/
return 0;
}
| 26.444444
| 86
| 0.563025
|
neerajsingh869
|
52b893a2537b9a4a29562dc015d3ad4b7f1ec5c1
| 576
|
cc
|
C++
|
src/math/Vector2.cc
|
shawndfl/game-sample
|
1937f4efb98e1ea5cc4f1124ba611b9626182d57
|
[
"MIT"
] | null | null | null |
src/math/Vector2.cc
|
shawndfl/game-sample
|
1937f4efb98e1ea5cc4f1124ba611b9626182d57
|
[
"MIT"
] | null | null | null |
src/math/Vector2.cc
|
shawndfl/game-sample
|
1937f4efb98e1ea5cc4f1124ba611b9626182d57
|
[
"MIT"
] | null | null | null |
/*
* Vector2.cc
*
* Created on: Aug 30, 2020
* Author: sdady
*/
#include "Vector2.h"
#include "glad/glad.h"
namespace bsk {
/*************************************************/
Vector2::Vector2(): x(0), y(0) {
}
/*************************************************/
Vector2::Vector2(float x, float y) {
this->x = x;
this->y = y;
}
/*************************************************/
Vector2::~Vector2() {
}
/*************************************************/
void Vector2::setUniform(int name) const {
glUniform2f(name, x, y);
}
} /* namespace bsk */
| 16.941176
| 51
| 0.369792
|
shawndfl
|
52b977559d59cd9245e09c35092a75cf4571f623
| 320
|
cpp
|
C++
|
src/h5viewer/main.cpp
|
martyngigg/h5view
|
2ab16840e0be132aca60f2815e9d45fab74c9ab1
|
[
"MIT"
] | null | null | null |
src/h5viewer/main.cpp
|
martyngigg/h5view
|
2ab16840e0be132aca60f2815e9d45fab74c9ab1
|
[
"MIT"
] | 3
|
2019-10-28T20:42:34.000Z
|
2020-03-08T09:38:54.000Z
|
src/h5viewer/main.cpp
|
martyngigg/h5view
|
2ab16840e0be132aca60f2815e9d45fab74c9ab1
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include "h5view/h5view.hpp"
using std::cerr;
using std::cout;
using h5view::first_object_name;
int main(int argc, char **argv) {
if(argc != 2) {
cerr << "Usage: h5viewer filepath\n";
return 1;
}
std::cout << "First object name=" << first_object_name(argv[1]) << "\n";
return 0;
}
| 18.823529
| 74
| 0.634375
|
martyngigg
|
52bba4b8a518acc0a303c2268558f9f7a9a5d643
| 3,530
|
cpp
|
C++
|
app/src/render/render_image.cpp
|
shuyanglin/antimony-interactive
|
4787dea233c62015babb0da5e299d9f41d500905
|
[
"MIT",
"Unlicense"
] | null | null | null |
app/src/render/render_image.cpp
|
shuyanglin/antimony-interactive
|
4787dea233c62015babb0da5e299d9f41d500905
|
[
"MIT",
"Unlicense"
] | null | null | null |
app/src/render/render_image.cpp
|
shuyanglin/antimony-interactive
|
4787dea233c62015babb0da5e299d9f41d500905
|
[
"MIT",
"Unlicense"
] | null | null | null |
#include <Python.h>
#include <QCoreApplication>
#include "render/render_image.h"
#include "ui/viewport/depth_image.h"
#include "fab/types/shape.h"
#include "fab/util/region.h"
#include "fab/tree/render.h"
#include "fab/formats/png.h"
RenderImage::RenderImage(Bounds b, QVector3D pos, float scale)
: QObject(), bounds(b), pos(pos), scale(scale),
depth((b.xmax - b.xmin) * scale,
(b.ymax - b.ymin) * scale,
QImage::Format_RGB32),
shaded(depth.width(), depth.height(), depth.format()),
halt_flag(0), color(255, 255, 255), flat(false)
{
// Nothing to do here
// (render() must be called explicity)
}
void RenderImage::halt()
{
halt_flag = true;
}
static void processEvents()
{
QCoreApplication::processEvents();
}
void RenderImage::render(Shape *shape)
{
depth.fill(0x000000);
uint16_t* d16(new uint16_t[depth.width() * depth.height()]);
uint16_t** d16_rows(new uint16_t*[depth.height()]);
uint8_t (*s8)[3] = new uint8_t[depth.width() * depth.height()][3];
uint8_t (**s8_rows)[3] = new decltype(s8)[depth.height()];
for (int i=0; i < depth.height(); ++i)
{
d16_rows[i] = &d16[depth.width() * i];
s8_rows[i] = &s8[depth.width() * i];
}
memset(d16, 0, depth.width() * depth.height() * 2);
memset(s8, 0, depth.width() * depth.height() * 3);
Region r = (Region) {
.imin=0, .jmin=0, .kmin=0,
.ni=(uint32_t)depth.width(), .nj=(uint32_t)depth.height(),
.nk=uint32_t(fmax(1, (shape->bounds.zmax -
shape->bounds.zmin) * scale))
};
build_arrays(&r, shape->bounds.xmin, shape->bounds.ymin, shape->bounds.zmin,
shape->bounds.xmax, shape->bounds.ymax, shape->bounds.zmax);
render16(shape->tree.get(), r, d16_rows, &halt_flag, &processEvents);
shaded8(shape->tree.get(), r, d16_rows, s8_rows, &halt_flag, &processEvents);
free_arrays(&r);
// Copy from bitmap arrays into a QImage
for (int j=0; j < depth.height(); ++j)
{
for (int i=0; i < depth.width(); ++i)
{
uint8_t pix = d16_rows[j][i] >> 8;
uint8_t* norm = s8_rows[j][i];
if (pix)
{
depth.setPixel(i, depth.height() - j - 1,
pix | (pix << 8) | (pix << 16));
shaded.setPixel(i, depth.height() - j - 1,
norm[0] | (norm[1] << 8) | (norm[2] << 16));
}
}
}
delete [] s8;
delete [] s8_rows;
delete [] d16;
delete [] d16_rows;
}
void RenderImage::applyGradient(bool direction)
{
for (int j=0; j < depth.height(); ++j)
{
for (int i=0; i < depth.width(); ++i)
{
uint8_t pix = depth.pixel(i, j) & 0xff;
if (pix)
{
if (direction)
pix *= j / float(depth.height());
else
pix *= 1 - j / float(depth.height());
depth.setPixel(i, j, pix | (pix << 8) | (pix << 16));
}
}
}
}
void RenderImage::setNormals(float xy, float z)
{
shaded.fill((int(z * 255) << 16) | int(xy * 255));
}
DepthImageItem* RenderImage::addToViewport(Viewport* viewport)
{
return new DepthImageItem(pos,
QVector3D(bounds.xmax - bounds.xmin,
bounds.ymax - bounds.ymin,
bounds.zmax - bounds.zmin),
depth, shaded, color, flat, viewport);
}
| 28.699187
| 81
| 0.530312
|
shuyanglin
|
52bc0b38a7df65353149b6d577f1874c98f1a1ff
| 1,080
|
cpp
|
C++
|
svgimageprovider.cpp
|
user1095108/qtnanosvg
|
9260ed11c9ba7d711e87110723e11e0c5eb706e4
|
[
"Unlicense"
] | 2
|
2021-09-07T04:33:48.000Z
|
2022-01-08T07:28:42.000Z
|
svgimageprovider.cpp
|
user1095108/qtnanosvg
|
9260ed11c9ba7d711e87110723e11e0c5eb706e4
|
[
"Unlicense"
] | 1
|
2021-10-14T10:56:14.000Z
|
2021-10-14T10:56:14.000Z
|
svgimageprovider.cpp
|
user1095108/qtnanosvg
|
9260ed11c9ba7d711e87110723e11e0c5eb706e4
|
[
"Unlicense"
] | null | null | null |
#include <QFile>
#include <QPainter>
#include "qtnanosvg.hpp"
#include "nanosvg/src/nanosvg.h"
#include "svgimageprovider.hpp"
//////////////////////////////////////////////////////////////////////////////
SVGImageProvider::SVGImageProvider():
QQuickImageProvider(QQmlImageProviderBase::Pixmap)
{
}
//////////////////////////////////////////////////////////////////////////////
QPixmap SVGImageProvider::requestPixmap(QString const& id, QSize* sz,
QSize const& rs)
{
QPixmap pixmap(*sz = rs);
//
if (QFile f(id); !rs.isEmpty() && f.open(QIODevice::ReadOnly))
{
if (auto const sz(f.size()); sz)
{
QByteArray ba;
ba.resize(sz + 1);
if (f.read(ba.data(), sz) == sz)
{
ba.back() = {};
if (auto const nsi(nsvgParse(ba.data(), "px", 96)); nsi)
{
pixmap.fill(Qt::transparent);
QPainter p(&pixmap);
p.setRenderHint(QPainter::Antialiasing, true);
drawSVGImage(&p, nsi, rs.width(), rs.height());
nsvgDelete(nsi);
}
}
}
}
return pixmap;
}
| 21.176471
| 78
| 0.496296
|
user1095108
|
1ebf0d559227f711f3d9cdecb096fb85ef3cc9cb
| 13,382
|
cpp
|
C++
|
gcpp/classes/ogetoptv.cpp
|
razzlefratz/MotleyTools
|
3c69c574351ce6f4b7e687c13278d4b6cbb200f3
|
[
"0BSD"
] | 2
|
2015-10-15T19:32:42.000Z
|
2021-12-20T15:56:04.000Z
|
gcpp/classes/ogetoptv.cpp
|
razzlefratz/MotleyTools
|
3c69c574351ce6f4b7e687c13278d4b6cbb200f3
|
[
"0BSD"
] | null | null | null |
gcpp/classes/ogetoptv.cpp
|
razzlefratz/MotleyTools
|
3c69c574351ce6f4b7e687c13278d4b6cbb200f3
|
[
"0BSD"
] | null | null | null |
/*====================================================================*
*
* ogetoptv.cpp - implementation of the ogetoptv class.
*
* this is a posix compliant getoptv() function that supports absolutely
* no extensions; visit the posix webpage that specifies this function
* to learn more;
*
* <http://www.opengroup.org/onlinepubs/007904975/functions/getopt.html>
*
* we implemented this function to make console programs for windows and
* debian linux act the same; microsoft c++ would not compile the debian
* version of getoptv and after trying to fix it we decided to start over;
*
* this function conforms to posix standard in that it does not support
* gnu style extensions such as "--option" for arguments or "ab::c" for
* options strings; if you don't know what that means then you probably
* won't care either; you should not implement these extentions, anyway;
*
* the posix standard says that command line options and their operands
* must precede all other arguments; we find this restrictive and allow
* option arguments to appear anywhere; this implementation re-arranges
* a non-compliant argv[] to be posix compliant on completion;
*
* we have defined characters, instead of coding them, so that microsoft
* folks can change '-' to '/' but preserve the posix behaviour;
*
* this implementation calls no functions and so there should not be any
* problem with external declarations; a posix compliant unistd.h should
* be enough; or use our getoptv.h as an alternative; or you can add the
* following declarations in a header file, somwhere:
*
* extern char * optarg;
* extern int optopt;
* extern int optind;
* extern int opterr;
*
* this implementation resets when you call it with optind=0 or optind=1;
* the 0 is gnu/debian compliant and the 1 is posix compliant; after that
* it runs to completion, unless you reset optind;
*
* the posix site does an excellent job of defining function behaviour and
* illustrating its use; if you have questions, see them; you can also cut
* and paste this c language code segment to get you started;
*
* ogetoptv options;
* signed c;
* optind = 1;
* opterr = 1;
* while ((c = options.getoptv(argc, argv, ":ab:c")) != -1)
* {
* switch(c)
* {
* case 'a': // optopt is 'a'
* case 'b': // optopt is 'b'; optarg is string;
*
* case ':': // optopt is legal but no operand so optarg is null;
* case '?': // optopt is illegal and optarg is null;
* default: // valid options having no 'case' code;
* }
* }
*
* while (options.optind < argc)
* {
* // do stuff to argv[options.optind++].
* }
*
*. Motley Tools by Charles Maier
*: Published 1982-2005 by Charles Maier for personal use
*; Licensed under the Internet Software Consortium License
*
*--------------------------------------------------------------------*/
#ifndef oGETOPTV_SOURCE
#define oGETOPTV_SOURCE
/*====================================================================*
* custom header files;
*--------------------------------------------------------------------*/
#include <iostream>
#include <cstring>
#include <cstdlib>
/*====================================================================*
* custom source files;
*--------------------------------------------------------------------*/
#include "../classes/ogetoptv.hpp"
#include "../classes/oputoptv.hpp"
#include "../classes/oversion.hpp"
/*====================================================================*
* program variables;
*--------------------------------------------------------------------*/
char const * program_name = PACKAGE;
/*====================================================================*
*
* signed opterr () const;
*
* return the error message flag state;
*
*--------------------------------------------------------------------*/
signed ogetoptv::opterr () const
{
return (this->mopterr);
}
/*====================================================================*
*
* ogetoptv & opterr (signed opterr);
*
* set the error message flag state;
*
*--------------------------------------------------------------------*/
ogetoptv & ogetoptv::opterr (signed opterr)
{
this->mopterr = opterr;
return (* this);
}
/*====================================================================*
*
* signed optmin () const;
*
* return the minimum argument flag state;
*
*--------------------------------------------------------------------*/
signed ogetoptv::optmin () const
{
return (this->moptmin);
}
/*====================================================================*
*
* ogetoptv & optmin (signed optmin);
*
* set the minimum argument flag state;
*
*--------------------------------------------------------------------*/
ogetoptv & ogetoptv::optmin (signed optmin)
{
this->moptmin = optmin;
return (* this);
}
/*====================================================================*
*
* signed optind () const;
*
* return the index of the next argv[] string; this index defines the
* start address for the remainder of argument vector argv[];
*
*--------------------------------------------------------------------*/
signed ogetoptv::optind () const
{
return (this->moptind);
}
/*====================================================================*
*
* ogetoptv & optind (signed optind);
*
* set the index of the next argv[] string;
*
*--------------------------------------------------------------------*/
ogetoptv & ogetoptv::optind (signed optind)
{
this->moptind = optind;
return (* this);
}
/*====================================================================*
*
* signed optopt () const;
*
* return the value of the option character;
*
*--------------------------------------------------------------------*/
signed ogetoptv::optopt () const
{
return (this->moptopt);
}
/*====================================================================*
*
* char const * optarg () const;
*
* return a pointer to the option string;
*
*--------------------------------------------------------------------*/
char const * ogetoptv::optarg () const
{
return (this->moptarg);
}
/*====================================================================*
*
* signed argc () const;
*
* return the number of arguments left in argv; it is computed by
* subtracting member mpotind from member margc; it can eliminate
* the need for the customary "argc-=optind" statement;
*
*--------------------------------------------------------------------*/
signed ogetoptv::argc () const
{
return (this->margc - this->moptind);
}
/*====================================================================*
*
* char const ********************************************************************** argv () const;
*
* return the start address of the unprocessed portions of argv [];
*
*--------------------------------------------------------------------*/
char const ** ogetoptv::argv () const
{
return (this->margv + this->moptind);
}
/*====================================================================*
*
* char const * args () const;
*
* return option argument string address;
*
*--------------------------------------------------------------------*/
char const * ogetoptv::args ()
{
return (this->moptarg);
}
/*====================================================================*
*
* signed operator++ (signed);
*
* return the value of member moptind and increment optind if less
* than margc; this is not a posix feature; it is an extension;
*
*--------------------------------------------------------------------*/
signed ogetoptv::operator++ (signed)
{
return (this->moptind < this->margc? this->moptind++: this->moptind);
}
/*====================================================================*
*
* signed getoptv (int argc, char const * argv[], char const * optv []);
*
*
*--------------------------------------------------------------------*/
signed ogetoptv::getoptv (int argc, char const * argv [], char const * optv [])
{
extern char const * program_name;
char const ** action;
char const * option;
if ((this->moptind == 0) || (this->moptind == 1))
{
this->margc = argc;
this->margv = argv;
for (program_name = this->mstring = * this->margv; * this->mstring; this->mstring++)
{
if ((* this->mstring == '/') || (* this->mstring == '\\'))
{
program_name = this->mstring + 1;
}
}
this->mstring = (char *) (0);
oversion::program (program_name);
if (this->margc == this->moptmin)
{
oputoptv::putoptv (optv);
std::exit (0);
}
this->mcount = this->moptind = 1;
}
optv++;
optv++;
while ((this->mcount < this->margc) || (this->mstring))
{
if (this->mstring)
{
if (* this->mstring)
{
this->moptopt = * this->mstring++;
this->moptarg = (char *) (0);
#if 1
/*
* This block is eseentially oputoptv::putopt();
*/
for (option = * optv++; * option; option++)
{
if (* option == ':')
{
continue;
}
for (action = optv; * action; action++)
{
if (* option == ** action)
{
break;
}
}
if (* action)
{
continue;
}
std::cerr << program_name << ": option '" << * option << "' has no description" << std::endl;
}
for (action = optv--; * action; action++)
{
for (option = * optv; * option; option++)
{
if (* option == ':')
{
continue;
}
if (* option == ** action)
{
break;
}
}
if (* option)
{
continue;
}
std::cerr << program_name << ": description \"" << * action << "\" has no option" << std::endl;
}
#endif
for (option = * optv; * option; option++)
{
if (this->moptopt == oGETOPTV_C_OPERAND)
{
continue;
}
if (* option == oGETOPTV_C_OPERAND)
{
continue;
}
if (* option == this->moptopt)
{
if (* ++ option != oGETOPTV_C_OPERAND)
{
return (this->moptopt);
}
if (* this->mstring)
{
this->moptarg = this->mstring;
this->mstring = (char *) (0);
return (this->moptopt);
}
if (this->mcount < this->margc)
{
this->moptarg = argv [this->mcount];
for (this->mindex = this->mcount++; this->mindex > this->moptind; -- this->mindex)
{
argv [this->mindex] = argv [this->mindex -1];
}
argv [this->moptind++] = this->moptarg;
return (this->moptopt);
}
if (this->mopterr)
{
std::cerr << program_name << ": option '" << (char) (this->moptopt) << "' has no operand" << std::endl;
std::exit (this->mopterr);
}
if (** optv == oGETOPTV_C_OPERAND)
{
return (oGETOPTV_C_OPERAND);
}
return (oGETOPTV_C_ILLEGAL);
}
}
if (this->mopterr)
{
std::cerr << program_name << ": option '" << (char) (this->moptopt) << "' has no meaning" << std::endl;
std::exit (this->mopterr);
}
return (oGETOPTV_C_ILLEGAL);
}
this->mstring = (char *) (0);
}
if (this->mcount < this->margc)
{
this->mstring = this->margv [this->mcount];
if (* this->mstring == oGETOPTV_C_OPTIONS)
{
for (this->mindex = this->mcount; this->mindex > this->moptind; -- this->mindex)
{
this->margv [this->mindex] = this->margv [this->mindex -1];
}
this->margv [this->moptind++] = this->mstring++;
if (* this->mstring == oGETOPTV_C_OPTIONS)
{
if (! * ++ this->mstring)
{
this->moptarg = (char *) (0);
this->moptopt = (char) (0);
return (-1);
}
if (! std::strcmp (this->mstring, "version"))
{
oversion::print ();
std::exit (0);
}
if (! std::strcmp (this->mstring, "help"))
{
optv--;
optv--;
oputoptv::putoptv (optv);
std::exit (0);
}
this->mstring = (char *) (0);
continue;
}
if (* this->mstring == oGETOPTV_C_VERSION)
{
oversion::print ();
std::exit (0);
}
if (* this->mstring == oGETOPTV_C_SUMMARY)
{
optv--;
optv--;
oputoptv::putoptv (optv);
std::exit (0);
}
}
else
{
this->mstring = (char *) (0);
}
this->mcount++;
}
}
this->moptarg = (char *) (0);
this->moptopt = (char) (0);
return (-1);
}
/*====================================================================*
*
* ogetoptv ();
*
*--------------------------------------------------------------------*/
ogetoptv::ogetoptv ()
{
this->margs = new char [1];
this->margs [0] = (char) (0);
this->moptarg = (char *) (0);
this->moptopt = (char) (0);
this->mopterr = 1;
this->moptind = 1;
this->moptmin = 0;
return;
}
/*====================================================================*
*
* ~ogetoptv ();
*
*--------------------------------------------------------------------*/
ogetoptv::~ ogetoptv ()
{
delete [] this->margs;
this->moptarg = (char *) (0);
this->moptopt = (char) (0);
return;
}
/*====================================================================*
* end implementation
*--------------------------------------------------------------------*/
#endif
| 25.833977
| 110
| 0.453445
|
razzlefratz
|
1ebf66414def2e973c747bbf7321d75a8990a1b0
| 913
|
cpp
|
C++
|
Source/Bld.cpp
|
brigaudet/ERF
|
8277e9bdfff5590f9c208ac3dc9a4f38f1d7f556
|
[
"BSD-3-Clause-LBNL"
] | 3
|
2020-11-05T19:41:55.000Z
|
2021-04-23T01:00:17.000Z
|
Source/Bld.cpp
|
brigaudet/ERF
|
8277e9bdfff5590f9c208ac3dc9a4f38f1d7f556
|
[
"BSD-3-Clause-LBNL"
] | 98
|
2021-02-03T21:55:22.000Z
|
2022-03-31T05:14:42.000Z
|
Source/Bld.cpp
|
brigaudet/ERF
|
8277e9bdfff5590f9c208ac3dc9a4f38f1d7f556
|
[
"BSD-3-Clause-LBNL"
] | 12
|
2020-11-02T04:55:38.000Z
|
2021-11-12T22:42:57.000Z
|
#include <AMReX_LevelBld.H>
#include "ERF.H"
class ERFBld : public amrex::LevelBld
{
virtual void variableSetUp();
virtual void variableCleanUp();
virtual amrex::AmrLevel* operator()();
virtual amrex::AmrLevel* operator()(
amrex::Amr& papa,
int lev,
const amrex::Geometry& level_geom,
const amrex::BoxArray& ba,
const amrex::DistributionMapping& dm,
amrex::Real time);
};
ERFBld ERF_bld;
amrex::LevelBld*
getLevelBld()
{
return &ERF_bld;
}
void
ERFBld::variableSetUp()
{
ERF::variableSetUp();
}
void
ERFBld::variableCleanUp()
{
ERF::variableCleanUp();
}
amrex::AmrLevel*
ERFBld::operator()()
{
return new ERF;
}
amrex::AmrLevel*
ERFBld::operator()(
amrex::Amr& papa,
int lev,
const amrex::Geometry& level_geom,
const amrex::BoxArray& ba,
const amrex::DistributionMapping& dm,
amrex::Real time)
{
return new ERF(papa, lev, level_geom, ba, dm, time);
}
| 16.303571
| 54
| 0.683461
|
brigaudet
|
1ec07297de92bed7558c678b21e7a15f83bfa95a
| 2,637
|
cpp
|
C++
|
Cpp/126.word-ladder-ii.cpp
|
zszyellow/leetcode
|
2ef6be04c3008068f8116bf28d70586e613a48c2
|
[
"MIT"
] | 1
|
2015-12-19T23:05:35.000Z
|
2015-12-19T23:05:35.000Z
|
Cpp/126.word-ladder-ii.cpp
|
zszyellow/leetcode
|
2ef6be04c3008068f8116bf28d70586e613a48c2
|
[
"MIT"
] | null | null | null |
Cpp/126.word-ladder-ii.cpp
|
zszyellow/leetcode
|
2ef6be04c3008068f8116bf28d70586e613a48c2
|
[
"MIT"
] | null | null | null |
class Solution {
public:
vector<vector<string>> findLadders(string beginWord, string endWord, vector<string>& wordList) {
vector<vector<string>> res;
if (std::find(wordList.begin(), wordList.end(), endWord) == wordList.end()) return res;
// preprocessing
int L = beginWord.size();
unordered_map<string, vector<string>> combo_dict;
for (string &word : wordList) {
for (int i = 0; i < L; ++ i) {
string pattern = string(word.begin(), word.begin()+i) + "*" +
string(word.begin()+i+1, word.end());
if (combo_dict.find(pattern) == combo_dict.end()) combo_dict[pattern] = vector<string>{word};
else combo_dict[pattern].push_back(word);
}
}
// bfs through path not word
queue<vector<string>> q;
q.push({beginWord});
unordered_set<string> visited;
visited.insert(beginWord);
unordered_set<string> unvisited_cur_level(wordList.begin(), wordList.end());
vector<string> sequence;
int min_level = INT_MAX;
int level = 0;
while (!q.empty()) {
auto path = q.front();
q.pop();
if (path.size() > level) {
if (path.size() > min_level) break;
else {
level = path.size();
for (auto &v : visited) {
unvisited_cur_level.erase(v);
}
}
}
string cur_word = path.back();
for (int i = 0; i < L; ++ i) {
string pattern = string(cur_word.begin(), cur_word.begin()+i) + "*" +
string(cur_word.begin()+i+1, cur_word.end());
if (combo_dict.find(pattern) != combo_dict.end()) {
for (string &next_word : combo_dict[pattern]) {
vector<string> new_path(path);
if (next_word == endWord) {
min_level = level;
new_path.push_back(endWord);
res.push_back(new_path);
} else if (unvisited_cur_level.find(next_word) != unvisited_cur_level.end()) {
visited.insert(next_word);
new_path.push_back(next_word);
q.push(new_path);
}
}
}
}
}
return res;
}
};
| 39.954545
| 109
| 0.452408
|
zszyellow
|
1ec2ca85529a4eac8478593b8c3046ce4f17f0f1
| 3,344
|
cpp
|
C++
|
aoc21/code18.cpp
|
nakst/jam
|
1ddca72698d86eb300c616732f2b9d5989f2a2bc
|
[
"MIT"
] | 3
|
2021-11-25T16:23:55.000Z
|
2022-03-03T03:35:15.000Z
|
aoc21/code18.cpp
|
nakst/jam
|
1ddca72698d86eb300c616732f2b9d5989f2a2bc
|
[
"MIT"
] | null | null | null |
aoc21/code18.cpp
|
nakst/jam
|
1ddca72698d86eb300c616732f2b9d5989f2a2bc
|
[
"MIT"
] | null | null | null |
#include "ds.h"
#define OPEN (-1)
#define CLOSE (-2)
#define COMMA (-3)
struct Number {
Array<int> c;
};
Array<Number> numbers = {};
Number Add(Number left, Number right) {
Number x = {};
x.c.Add(OPEN);
for (int i = 0; i < left.c.Length(); i++) {
x.c.Add(left.c[i]);
}
x.c.Add(COMMA);
for (int i = 0; i < right.c.Length(); i++) {
x.c.Add(right.c[i]);
}
x.c.Add(CLOSE);
while (true) {
int n = 0;
bool didReduction = false;
for (int i = 0; i < x.c.Length(); i++) {
if (x.c[i] == OPEN) {
if (n == 4) {
// Explode.
assert(x.c[i + 2] == COMMA);
assert(x.c[i + 4] == CLOSE);
for (int j = i; j >= 0; j--) {
if (x.c[j] >= 0) {
x.c[j] += x.c[i + 1];
break;
}
}
for (int j = i + 4; j < x.c.Length(); j++) {
if (x.c[j] >= 0) {
x.c[j] += x.c[i + 3];
break;
}
}
x.c.Delete(i);
x.c.Delete(i);
x.c.Delete(i);
x.c.Delete(i);
x.c.Delete(i);
x.c.Insert(0, i);
didReduction = true;
break;
} else {
n++;
}
} else if (x.c[i] == CLOSE) {
n--;
}
}
if (!didReduction) {
for (int i = 0; i < x.c.Length(); i++) {
if (x.c[i] >= 10) {
int y = x.c[i];
x.c.Delete(i);
x.c.Insert(CLOSE, i);
x.c.Insert((y + 1) / 2, i);
x.c.Insert(COMMA, i);
x.c.Insert(y / 2, i);
x.c.Insert(OPEN, i);
didReduction = true;
break;
}
}
}
if (!didReduction) {
break;
}
}
return x;
}
int64_t Magnitude(Number x) {
int n = 0;
for (int i = 0; i < x.c.Length(); i++) {
if (x.c[i] == OPEN) {
n++;
} else if (x.c[i] == CLOSE) {
n--;
} else if (x.c[i] == COMMA) {
if (n == 1) {
Number left = {};
Number right = {};
assert(x.c.First() == OPEN);
assert(x.c.Last() == CLOSE);
for (int j = 1; j < i; j++) {
left.c.Add(x.c[j]);
}
for (int j = i + 1; j < x.c.Length() - 1; j++) {
right.c.Add(x.c[j]);
}
int64_t r = Magnitude(left) * 3 + Magnitude(right) * 2;
left.c.Free();
right.c.Free();
return r;
}
} else if (x.c[i] >= 0) {
if (n == 0) {
assert(x.c.Length() == 1);
return x.c[i];
}
}
}
return n;
}
void Part1() {
Number left = numbers[0];
for (int i = 1; i < numbers.Length(); i++) {
Number oldLeft = left;
left = Add(oldLeft, numbers[i]);
if (i >= 2) oldLeft.c.Free();
}
printf("part 1: %ld\n", Magnitude(left));
left.c.Free();
}
void Part2() {
int64_t m = 0;
for (int i = 0; i < numbers.Length(); i++) {
for (int j = 0; j < numbers.Length(); j++) {
if (i == j) {
continue;
}
Number sum = Add(numbers[i], numbers[j]);
int64_t x = Magnitude(sum);
MAXIMIZE(m, x);
sum.c.Free();
}
}
printf("part 2: %ld\n", m);
}
int main() {
FILE *f = fopen("in18.txt", "rb");
while (true) {
char line[1024];
if (fscanf(f, "%s\n", line) == -1) {
break;
}
Number number = {};
for (int i = 0; line[i]; i++) {
if (line[i] == '[') {
number.c.Add(OPEN);
} else if (line[i] == ']') {
number.c.Add(CLOSE);
} else if (line[i] == ',') {
number.c.Add(COMMA);
} else {
number.c.Add(line[i] - '0');
}
}
numbers.Add(number);
}
fclose(f);
Part1();
Part2();
for (int i = 0; i < numbers.Length(); i++) {
numbers[i].c.Free();
}
numbers.Free();
}
| 16
| 59
| 0.453947
|
nakst
|
1ec32d29433f15fc3dee70892d16c3f2aa76d0f5
| 1,139
|
hpp
|
C++
|
editor/src/FilePickerDialog.hpp
|
aleksigron/graphics-toolkit
|
f8e60c57316a72dff9de07512e9771deb3799208
|
[
"MIT"
] | null | null | null |
editor/src/FilePickerDialog.hpp
|
aleksigron/graphics-toolkit
|
f8e60c57316a72dff9de07512e9771deb3799208
|
[
"MIT"
] | null | null | null |
editor/src/FilePickerDialog.hpp
|
aleksigron/graphics-toolkit
|
f8e60c57316a72dff9de07512e9771deb3799208
|
[
"MIT"
] | null | null | null |
#pragma once
#include <cstdint>
#include <filesystem>
namespace kokko
{
namespace editor
{
class FilePickerDialog
{
public:
enum class Type
{
FileOpen,
FileSave,
FolderOpen,
};
struct Descriptor
{
const char* popupTitle;
const char* descriptionText;
const char* actionButtonText;
Type dialogType;
bool relativeToAssetPath;
std::filesystem::path assetPath;
};
FilePickerDialog();
void Update();
/*
* Returns true when a dialog with the specied ID has finished.
* If true, parameter pathOut is assigned the selected path, or an empty string,
* if the dialog was cancelled.
*/
bool GetDialogResult(uint64_t id, std::filesystem::path& pathOut);
uint64_t StartDialog(const Descriptor& descriptor);
private:
void CloseDialog(bool canceled);
std::filesystem::path ConvertPath(const std::filesystem::path& path);
std::filesystem::path currentPath;
std::filesystem::path selectedFilePath;
bool dialogClosed;
uint64_t closedTitleHash;
std::filesystem::path resultPath;
uint64_t currentTitleHash;
Descriptor descriptor;
};
}
}
| 17.523077
| 81
| 0.701493
|
aleksigron
|
1ec575e0ba9d494246a7a3391596c3f3253171f2
| 604
|
hpp
|
C++
|
src/framework/shared/inc/private/common/fxpkgioshared.hpp
|
IT-Enthusiast-Nepal/Windows-Driver-Frameworks
|
bfee6134f30f92a90dbf96e98d54582ecb993996
|
[
"MIT"
] | 994
|
2015-03-18T21:37:07.000Z
|
2019-04-26T04:04:14.000Z
|
src/framework/shared/inc/private/common/fxpkgioshared.hpp
|
IT-Enthusiast-Nepal/Windows-Driver-Frameworks
|
bfee6134f30f92a90dbf96e98d54582ecb993996
|
[
"MIT"
] | 13
|
2019-06-13T15:58:03.000Z
|
2022-02-18T22:53:35.000Z
|
src/framework/shared/inc/private/common/fxpkgioshared.hpp
|
IT-Enthusiast-Nepal/Windows-Driver-Frameworks
|
bfee6134f30f92a90dbf96e98d54582ecb993996
|
[
"MIT"
] | 350
|
2015-03-19T04:29:46.000Z
|
2019-05-05T23:26:50.000Z
|
/*++
Copyright (c) Microsoft Corporation
Module Name:
FxPkgIoShared.hpp
Abstract:
This file contains portion of FxPkgIo.hpp that is need in shared code.
Author:
Environment:
Revision History:
--*/
#ifndef _FXPKGIOSHARED_HPP_
#define _FXPKGIOSHARED_HPP_
enum FxIoStopProcessingForPowerAction {
FxIoStopProcessingForPowerHold = 1,
FxIoStopProcessingForPowerPurgeManaged,
FxIoStopProcessingForPowerPurgeNonManaged,
};
// begin_wpp config
// CUSTOM_TYPE(FxIoStopProcessingForPowerAction, ItemEnum(FxIoStopProcessingForPowerAction));
// end_wpp
#endif // _FXPKGIOSHARED_HPP
| 16.324324
| 93
| 0.789735
|
IT-Enthusiast-Nepal
|
1ecd7463a2a9e13686fe60699bf7e5b6e21ece86
| 3,891
|
hpp
|
C++
|
c++/en/old_source_codes/nns_simuls/nns-3.0/nns-1.2/source_codes/Main.hpp
|
aimldl/coding
|
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
|
[
"MIT"
] | null | null | null |
c++/en/old_source_codes/nns_simuls/nns-3.0/nns-1.2/source_codes/Main.hpp
|
aimldl/coding
|
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
|
[
"MIT"
] | null | null | null |
c++/en/old_source_codes/nns_simuls/nns-3.0/nns-1.2/source_codes/Main.hpp
|
aimldl/coding
|
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
|
[
"MIT"
] | null | null | null |
#ifndef __MAIN_HPP_
#define __MAIN_HPP_
// For CSRN
#include "ApiGnuplot.hpp"
#include "ApiPostprocess.hpp"
#include "BadukData.hpp"
#include "Cnn.hpp"
#include "CommandLineArguments.hpp"
#include "Config.hpp"
#include "ShellCommands.hpp"
#include "Myiostream.hpp"
// For reinforcement learning
#include "GridWorld.hpp"
#include "ReinforcementLearning.hpp"
#include "CliffWalkingProblem.hpp"
#include "RLGoEngine.hpp"
#endif
//==============================================================================
// Comments
//==============================================================================
// The following lines set the standard input to a trace file.
// In other words, cout outputs a message or string to the trace file,
// not to the console output or computer monitor.
// Use cerr to print out a message to the console.
//
// ofstream outputObj;
// streambuf* streambuffer;
//
// string traceFileWithFullPath;
// traceFileWithFullPath = configObj_p->get_traceFileWithFullPath_();
//
// cout << " Standard output will be saved to '" << traceFileWithFullPath;
// cout << "'." << endl;
// outputObj.open( traceFileWithFullPath.c_str() );
// streambuffer = outputObj.rdbuf();
// cout.rdbuf( streambuffer );
// The following line to use scientific precision is less likely to be used in the future.
// But keep these lines just in case.
/*
//#include <iomanip> // For setprecision
// FOR DEBUGGING
// Using scientific to find a bug. 5.8e-270 appears as 0 if cout is used.
// So the code may work unexpectedly.
double dummy (0.12345);
cout << "#\tUse 'cout << setprecision(1) << scientific' for debugging."
<< endl;
cout << "#\tA number in double will be displayed as follows." << endl;
cout << "#\t" << dummy << "==>"
<< setprecision(1) << scientific << dummy << endl;
cout << "#\tNote this formatting doesn't affect integers." << endl;
cout << endl;
// FOR DEBUGGING
*/
// Comment on Part 1. Process command-line arguments & configuration
//
// This part prepares the rest of the program by processing the command line
// arguments and the configuration file (a text file). The default config file
// is default.cfg. It is suggested to override the default config file when
// you run this program because it's convenient to run it many times.
// Currently, the command line arguments don't do much other than reading
// the specified config file name because this program is designed to
// configure simulation settings in a config file.
// Reading the configuration file is nothing but mapping parameters/values
// in the config file to member variables in the target classes. For example,
// "simul_task_type = test_problem" in default.cfg is mapped to a variable
// ConfigSimulations::taskType_ in ConfigSimulations.hpp. Note this mapping
// is done in the next part.
//
// Design principle:
// Correctness of the values read from a config file should be validated
// in class Config and its derived classes. In this way, the
// subsequent part of the program assumes those values are correct and
// do not include lines to check errors. Moreover, it is logical to remove
// an error caused by a config file when the file is processed. It helps
// for debugging as well.
//
// Comment on Part 2. Configure classes
// Configuring classes means that values in a configuration file are mapped
// to static variables in classes.
//
// Comment on Part 3. Main part
// Step 1. Prepare the input & target data.
// Step 2. Instantiate & initialize classes.
// Step 3. Run simulations.
//
// Design issue:
// Class Csrn or Cmlp is unneccesary because Class Cnn uses Class Cell.
// The cellular architecture level, only sees cells.
// Just specify the cell type.
| 38.524752
| 90
| 0.66641
|
aimldl
|
1ee1015465fdb830af43912e70139f3691a2efa4
| 1,704
|
hpp
|
C++
|
3rdParty/detail/index_lsb_set.hpp
|
zero9178/cld
|
2899ade8045074c5ee939253d2d7f8067c46e72d
|
[
"MIT"
] | 14
|
2020-10-16T08:29:32.000Z
|
2021-12-21T10:37:05.000Z
|
3rdParty/detail/index_lsb_set.hpp
|
zero9178/cld
|
2899ade8045074c5ee939253d2d7f8067c46e72d
|
[
"MIT"
] | null | null | null |
3rdParty/detail/index_lsb_set.hpp
|
zero9178/cld
|
2899ade8045074c5ee939253d2d7f8067c46e72d
|
[
"MIT"
] | null | null | null |
// BITSET2
//
// Copyright Claas Bontus
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Project home: https://github.com/ClaasBontus/bitset2
//
#ifndef BITSET2_INDEX_LSB_SET_CB_HPP
#define BITSET2_INDEX_LSB_SET_CB_HPP
#include <climits>
#include <cstddef>
#include <limits>
namespace Bitset2
{
namespace detail
{
/// https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightBinSearch
template <class T>
struct index_lsb_set
{
enum : size_t
{
npos = std::numeric_limits<size_t>::max(),
n_bits = sizeof(T) * CHAR_BIT
};
constexpr index_lsb_set() noexcept
{
static_assert((n_bits & (n_bits - 1)) == 0, "Number of bits in data type is not a power of 2");
}
/// \brief Returns index of first (least significant) bit set in val.
/// Returns npos if all bits are zero.
constexpr size_t operator()(T val) const noexcept
{
return (T(0) == val) ? npos : find_idx(val, T(T(~T(0)) >> (n_bits >> 1)), n_bits >> 1, 1);
}
private:
constexpr size_t find_idx(T val, T pttrn, size_t sh_rght, size_t ct) const noexcept
{
return (sh_rght == 1) ? (ct - size_t(T(val & T(0x1)))) :
T(val & pttrn) == T(0) ?
find_idx(T(val >> sh_rght), T(pttrn >> (sh_rght >> 1)), sh_rght >> 1, ct + sh_rght) :
find_idx(val, T(pttrn >> (sh_rght >> 1)), sh_rght >> 1, ct);
}
}; // struct index_lsb_set
} // namespace detail
} // namespace Bitset2
#endif // BITSET2_INDEX_LSB_SET_CB_HPP
| 28.4
| 117
| 0.61385
|
zero9178
|
1ee2d992c12ef1713e38aeac04e66ba6ac8e5d00
| 2,236
|
cpp
|
C++
|
src/SpreadsheetImpl.cpp
|
zhangf911/SPLib
|
57ae498f61abe9c14670a974340251cd67ca99fb
|
[
"BSD-2-Clause"
] | 1
|
2015-11-06T03:40:44.000Z
|
2015-11-06T03:40:44.000Z
|
src/SpreadsheetImpl.cpp
|
amyvmiwei/SPLib
|
57ae498f61abe9c14670a974340251cd67ca99fb
|
[
"BSD-2-Clause"
] | null | null | null |
src/SpreadsheetImpl.cpp
|
amyvmiwei/SPLib
|
57ae498f61abe9c14670a974340251cd67ca99fb
|
[
"BSD-2-Clause"
] | 1
|
2020-12-16T03:20:45.000Z
|
2020-12-16T03:20:45.000Z
|
// File: SpreadsheetImpl.cpp
// SpreadsheetImpl implementation file
//
#include "splib.h"
#include "TableImpl.h"
#include "splibint.h"
#include <string.h>
namespace splib {
SpreadsheetImpl::SpreadsheetImpl() {
}
SpreadsheetImpl::~SpreadsheetImpl() {
for (std::vector<Table*>::size_type i = 0; i < tables.size(); i++) {
delete tables[i];
}
}
Table& SpreadsheetImpl::insertTable(int index, const _TCHAR* name) {
if (index < 0 || index > tableCount()) {
throw IllegalArgumentException();
}
if (name == 0) {
throw IllegalArgumentException();
}
if (tableExists(name)) {
throw IllegalArgumentException();
}
Table* table = new TableImpl(this);
table->setName(name);
tables.insert(tables.begin() + index, table);
return *table;
}
Table& SpreadsheetImpl::table(int index) {
if (index < 0 || index >= tableCount()) {
throw IllegalArgumentException();
}
return *(tables[index]);
}
Table& SpreadsheetImpl::table(const _TCHAR* name) {
if (name == 0) {
throw IllegalArgumentException();
}
int index = find(name);
if (index == -1) {
throw IllegalArgumentException();
}
return *(tables[index]);
}
int SpreadsheetImpl::tableCount() const {
return (int) tables.size();
}
bool SpreadsheetImpl::tableExists(const _TCHAR* name) {
if (name == 0) {
throw IllegalArgumentException();
}
return find(name) != -1;
}
void SpreadsheetImpl::removeTable(int index) {
if (index < 0 || index >= tableCount()) {
throw IllegalArgumentException();
}
delete tables[index];
tables.erase(tables.begin() + index);
}
void SpreadsheetImpl::removeTable(const _TCHAR* name) {
if (name == 0) {
throw IllegalArgumentException();
}
int index = find(name);
if (index == -1) {
throw IllegalArgumentException();
}
removeTable(index);
}
int SpreadsheetImpl::find(const _TCHAR* name) {
for (int i = 0; i < (int) tables.size(); i++) {
if (_tcscmp(name, tables[i]->getName()) == 0) {
return i;
}
}
return -1;
}
}
| 23.291667
| 73
| 0.580501
|
zhangf911
|
1ee399fb1e535109c68f9cab8d971597772bcae3
| 31,689
|
cc
|
C++
|
src/coordinator_node.cc
|
qian-long/TileDB-multinode
|
ba2a38b2cc6169935c73b76af8c53e8544c11300
|
[
"MIT"
] | null | null | null |
src/coordinator_node.cc
|
qian-long/TileDB-multinode
|
ba2a38b2cc6169935c73b76af8c53e8544c11300
|
[
"MIT"
] | null | null | null |
src/coordinator_node.cc
|
qian-long/TileDB-multinode
|
ba2a38b2cc6169935c73b76af8c53e8544c11300
|
[
"MIT"
] | null | null | null |
#include <mpi.h>
#include <string>
#include <sstream>
#include <cstring>
#include <ostream>
#include <iostream>
#include <istream>
#include <fstream>
#include <algorithm>
#include <cstdio>
#include <functional>
#include "assert.h"
#include "coordinator_node.h"
#include "csv_file.h"
#include "debug.h"
#include "hash_functions.h"
#include "constants.h"
#include "util.h"
CoordinatorNode::CoordinatorNode(int rank, int nprocs, std::string datadir) {
myrank_ = rank;
nprocs_ = nprocs;
nworkers_ = nprocs - 1;
// TODO put in config file
my_workspace_ = "./workspaces/workspace-0";
logger_ = new Logger(my_workspace_ + "/logfile");
executor_ = new Executor(my_workspace_);
std::vector<int> workers;
for (int i = 1; i < nprocs; ++i) {
workers.push_back(i);
}
mpi_handler_ = new MPIHandler(0, workers, logger_);
datadir_ = datadir;
md_manager_ = new MetaDataManager(my_workspace_);
}
// TODO
CoordinatorNode::~CoordinatorNode() {
delete logger_;
}
Logger* CoordinatorNode::logger() {
return logger_;
}
void CoordinatorNode::run() {
logger_->log(LOG_INFO, "I am the master node");
send_all("hello", DEF_TAG);
// Set array name
std::string array_name = "test_F";
std::string filename = array_name + ".csv";
// Set attribute names
std::vector<std::string> attribute_names;
attribute_names.push_back("attr1");
attribute_names.push_back("attr2");
// Set attribute types
std::vector<const std::type_info*> types;
types.push_back(&typeid(int));
types.push_back(&typeid(int));
// Set dimension type
types.push_back(&typeid(int));
// Set dimension names
std::vector<std::string> dim_names;
dim_names.push_back("i");
dim_names.push_back("j");
// Set dimension domains
std::vector<std::pair<double,double> > dim_domains;
dim_domains.push_back(std::pair<double,double>(0, 1000000));
dim_domains.push_back(std::pair<double,double>(0, 1000000));
// Create an array with irregular tiles
ArraySchema array_schema = ArraySchema(array_name,
attribute_names,
dim_names,
dim_domains,
types,
ArraySchema::HILBERT);
ArraySchema array_schema_C = array_schema.clone("test_F_ordered");
std::string filename_C = "test_F.csv";
ArraySchema array_schema_D = array_schema.clone("test_G_ordered");
std::string filename_D = "test_G.csv";
DEBUG_MSG("Sending DEFINE ARRAY to all workers for " + array_schema_C.array_name());
DefineArrayMsg damsg_C = DefineArrayMsg(array_schema_C);
send_and_receive(damsg_C);
DEBUG_MSG("Sending ordered partition load instructions to all workers");
LoadMsg lmsg_C = LoadMsg(filename_C, array_schema_C, ORDERED_PARTITION);
send_and_receive(lmsg_C);
DEBUG_MSG("Sending DEFINE ARRAY to all workers for array " + array_schema_D.array_name());
DefineArrayMsg damsg_D = DefineArrayMsg(array_schema_D);
send_and_receive(damsg_D);
DEBUG_MSG("Sending ordered partition load instructions to all workers");
LoadMsg lmsg_D = LoadMsg(filename_D, array_schema_D, ORDERED_PARTITION);
send_and_receive(lmsg_D);
DEBUG_MSG("Sending join");
std::string join_ordered_result = "join_ordered_" + array_schema_C.array_name() + "_" + array_schema_D.array_name();
JoinMsg jmsg2 = JoinMsg(array_schema_C.array_name(), array_schema_D.array_name(), join_ordered_result);
send_and_receive(jmsg2);
DEBUG_MSG("Sending GET result to all workers");
GetMsg gmsg2 = GetMsg(join_ordered_result);
send_and_receive(gmsg2);
logger_->log(LOG_INFO, "Sending DEFINE ARRAY to all workers for array " + array_schema.array_name());
DefineArrayMsg damsg = DefineArrayMsg(array_schema);
send_and_receive(damsg);
logger_->log(LOG_INFO, "Sending ordered partition load instructions to all workers");
LoadMsg lmsg = LoadMsg(filename, array_schema, HASH_PARTITION);
send_and_receive(lmsg);
ArraySchema array_schema_B = array_schema.clone("test_G");
std::string filename_B = array_schema_B.array_name() + ".csv";
logger_->log(LOG_INFO, "Sending DEFINE ARRAY to all workers for array " + array_schema_B.array_name());
DefineArrayMsg damsg2 = DefineArrayMsg(array_schema_B);
send_and_receive(damsg2);
logger_->log(LOG_INFO, "Sending ordered partition load instructions to all workers");
LoadMsg lmsg2 = LoadMsg(filename_B, array_schema_B, HASH_PARTITION);
send_and_receive(lmsg2);
logger_->log(LOG_INFO, "Sending join hash");
std::string join_result = "join_hash_" + array_schema.array_name() + "_" + array_schema_B.array_name();
JoinMsg jmsg = JoinMsg("test_F", "test_G", join_result);
send_and_receive(jmsg);
logger_->log(LOG_INFO, "Sending GET result to all workers");
GetMsg gmsg1 = GetMsg(join_result);
send_and_receive(gmsg1);
/*
DEBUG_MSG("sending subarray");
std::vector<double> vec;
vec.push_back(0); vec.push_back(500000);
vec.push_back(0); vec.push_back(500000);
SubarrayMsg sbmsg("subarray", array_schema, vec);
send_and_receive(sbmsg);
DEBUG_MSG("done sending subarray messages");
std::string sarray_name = "subarray";
DEBUG_MSG("Sending GET " + sarray_name + " to all workers");
GetMsg gmsg1(sarray_name);
send_and_receive(gmsg1);
*/
/*
DEBUG_MSG("sending filter instruction to all workers");
std::string expr = "attr1"; // expression hard coded in executor.cc
std::string result = "filter";
FilterMsg fmsg(array_name, expr, result);
send_and_receive(fmsg);
std::string farray_name = "filter";
DEBUG_MSG("Sending GET " + farray_name + " to all workers");
GetMsg gmsg2(farray_name);
send_and_receive(gmsg2);
*/
/*
std::string array_name2 = "test_A";
DEBUG_MSG("Sending DEFINE ARRAY to all workers for array test_load_hash");
ArraySchema array_schema2 = array_schema.clone(array_name2);
DefineArrayMsg damsg2 = DefineArrayMsg(array_schema2);
send_and_receive(damsg2);
DEBUG_MSG("Sending HASH_PARTITION load instructions to all workers");
LoadMsg lmsg = LoadMsg(filename, array_schema2, LoadMsg::HASH);
send_and_receive(lmsg);
DEBUG_MSG("Sending GET " + array_name2 + " to all workers");
GetMsg gmsg2 = GetMsg(array_name2);
send_and_receive(gmsg2);
*/
/*
DEBUG_MSG("Sending ORDERED_PARTITION load instructions to all workers");
LoadMsg lmsg = LoadMsg(filename, array_schema, LoadMsg::ORDERED);
send_and_receive(lmsg);
DEBUG_MSG("Sending GET test_A to all workers");
GetMsg gmsg1 = GetMsg(array_name);
send_and_receive(gmsg1);
*/
/*
DEBUG_MSG("sending load instruction to all workers");
ArraySchema::Order order = ArraySchema::COLUMN_MAJOR;
LoadMsg lmsg = LoadMsg(array_name, array_schema);
send_and_receive(lmsg);
DEBUG_MSG("sending get test instruction to all workers");
GetMsg gmsg = GetMsg("test_A");
send_and_receive(gmsg);
*/
/*
DEBUG_MSG("sending filter instruction to all workers");
int attr_index = 1;
Op op = GT;
int operand = 4;
Predicate<int> pred(attr_index, op, operand);
DEBUG_MSG(pred.to_string());
FilterMsg<int> fmsg = FilterMsg<int>(array_schema.celltype(attr_index), array_schema, pred, "smallish_filter");
send_and_receive(fmsg);
DEBUG_MSG("sending subarray");
std::vector<double> vec;
vec.push_back(9); vec.push_back(11);
vec.push_back(10); vec.push_back(13);
SubarrayMsg sbmsg("subarray", array_schema, vec);
send_and_receive(sbmsg);
DEBUG_MSG("done sending subarray messages");
DEBUG_MSG("sending get subarray instruction to all workers");
GetMsg gmsg1 = GetMsg("subarray");
send_and_receive(gmsg1);
*/
quit_all();
}
void CoordinatorNode::send_all(Msg& msg) {
logger_->log(LOG_INFO, "send_all");
std::pair<char*, int> serial_pair = msg.serialize();
this->send_all(serial_pair.first, serial_pair.second, msg.msg_tag);
}
void CoordinatorNode::send_all(std::string serial_str, int tag) {
this->send_all(serial_str.c_str(), serial_str.length(), tag);
}
void CoordinatorNode::send_all(const char* buffer, int buffer_size, int tag) {
assert(buffer_size < MPI_BUFFER_LENGTH);
for (int i = 1; i < nprocs_; i++) {
MPI_Send((char *)buffer, buffer_size, MPI::CHAR, i, tag, MPI_COMM_WORLD);
}
}
// dispatch to correct handler
void CoordinatorNode::send_and_receive(Msg& msg) {
send_all(msg);
switch(msg.msg_tag) {
case GET_TAG:
handle_get(dynamic_cast<GetMsg&>(msg));
handle_acks();
break;
case LOAD_TAG:
handle_load(dynamic_cast<LoadMsg&>(msg));
handle_acks();
break;
case PARALLEL_LOAD_TAG:
handle_parallel_load(dynamic_cast<ParallelLoadMsg&>(msg));
handle_acks();
break;
case DEFINE_ARRAY_TAG:
case FILTER_TAG:
case SUBARRAY_TAG:
handle_acks();
break;
case AGGREGATE_TAG:
//handle_aggregate();
break;
case JOIN_TAG:
handle_join(dynamic_cast<JoinMsg&>(msg));
// acks handled internally
break;
default:
// don't do anything
break;
}
}
int CoordinatorNode::handle_acks() {
bool all_success = true;
for (int nodeid = 1; nodeid <= nworkers_; nodeid++) {
logger_->log(LOG_INFO, "Waiting for ack from worker " + util::to_string(nodeid));
AckMsg* ack = mpi_handler_->receive_ack(nodeid);
if (ack->result() == AckMsg::ERROR) {
all_success = false;
}
logger_->log(LOG_INFO, "Received ack " + ack->to_string() + " from worker: " + util::to_string(nodeid));
// cleanup
delete ack;
}
return all_success ? 0 : -1;
}
/******************************************************
** HANDLE GET **
******************************************************/
void CoordinatorNode::handle_get(GetMsg& gmsg) {
logger_->log(LOG_INFO, "In handle_get");
std::string outpath = my_workspace_ + "/GET_" + gmsg.array_name() + ".csv";
std::ofstream outfile;
outfile.open(outpath.c_str());
bool keep_receiving = true;
for (int nodeid = 1; nodeid < nprocs_; ++nodeid) {
// error handling if file is not found on sender
keep_receiving = mpi_handler_->receive_keep_receiving(nodeid);
logger_->log(LOG_INFO, "Sender: " + util::to_string(nodeid) + " Keep receiving: " + util::to_string(keep_receiving));
if (keep_receiving == true) {
logger_->log(LOG_INFO, "Waiting for sender " + util::to_string(nodeid));
mpi_handler_->receive_content(outfile, nodeid, GET_TAG);
}
}
outfile.close();
}
/******************************************************
** HANDLE LOAD **
******************************************************/
void CoordinatorNode::handle_load(LoadMsg& lmsg) {
MetaData metadata;
switch (lmsg.partition_type()) {
case ORDERED_PARTITION:
switch(lmsg.load_method()) {
case LoadMsg::SORT:
handle_load_ordered_sort(lmsg);
break;
case LoadMsg::SAMPLE:
handle_load_ordered_sample(lmsg);
break;
default:
// shouldn't get here
break;
}
break;
case HASH_PARTITION:
handle_load_hash(lmsg);
logger_->log_start(LOG_INFO, "Writing metadata to disk");
metadata = MetaData(HASH_PARTITION);
md_manager_->store_metadata(lmsg.array_schema().array_name(), metadata);
logger_->log_end(LOG_INFO);
break;
default:
// TODO return error?
break;
}
}
void CoordinatorNode::handle_load_ordered_sort(LoadMsg& lmsg) {
std::stringstream ss;
std::string filepath = datadir_ + "/" + lmsg.filename();
// inject ids if regular or hilbert order
ArraySchema& array_schema = lmsg.array_schema();
bool regular = array_schema.has_regular_tiles();
ArraySchema::Order order = array_schema.order();
std::string injected_filepath = filepath;
std::string frag_name = "0_0";
if (regular || order == ArraySchema::HILBERT) {
injected_filepath = executor_->loader()->workspace() + "/injected_" +
array_schema.array_name() + "_" + frag_name + ".csv";
try {
logger_->log_start(LOG_INFO, "Injecting ids into " + filepath + ", outputting to " + injected_filepath);
executor_->loader()->inject_ids_to_csv_file(filepath, injected_filepath, array_schema);
} catch(LoaderException& le) {
logger_->log(LOG_INFO, "Caught loader exception " + le.what());
#ifdef NDEBUG
remove(injected_filepath.c_str());
executor_->storage_manager()->delete_array(array_schema.array_name());
#endif
throw LoaderException("[WorkerNode] Cannot inject ids to file\n" + le.what());
}
}
logger_->log_end(LOG_INFO);
// local sort
std::string sorted_filepath = executor_->loader()->workspace() + "/sorted_" + array_schema.array_name() + "_" + frag_name + ".csv";
logger_->log_start(LOG_INFO, "Sorting csv file " + injected_filepath + " into " + sorted_filepath);
executor_->loader()->sort_csv_file(injected_filepath, sorted_filepath, array_schema);
logger_->log_end(LOG_INFO);
// send partitions back to worker nodes
logger_->log(LOG_INFO, "Counting num_lines");
std::ifstream sorted_file;
sorted_file.open(sorted_filepath.c_str());
// using cpp count algo function
int num_lines = std::count(std::istreambuf_iterator<char>(sorted_file),
std::istreambuf_iterator<char>(), '\n');
ss.str(std::string());
ss << "Splitting and sending sorted content to workers, num_lines: " << num_lines;
logger_->log(LOG_INFO, ss.str());
int lines_per_worker = num_lines / nworkers_;
// if not evenly split
int remainder = num_lines % nworkers_;
int pos = 0;
int total = lines_per_worker;
if (remainder > 0) {
total++;
}
sorted_file.close();
//sorted_file.seekg(0, std::ios::beg);
CSVFile csv(sorted_filepath, CSVFile::READ);
CSVLine csv_line;
std::vector<uint64_t> partitions; // nworkers - 1 partitions
for (int nodeid = 1; nodeid < nprocs_; ++nodeid) {
std::string line;
std::stringstream content;
int end = pos + lines_per_worker;
if (remainder > 0) {
end++;
}
logger_->log(LOG_INFO, "Sending sorted file part to nodeid " + util::to_string(nodeid) + " with " + util::to_string(end - pos) + " lines");
for(; pos < end - 1; ++pos) {
csv >> csv_line;
line = csv_line.str() + "\n";
mpi_handler_->send_content(line.c_str(), line.size(), nodeid, LOAD_TAG);
}
// need nworkers - 1 "stumps" for partition ranges
assert(pos == end - 1);
csv >> csv_line;
line = csv_line.str() + "\n";
mpi_handler_->send_content(line.c_str(), line.size(), nodeid, LOAD_TAG);
if (nodeid != nprocs_ - 1) { // not last node
uint64_t sample = std::strtoull(csv_line.values()[0].c_str(), NULL, 10);
partitions.push_back(sample);
}
// final send
mpi_handler_->flush_send(nodeid, LOAD_TAG);
assert(mpi_handler_->all_buffers_empty() == true);
--remainder;
}
assert(partitions.size() == nworkers_ - 1);
logger_->log(LOG_INFO, "Sending partition samples to all workers");
SamplesMsg msg(partitions);
for (int worker = 1; worker <= nworkers_ ; worker++) {
logger_->log(LOG_INFO, "Sending partitions to worker " + util::to_string(worker));
mpi_handler_->send_samples_msg(&msg, worker);
}
// store metadata to disk
logger_->log_start(LOG_INFO, "Writing metadata to disk");
MetaData metadata(ORDERED_PARTITION,
std::pair<uint64_t, uint64_t>(partitions[0], partitions[partitions.size()-1]),
partitions);
md_manager_->store_metadata(array_schema.array_name(), metadata);
logger_->log_end(LOG_INFO);
logger_->log(LOG_INFO, "Finished handle load ordered sort");
}
void CoordinatorNode::handle_load_ordered_sample(LoadMsg& msg) {
logger_->log(LOG_INFO, "Start Handle Load Ordered Partiion using Sampling");
std::stringstream ss;
std::string filepath = datadir_ + "/" + msg.filename();
// inject cell ids and sample
CSVFile csv_in(filepath, CSVFile::READ);
CSVLine line_in, line_out;
ArraySchema& array_schema = msg.array_schema();
ArraySchema::Order order = array_schema.order();
std::string frag_name = "0_0";
std::string injected_filepath = filepath;
// TODO support other orderings later
assert(array_schema.has_regular_tiles() ||
array_schema.order() == ArraySchema::HILBERT);
injected_filepath = executor_->loader()->workspace() + "/injected_" +
array_schema.array_name() + "_" + frag_name + ".csv";
CSVFile *csv_out = new CSVFile(injected_filepath, CSVFile::WRITE);
uint64_t cell_id;
std::vector<double> coordinates;
unsigned int dim_num = array_schema.dim_num();
coordinates.resize(dim_num);
double coordinate;
int resevoir_count = 0;
int num_samples = msg.num_samples();
std::vector<uint64_t> samples;
logger_->log_start(LOG_INFO, "Inject cell ids to " + injected_filepath + " and while resevoir sampling");
while (csv_in >> line_in) {
// Retrieve coordinates from the input line
for(unsigned int i=0; i < array_schema.dim_num(); i++) {
if(!(line_in >> coordinate))
throw LoaderException("Cannot read coordinate value from CSV file.");
coordinates[i] = coordinate;
}
// Put the id at the beginning of the output line
if(array_schema.has_regular_tiles()) { // Regular tiles
if(order == ArraySchema::HILBERT)
cell_id = array_schema.tile_id_hilbert(coordinates);
else if(order == ArraySchema::ROW_MAJOR)
cell_id = array_schema.tile_id_row_major(coordinates);
else if(order == ArraySchema::COLUMN_MAJOR)
cell_id = array_schema.tile_id_column_major(coordinates);
} else { // Irregular tiles + Hilbert cell order
cell_id = array_schema.cell_id_hilbert(coordinates);
}
line_out = cell_id;
// Append the input line to the output line,
// and then into the output CSV file
line_out << line_in;
(*csv_out) << line_out;
// do resevoir sampling
if (resevoir_count < num_samples) {
samples.push_back(cell_id);
} else {
// replace elements with gradually decreasing probability
// TODO double check off by one error?
int r = (rand() % resevoir_count) + 1; // 0 to counter inclusive
if (r < num_samples) {
samples[r] = cell_id;
}
}
resevoir_count++;
}
logger_->log_end(LOG_INFO);
// call destructor to force flush
delete csv_out;
// sample and get partitions
std::vector<uint64_t> partitions = get_partitions(samples, nworkers_ - 1);
// scan input and send partitions to workers
logger_->log_start(LOG_INFO, "Send partitions to workers, reading " + injected_filepath);
CSVFile csv_injected(injected_filepath, CSVFile::READ);
CSVLine csv_line;
while (csv_injected >> csv_line) {
int64_t cell_id = std::strtoll(csv_line.values()[0].c_str(), NULL, 10);
int receiver = get_receiver(partitions, cell_id);
std::string csv_line_str = csv_line.str() + "\n";
mpi_handler_->send_content(csv_line_str.c_str(),
csv_line_str.length(), receiver, LOAD_TAG);
}
// flush all sends
logger_->log(LOG_INFO, "Flushing all sends");
mpi_handler_->flush_all_sends(LOAD_TAG);
logger_->log_end(LOG_INFO);
// send partition boundaries back to workers to record
logger_->log(LOG_INFO, "Sending partition samples to all workers: " +
util::to_string(partitions));
SamplesMsg smsg(partitions);
for (int worker = 1; worker <= nworkers_ ; worker++) {
mpi_handler_->send_samples_msg(&smsg, worker);
}
// store metadata to disk
logger_->log_start(LOG_INFO, "Writing metadata to disk");
MetaData metadata(ORDERED_PARTITION,
std::pair<uint64_t, uint64_t>(partitions[0], partitions[partitions.size()-1]),
partitions);
md_manager_->store_metadata(array_schema.array_name(), metadata);
logger_->log_end(LOG_INFO);
logger_->log(LOG_INFO, "Finished handle load ordered sampling");
}
void CoordinatorNode::handle_load_hash(LoadMsg& pmsg) {
logger_->log(LOG_INFO, "Start Handle Load Hash Partiion");
std::stringstream ss;
// TODO check that filename exists in workspace, error if doesn't
ArraySchema array_schema = pmsg.array_schema();
std::string filepath = datadir_ + "/" + pmsg.filename();
logger_->log(LOG_INFO, "Sending data to workers based on hash value from " + filepath);
// scan input file, compute hash on cell coords, send to worker
CSVFile csv_in(filepath, CSVFile::READ);
CSVLine csv_line;
while (csv_in >> csv_line) {
// TODO look into other hash fns, see hash_functions.h for borrowed ones
std::string coord_id = csv_line.values()[0];
for (int i = 1; i < array_schema.dim_num(); ++i) {
coord_id += ",";
coord_id += csv_line.values()[i];
}
std::size_t cell_id_hash = DEKHash(coord_id);
int receiver = (cell_id_hash % nworkers_) + 1;
std::string csv_line_str = csv_line.str() + "\n";
mpi_handler_->send_content(csv_line_str.c_str(), csv_line_str.length(), receiver, LOAD_TAG);
}
logger_->log(LOG_INFO, "Flushing all sends");
mpi_handler_->flush_all_sends(LOAD_TAG);
}
/******************************************************
** HANDLE PARALLEL LOAD **
******************************************************/
void CoordinatorNode::handle_parallel_load(ParallelLoadMsg& pmsg) {
logger_->log(LOG_INFO, "In handle_parallel_load");
switch (pmsg.partition_type()) {
case ORDERED_PARTITION:
handle_parallel_load_ordered(pmsg);
break;
case HASH_PARTITION:
handle_parallel_load_hash(pmsg);
break;
default:
// TODO return error?
break;
}
}
// participates in all to all mpi exchange
void CoordinatorNode::handle_parallel_load_hash(ParallelLoadMsg& pmsg) {
logger_->log(LOG_INFO, "Participating in all to all communication");
mpi_handler_->finish_recv_a2a();
}
void CoordinatorNode::handle_parallel_load_ordered(ParallelLoadMsg& pmsg) {
logger_->log(LOG_INFO, "In handle parallel load ordered");
// receive samples from all workers
logger_->log(LOG_INFO, "Receiving samples from workers");
std::vector<uint64_t> samples;
std::stringstream ss;
for (int worker = 1; worker <= nworkers_; ++worker) {
logger_->log(LOG_INFO, "Waiting for samples from worker " + util::to_string(worker));
SamplesMsg* smsg = mpi_handler_->receive_samples_msg(worker);
for (int i = 0; i < smsg->samples().size(); ++i) {
samples.push_back(smsg->samples()[i]);
}
// TODO cleanup
}
// pick nworkers - 1 samples for the n - 1 "stumps"
logger_->log(LOG_INFO, "Getting partitions");
std::vector<uint64_t> partitions = get_partitions(samples, nworkers_ - 1);
logger_->log(LOG_INFO, "sending partitions back to all workers");
// send partition infor back to all workers
logger_->log(LOG_INFO, "Partitions: " + util::to_string(partitions));
SamplesMsg msg(partitions);
for (int worker = 1; worker <= nworkers_ ; worker++) {
mpi_handler_->send_samples_msg(&msg, worker);
}
logger_->log_start(LOG_INFO, "Participating in all to all communication");
mpi_handler_->finish_recv_a2a();
logger_->log_end(LOG_INFO);
// cleanup
}
/******************************************************
** HANDLE JOIN **
******************************************************/
void CoordinatorNode::handle_join(JoinMsg& msg) {
MetaData *md_A = md_manager_->retrieve_metadata(msg.array_name_A());
MetaData *md_B = md_manager_->retrieve_metadata(msg.array_name_B());
assert(md_A->partition_type() == md_B->partition_type());
MetaData md_C;
int r;
switch (md_A->partition_type()) {
case ORDERED_PARTITION:
handle_join_ordered(msg);
break;
case HASH_PARTITION:
break;
default:
// shouldn't get here
break;
}
r = handle_acks();
if (r == 0) {
logger_->log_start(LOG_INFO, "Query successful, writing new metadata");
md_C = MetaData(md_A->partition_type());
md_manager_->store_metadata(msg.result_array_name(), md_C);
logger_->log_end(LOG_INFO);
} else {
logger_->log(LOG_INFO, "Query failed, no new array created");
}
// cleanup
delete md_A;
delete md_B;
}
// TODO
void CoordinatorNode::handle_join_ordered(JoinMsg& msg) {
logger_->log_start(LOG_INFO, "All to all shuffle array A bounding coords");
mpi_handler_->finish_recv_a2a();
logger_->log_end(LOG_INFO);
logger_->log_start(LOG_INFO, "All to all shuffle of array B bounding coords");
mpi_handler_->finish_recv_a2a();
logger_->log_end(LOG_INFO);
logger_->log_start(LOG_INFO, "All to all shuffle of array A join fragments");
mpi_handler_->finish_recv_a2a();
logger_->log_end(LOG_INFO);
logger_->log_start(LOG_INFO, "All to all shuffle of array B join fragments");
mpi_handler_->finish_recv_a2a();
logger_->log_end(LOG_INFO);
}
void CoordinatorNode::quit_all() {
logger_->log(LOG_INFO, "Sending quit all");
send_all("quit", QUIT_TAG);
}
/******************************************************
**************** HELPER FUNCTIONS ********************
******************************************************/
std::vector<uint64_t> CoordinatorNode::get_partitions(std::vector<uint64_t> samples, int k) {
// We are picking k partition boundaries that will divide the
// entire distributed dataset into k + 1 somewhat equal (hopefully) partitions
std::sort(samples.begin(), samples.end());
std::vector<uint64_t> partitions;
int num_partitions = k + 1;
int num_samples_per_part = samples.size() / num_partitions;
int remainder = samples.size() % num_partitions;
if (remainder > 0) {
num_samples_per_part++;
}
for (int i = 1; i <= k; ++i) {
partitions.push_back(samples[i*num_samples_per_part]);
}
return partitions;
}
// TODO optimize to use binary search if needed
// TODO move to util class
inline int CoordinatorNode::get_receiver(std::vector<uint64_t> partitions, uint64_t cell_id) {
int recv = 1;
for (std::vector<uint64_t>::iterator it = partitions.begin(); it != partitions.end(); ++it) {
if (cell_id <= *it) {
return recv;
}
recv++;
}
return recv;
}
/******************************************************
*************** TESTING FUNCTIONS ********************
******************************************************/
void CoordinatorNode::test_load(std::string array_name,
std::string filename,
PartitionType partition_type,
LoadMsg::LoadMethod method) {
logger_->log(LOG_INFO, "Test loading array_name: " + array_name + " filename: " + filename);
logger_->log(LOG_INFO, "Sending DEFINE ARRAY to all workers for array " + array_name);
ArraySchema * array_schema = get_test_arrayschema(array_name);
DefineArrayMsg damsg = DefineArrayMsg(*array_schema);
send_and_receive(damsg);
logger_->log(LOG_INFO, "Sending LOAD ARRAY to all workers for array " + array_name);
LoadMsg lmsg = LoadMsg(filename, *array_schema, partition_type, method);
send_and_receive(lmsg);
logger_->log(LOG_INFO, "Test Load Done");
// TODO don't leak memory
delete array_schema;
}
void CoordinatorNode::test_parallel_load(std::string array_name,
std::string filename,
PartitionType partition_type, int num_samples = 10) {
logger_->log(LOG_INFO, "Test parallel loading array_name: " + array_name + " filename: " + filename);
logger_->log(LOG_INFO, "Sending DEFINE ARRAY to all workers for array " + array_name);
ArraySchema * array_schema = get_test_arrayschema(array_name);
DefineArrayMsg damsg = DefineArrayMsg(*array_schema);
send_and_receive(damsg);
logger_->log(LOG_INFO, "Sending PARALLEL LOAD ARRAY to all workers for array " + array_name);
ParallelLoadMsg msg = ParallelLoadMsg(filename, partition_type, *array_schema, num_samples);
send_and_receive(msg);
logger_->log(LOG_INFO, "Test Parallel Load Done");
delete array_schema;
}
void CoordinatorNode::test_filter(std::string array_name) {
logger_->log(LOG_INFO, "Start Filter");
ArraySchema* array_schema = get_test_arrayschema(array_name);
// .5 selectivity
int attr_index = 1;
Op op = GE;
int operand = 500000;
Predicate<int> pred(attr_index, op, operand);
logger_->log(LOG_INFO, pred.to_string());
/*
FilterMsg<int> fmsg = FilterMsg<int>(array_schema->celltype(attr_index), *array_schema, pred, array_name+"_filtered");
send_and_receive(fmsg);
*/
logger_->log(LOG_INFO, "Test Filter Done");
// don't leak memory
//delete array_schema;
}
void CoordinatorNode::test_subarray(std::string array_name) {
logger_->log(LOG_INFO, "Start SubArray");
ArraySchema* array_schema = get_test_arrayschema(array_name);
std::vector<double> vec;
// .5 selectivity
vec.push_back(0); vec.push_back(1000000);
vec.push_back(0); vec.push_back(500000);
SubarrayMsg sbmsg(array_name+"_subarray", *array_schema, vec);
send_and_receive(sbmsg);
logger_->log(LOG_INFO, "Test Subarray Done");
// don't leak memory
//delete array_schema;
}
void CoordinatorNode::test_aggregate(std::string array_name) {
logger_->log(LOG_INFO, "Start Aggregate3 test");
int attr_index = 1;
AggregateMsg amsg(array_name, 1);
send_and_receive(amsg);
logger_->log(LOG_INFO, "Test Aggregate Done");
// don't leak memory
//delete array_schema;
}
ArraySchema* CoordinatorNode::get_test_arrayschema(std::string array_name) {
// array schema for test_[X}.csv
if (array_name.compare(0, 4, "test") == 0) {
// Set attribute names
std::vector<std::string> attribute_names;
attribute_names.push_back("attr1");
attribute_names.push_back("attr2");
// Set attribute types
std::vector<const std::type_info*> types;
types.push_back(&typeid(int));
types.push_back(&typeid(int));
// Set dimension type
types.push_back(&typeid(int));
// Set dimension names
std::vector<std::string> dim_names;
dim_names.push_back("i");
dim_names.push_back("j");
// Set dimension domains
std::vector<std::pair<double,double> > dim_domains;
dim_domains.push_back(std::pair<double,double>(0, 1000000));
dim_domains.push_back(std::pair<double,double>(0, 1000000));
// Create an array with irregular tiles
ArraySchema *array_schema = new ArraySchema(array_name,
attribute_names,
dim_names,
dim_domains,
types,
ArraySchema::HILBERT);
return array_schema;
}
// array schema for ais data
// Set attribute names
std::vector<std::string> attribute_names;
attribute_names.push_back("sog"); // float
attribute_names.push_back("cog"); // float
attribute_names.push_back("heading"); // float
attribute_names.push_back("rot"); // float
attribute_names.push_back("status"); // int
attribute_names.push_back("voyageid"); // int64_t
attribute_names.push_back("mmsi"); // int64_t
// Set attribute types
std::vector<const std::type_info*> types;
types.push_back(&typeid(float));
types.push_back(&typeid(float));
types.push_back(&typeid(float));
types.push_back(&typeid(float));
types.push_back(&typeid(int));
types.push_back(&typeid(int64_t));
types.push_back(&typeid(int64_t));
// Set dimension type
types.push_back(&typeid(int64_t));
// Set dimension names
std::vector<std::string> dim_names;
dim_names.push_back("coordX");
dim_names.push_back("coordY");
// Set dimension domains
std::vector<std::pair<double,double> > dim_domains;
dim_domains.push_back(std::pair<double,double>(0, 360000000));
dim_domains.push_back(std::pair<double,double>(0, 180000000));
// Create an array with irregular tiles
ArraySchema *array_schema = new ArraySchema(array_name,
attribute_names,
dim_names,
dim_domains,
types,
ArraySchema::HILBERT);
return array_schema;
}
| 31.4375
| 144
| 0.678122
|
qian-long
|
1ee853fe5916fd89bba1a6a53ff83af9c68b963f
| 2,691
|
cpp
|
C++
|
vpnor/test/toc_flags.cpp
|
ibm-openbmc/hiomapd
|
8cef63e3a3652b25f6a310800c1e0bf09aeed4c6
|
[
"Apache-2.0"
] | 14
|
2021-11-04T07:47:37.000Z
|
2022-03-21T10:10:30.000Z
|
vpnor/test/toc_flags.cpp
|
ibm-openbmc/hiomapd
|
8cef63e3a3652b25f6a310800c1e0bf09aeed4c6
|
[
"Apache-2.0"
] | 17
|
2018-09-20T02:29:41.000Z
|
2019-04-05T04:43:11.000Z
|
vpnor/test/toc_flags.cpp
|
ibm-openbmc/hiomapd
|
8cef63e3a3652b25f6a310800c1e0bf09aeed4c6
|
[
"Apache-2.0"
] | 9
|
2017-02-14T03:05:09.000Z
|
2019-01-07T20:39:42.000Z
|
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2018 IBM Corp.
#include "config.h"
#include "vpnor/table.hpp"
#include <cassert>
#include "common.h"
#include "vpnor/ffs.h"
static constexpr auto BLOCK_SIZE = 4 * 1024;
static constexpr auto DATA_MASK = ((1 << 24) - 1);
int main()
{
namespace vpnor = openpower::virtual_pnor;
struct pnor_partition part;
std::string line;
mbox_vlog = mbox_log_console;
verbosity = MBOX_LOG_DEBUG;
line = "partition01=FOO,00001000,00002000,80,ECC";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert((part.data.user.data[0]) == PARTITION_ECC_PROTECTED);
assert(!(part.data.user.data[1] & DATA_MASK));
line = "partition01=FOO,00001000,00002000,80,PRESERVED";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert((part.data.user.data[1] & DATA_MASK) == PARTITION_PRESERVED);
line = "partition01=FOO,00001000,00002000,80,READONLY";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert((part.data.user.data[1] & DATA_MASK) == PARTITION_READONLY);
/* BACKUP is unimplemented */
line = "partition01=FOO,00001000,00002000,80,BACKUP";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert(!(part.data.user.data[1] & DATA_MASK));
line = "partition01=FOO,00001000,00002000,80,REPROVISION";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert((part.data.user.data[1] & DATA_MASK) == PARTITION_REPROVISION);
line = "partition01=FOO,00001000,00002000,80,VOLATILE";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert((part.data.user.data[1] & DATA_MASK) == PARTITION_VOLATILE);
line = "partition01=FOO,00001000,00002000,80,CLEARECC";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert((part.data.user.data[1] & DATA_MASK) == PARTITION_CLEARECC);
line = "partition01=FOO,00001000,00002000,80,READWRITE";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert(((part.data.user.data[1] & DATA_MASK) ^ PARTITION_READONLY) ==
PARTITION_READONLY);
line = "partition01=FOO,00001000,00002000,80,";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert(!(part.data.user.data[1] & DATA_MASK));
line = "partition01=FOO,00001000,00002000,80,junk";
vpnor::parseTocLine(line, BLOCK_SIZE, part);
assert(!(part.data.user.data[0]));
assert(!(part.data.user.data[1] & DATA_MASK));
return 0;
}
| 33.6375
| 74
| 0.679301
|
ibm-openbmc
|
1eeefdf0d07916c5eefbbf7e284b65503b3b4158
| 1,542
|
hpp
|
C++
|
gui/grid_widget.hpp
|
myra-b/ising
|
2e03e121e37ecf00411f4aaf3275fa9259dd40d3
|
[
"Apache-2.0"
] | 3
|
2017-09-19T11:27:59.000Z
|
2019-05-09T08:46:07.000Z
|
gui/grid_widget.hpp
|
myrabiedermann/ising
|
2e03e121e37ecf00411f4aaf3275fa9259dd40d3
|
[
"Apache-2.0"
] | 3
|
2017-11-14T23:13:39.000Z
|
2017-12-12T11:46:53.000Z
|
gui/grid_widget.hpp
|
myrabiedermann/ising
|
2e03e121e37ecf00411f4aaf3275fa9259dd40d3
|
[
"Apache-2.0"
] | 1
|
2017-08-16T12:43:37.000Z
|
2017-08-16T12:43:37.000Z
|
#pragma once
#ifdef QT_NO_DEBUG
#ifndef QT_NO_DEBUG_OUTPUT
#define QT_NO_DEBUG_OUTPUT
#endif
#endif
#ifndef USE_MATH_DEFINES
#define USE_MATH_DEFINES
#endif
// #include "global.hpp"
#include "system/montecarlohost.hpp"
#include "system/spinsystem.hpp"
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QWidget>
#include <QGridLayout>
#include <QRect>
#include <QtDebug>
#include <QShowEvent>
#include <cmath>
#include <type_traits>
#include <cstdint>
#include <iostream>
class GridWidget : public QGraphicsView
{
Q_OBJECT
public:
explicit GridWidget(QWidget *parent = Q_NULLPTR);
GridWidget(const GridWidget&) = delete;
void operator=(const GridWidget&) = delete;
~GridWidget();
void showEvent(QShowEvent *);
void setRowsColumns(unsigned short,unsigned short);
void setRows(unsigned short);
void setColumns(unsigned short);
public slots:
void draw(const MonteCarloHost&);
void draw(const Spinsystem&);
void draw_test();
void refresh();
protected:
QBrush getSpinColor(const Spin& spin);
void drawRectangle(unsigned short, unsigned short, unsigned short, unsigned short, QPen, QBrush);
void makeNewScene();
private:
unsigned short rows = 0;
unsigned short columns = 0;
unsigned short width_of_rectangular = 0;
unsigned short height_of_rectangular = 0;
const unsigned short scene_width = 500;
const unsigned short scene_height = 500;
QGraphicsScene* scene;
};
| 21.71831
| 101
| 0.699741
|
myra-b
|
1ef2387c954bd00f8f4f0cea3ba1c849ce921e28
| 26,464
|
cpp
|
C++
|
Tools/GUILayer/UITypesBinding.cpp
|
yorung/XLE
|
083ce4c9d3fe32002ff5168e571cada2715bece4
|
[
"MIT"
] | 1
|
2016-06-01T10:41:12.000Z
|
2016-06-01T10:41:12.000Z
|
Tools/GUILayer/UITypesBinding.cpp
|
yorung/XLE
|
083ce4c9d3fe32002ff5168e571cada2715bece4
|
[
"MIT"
] | null | null | null |
Tools/GUILayer/UITypesBinding.cpp
|
yorung/XLE
|
083ce4c9d3fe32002ff5168e571cada2715bece4
|
[
"MIT"
] | null | null | null |
// Copyright 2015 XLGAMES Inc.
//
// Distributed under the MIT License (See
// accompanying file "LICENSE" or the website
// http://www.opensource.org/licenses/mit-license.php)
#pragma warning(disable:4512)
#include "UITypesBinding.h"
#include "EngineForward.h"
#include "ExportedNativeTypes.h"
#include "../ToolsRig/ModelVisualisation.h"
#include "../ToolsRig/VisualisationUtils.h"
#include "../../RenderCore/Assets/Material.h"
#include "../../RenderCore/Assets/MaterialScaffold.h"
#include "../../RenderCore/Metal/State.h"
#include "../../Assets/DivergentAsset.h"
#include "../../Assets/AssetUtils.h"
#include "../../Assets/AssetServices.h"
#include "../../Assets/InvalidAssetManager.h"
#include "../../Assets/ConfigFileContainer.h"
#include "../../Utility/StringFormat.h"
#include <msclr/auto_gcroot.h>
#include <iomanip>
namespace Assets
{
template<>
std::basic_string<ResChar> BuildTargetFilename<RenderCore::Assets::RawMaterial>(const char* init)
{
RenderCore::Assets::RawMaterial::RawMatSplitName splitName(init);
return splitName._concreteFilename;
}
}
namespace GUILayer
{
///////////////////////////////////////////////////////////////////////////////////////////////////
class InvalidatePropertyGrid : public OnChangeCallback
{
public:
void OnChange();
InvalidatePropertyGrid(PropertyGrid^ linked);
~InvalidatePropertyGrid();
protected:
msclr::auto_gcroot<PropertyGrid^> _linked;
};
void InvalidatePropertyGrid::OnChange()
{
if (_linked.get()) {
_linked->Refresh();
}
}
InvalidatePropertyGrid::InvalidatePropertyGrid(PropertyGrid^ linked) : _linked(linked) {}
InvalidatePropertyGrid::~InvalidatePropertyGrid() {}
void ModelVisSettings::AttachCallback(PropertyGrid^ callback)
{
_object->_changeEvent._callbacks.push_back(
std::shared_ptr<OnChangeCallback>(new InvalidatePropertyGrid(callback)));
}
ModelVisSettings^ ModelVisSettings::CreateDefault()
{
auto attached = std::make_shared<ToolsRig::ModelVisSettings>();
return gcnew ModelVisSettings(std::move(attached));
}
void ModelVisSettings::ModelName::set(String^ value)
{
// we need to make a filename relative to the current working
// directory
auto nativeName = clix::marshalString<clix::E_UTF8>(value);
::Assets::ResolvedAssetFile resName;
::Assets::MakeAssetName(resName, nativeName.c_str());
_object->_modelName = resName._fn;
// also set the material name (the old material file probably won't match the new model file)
XlChopExtension(resName._fn);
XlCatString(resName._fn, dimof(resName._fn), ".material");
_object->_materialName = resName._fn;
_object->_pendingCameraAlignToModel = true;
_object->_changeEvent.Trigger();
}
void ModelVisSettings::MaterialName::set(String^ value)
{
// we need to make a filename relative to the current working
// directory
auto nativeName = clix::marshalString<clix::E_UTF8>(value);
::Assets::ResolvedAssetFile resName;
::Assets::MakeAssetName(resName, nativeName.c_str());
_object->_materialName = resName._fn;
_object->_changeEvent.Trigger();
}
///////////////////////////////////////////////////////////////////////////////////////////////////
System::String^ VisMouseOver::IntersectionPt::get()
{
if (_object->_hasMouseOver) {
return clix::marshalString<clix::E_UTF8>(
std::string(StringMeld<64>()
<< std::setprecision(5)
<< _object->_intersectionPt[0] << ","
<< _object->_intersectionPt[1] << ","
<< _object->_intersectionPt[2]));
} else {
return "<<no intersection>>";
}
}
unsigned VisMouseOver::DrawCallIndex::get()
{
if (_object->_hasMouseOver) {
return _object->_drawCallIndex;
} else {
return ~unsigned(0x0);
}
}
System::String^ VisMouseOver::MaterialName::get()
{
auto fullName = FullMaterialName;
if (fullName) {
auto split = fullName->Split(';');
if (split && split->Length > 0) {
auto s = split[split->Length-1];
int index = s->IndexOf(':');
return s->Substring((index>=0) ? (index+1) : 0);
}
}
return "<<no material>>";
}
System::String^ VisMouseOver::ModelName::get()
{
return clix::marshalString<clix::E_UTF8>(_modelSettings->_modelName);
}
bool VisMouseOver::HasMouseOver::get()
{
return _object->_hasMouseOver;
}
System::String^ VisMouseOver::FullMaterialName::get()
{
if (_object->_hasMouseOver) {
auto scaffolds = _modelCache->GetScaffolds(_modelSettings->_modelName.c_str(), _modelSettings->_materialName.c_str());
if (scaffolds._material) {
auto matName = scaffolds._material->GetMaterialName(_object->_materialGuid);
if (matName) {
return clix::marshalString<clix::E_UTF8>(std::string(matName));
}
}
}
return nullptr;
}
uint64 VisMouseOver::MaterialBindingGuid::get()
{
if (_object->_hasMouseOver) {
return _object->_materialGuid;
} else {
return ~uint64(0x0);
}
}
void VisMouseOver::AttachCallback(PropertyGrid^ callback)
{
_object->_changeEvent._callbacks.push_back(
std::shared_ptr<OnChangeCallback>(new InvalidatePropertyGrid(callback)));
}
VisMouseOver::VisMouseOver(
std::shared_ptr<ToolsRig::VisMouseOver> attached,
std::shared_ptr<ToolsRig::ModelVisSettings> settings,
std::shared_ptr<RenderCore::Assets::ModelCache> cache)
{
_object = std::move(attached);
_modelSettings = std::move(settings);
_modelCache = std::move(cache);
}
VisMouseOver::VisMouseOver()
{
_object = std::make_shared<ToolsRig::VisMouseOver>();
}
VisMouseOver::~VisMouseOver()
{
_object.reset();
_modelSettings.reset();
_modelCache.reset();
}
///////////////////////////////////////////////////////////////////////////////////////////////////
template<typename NameType, typename ValueType>
NameType PropertyPair<NameType, ValueType>::Name::get() { return _name; }
template<typename NameType, typename ValueType>
void PropertyPair<NameType, ValueType>::Name::set(NameType newValue)
{
_name = newValue;
NotifyPropertyChanged("Name");
}
template<typename NameType, typename ValueType>
ValueType PropertyPair<NameType, ValueType>::Value::get() { return _value; }
template<typename NameType, typename ValueType>
void PropertyPair<NameType, ValueType>::Value::set(ValueType newValue)
{
_value = newValue;
NotifyPropertyChanged("Value");
}
template<typename NameType, typename ValueType>
void PropertyPair<NameType, ValueType>::NotifyPropertyChanged(System::String^ propertyName)
{
PropertyChanged(this, gcnew PropertyChangedEventArgs(propertyName));
// _propertyChangedContext->Send(
// gcnew System::Threading::SendOrPostCallback(
// o => PropertyChanged(this, gcnew PropertyChangedEventArgs(propertyName))
// ), nullptr);
}
public ref class BindingConv
{
public:
static BindingList<StringStringPair^>^ AsBindingList(const ParameterBox& paramBox);
static ParameterBox AsParameterBox(BindingList<StringStringPair^>^);
static ParameterBox AsParameterBox(BindingList<StringIntPair^>^);
};
BindingList<StringStringPair^>^ BindingConv::AsBindingList(const ParameterBox& paramBox)
{
auto result = gcnew BindingList<StringStringPair^>();
std::vector<std::pair<const utf8*, std::string>> stringTable;
BuildStringTable(stringTable, paramBox);
for (auto i=stringTable.cbegin(); i!=stringTable.cend(); ++i) {
result->Add(
gcnew StringStringPair(
clix::marshalString<clix::E_UTF8>(i->first),
clix::marshalString<clix::E_UTF8>(i->second)));
}
return result;
}
ParameterBox BindingConv::AsParameterBox(BindingList<StringStringPair^>^ input)
{
ParameterBox result;
for each(auto i in input) {
// We get items with null names when they are being added, but
// not quite finished yet. We have to ignore in this case.
if (i->Name && i->Name->Length > 0 && i->Value) {
result.SetParameter(
(const utf8*)clix::marshalString<clix::E_UTF8>(i->Name).c_str(),
clix::marshalString<clix::E_UTF8>(i->Value).c_str());
}
}
return result;
}
ParameterBox BindingConv::AsParameterBox(BindingList<StringIntPair^>^ input)
{
ParameterBox result;
for each(auto i in input) {
// We get items with null names when they are being added, but
// not quite finished yet. We have to ignore in this case.
if (i->Name && i->Name->Length > 0) {
result.SetParameter(
(const utf8*)clix::marshalString<clix::E_UTF8>(i->Name).c_str(),
i->Value);
}
}
return result;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
BindingList<StringStringPair^>^
RawMaterial::MaterialParameterBox::get()
{
if (!_underlying) { return nullptr; }
if (!_materialParameterBox) {
_materialParameterBox = BindingConv::AsBindingList(_underlying->GetAsset()._asset._matParamBox);
_materialParameterBox->ListChanged +=
gcnew ListChangedEventHandler(
this, &RawMaterial::ParameterBox_Changed);
_materialParameterBox->AllowNew = true;
_materialParameterBox->AllowEdit = true;
}
return _materialParameterBox;
}
BindingList<StringStringPair^>^
RawMaterial::ShaderConstants::get()
{
if (!_underlying) { return nullptr; }
if (!_shaderConstants) {
_shaderConstants = BindingConv::AsBindingList(_underlying->GetAsset()._asset._constants);
_shaderConstants->ListChanged +=
gcnew ListChangedEventHandler(
this, &RawMaterial::ParameterBox_Changed);
_shaderConstants->AllowNew = true;
_shaderConstants->AllowEdit = true;
}
return _shaderConstants;
}
BindingList<StringStringPair^>^
RawMaterial::ResourceBindings::get()
{
if (!_underlying) { return nullptr; }
if (!_resourceBindings) {
_resourceBindings = BindingConv::AsBindingList(_underlying->GetAsset()._asset._resourceBindings);
_resourceBindings->ListChanged +=
gcnew ListChangedEventHandler(
this, &RawMaterial::ResourceBinding_Changed);
_resourceBindings->AllowNew = true;
_resourceBindings->AllowEdit = true;
}
return _resourceBindings;
}
void RawMaterial::ParameterBox_Changed(System::Object^ obj, ListChangedEventArgs^e)
{
// Commit these changes back to the native object by re-creating the parameter box
// Ignore a couple of cases...
// - moving an item is unimportant
// - added a new item with a null name (this occurs when the new item
// hasn't been fully filled in yet)
// Similarly, don't we really need to process a removal of an item with
// an empty name.. but there's no way to detect this case
if (e->ListChangedType == ListChangedType::ItemMoved) {
return;
}
using Box = BindingList<StringStringPair^>;
if (e->ListChangedType == ListChangedType::ItemAdded) {
assert(e->NewIndex < ((Box^)obj)->Count);
if (!((Box^)obj)[e->NewIndex]->Name || ((Box^)obj)[e->NewIndex]->Name->Length > 0) {
return;
}
}
if (!!_underlying) {
if (obj == _materialParameterBox) {
auto transaction = _underlying->Transaction_Begin("Material parameter");
if (transaction) {
transaction->GetAsset()._asset._matParamBox = BindingConv::AsParameterBox(_materialParameterBox);
transaction->Commit();
}
} else if (obj == _shaderConstants) {
auto transaction = _underlying->Transaction_Begin("Material constant");
if (transaction) {
transaction->GetAsset()._asset._constants = BindingConv::AsParameterBox(_shaderConstants);
transaction->Commit();
}
}
}
}
void RawMaterial::ResourceBinding_Changed(System::Object^ obj, ListChangedEventArgs^ e)
{
if (e->ListChangedType == ListChangedType::ItemMoved) {
return;
}
using Box = BindingList<StringStringPair^>;
if (e->ListChangedType == ListChangedType::ItemAdded) {
assert(e->NewIndex < ((Box^)obj)->Count);
if (!((Box^)obj)[e->NewIndex]->Name || ((Box^)obj)[e->NewIndex]->Name->Length > 0) {
return;
}
}
if (!!_underlying) {
assert(obj == _resourceBindings);
auto transaction = _underlying->Transaction_Begin("Resource Binding");
if (transaction) {
transaction->GetAsset()._asset._resourceBindings = BindingConv::AsParameterBox(_resourceBindings);
transaction->Commit();
}
}
}
List<System::String^>^ RawMaterial::BuildInheritanceList()
{
// create a RawMaterial wrapper object for all of the inheritted objects
if (!!_underlying) {
auto result = gcnew List<System::String^>();
auto& asset = _underlying->GetAsset();
auto searchRules = ::Assets::DefaultDirectorySearchRules(
clix::marshalString<clix::E_UTF8>(_filename).c_str());
auto inheritted = asset._asset.ResolveInherited(searchRules);
for (auto i = inheritted.cbegin(); i != inheritted.cend(); ++i) {
result->Add(clix::marshalString<clix::E_UTF8>(*i));
}
return result;
}
return nullptr;
}
List<System::String^>^ RawMaterial::BuildInheritanceList(System::String^ topMost)
{
auto temp = gcnew RawMaterial(topMost);
auto result = temp->BuildInheritanceList();
delete temp;
return result;
}
System::String^ RawMaterial::Filename::get() { return _filename; }
System::String^ RawMaterial::SettingName::get() { return _settingName; }
const RenderCore::Assets::RawMaterial* RawMaterial::GetUnderlying()
{
return (!!_underlying) ? &_underlying->GetAsset()._asset : nullptr;
}
RawMaterial::RawMaterial(System::String^ initialiser)
{
auto nativeInit = clix::marshalString<clix::E_UTF8>(initialiser);
RenderCore::Assets::RawMaterial::RawMatSplitName splitName(nativeInit.c_str());
auto& source = ::Assets::GetDivergentAsset<
::Assets::ConfigFileListContainer<RenderCore::Assets::RawMaterial>>(splitName._initializerName.c_str());
_underlying = source;
_filename = clix::marshalString<clix::E_UTF8>(splitName._concreteFilename);
_settingName = clix::marshalString<clix::E_UTF8>(splitName._settingName);
_renderStateSet = gcnew RenderStateSet(_underlying.GetNativePtr());
}
// RawMaterial::RawMaterial(
// std::shared_ptr<NativeConfig> underlying)
// {
// _underlying = std::move(underlying);
// _renderStateSet = gcnew RenderStateSet(_underlying.GetNativePtr());
// _filename = "unknown";
// _settingName = "unknown";
// }
RawMaterial::RawMaterial(RawMaterial^ cloneFrom)
{
_underlying = cloneFrom->_underlying;
_renderStateSet = gcnew RenderStateSet(_underlying.GetNativePtr());
_filename = cloneFrom->_filename;
_settingName = cloneFrom->_filename;
}
RawMaterial::~RawMaterial()
{
_underlying.reset();
delete _renderStateSet;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
auto RenderStateSet::DoubleSided::get() -> CheckState
{
auto& stateSet = _underlying->GetAsset()._asset._stateSet;
if (stateSet._flag & RenderCore::Assets::RenderStateSet::Flag::DoubleSided) {
if (stateSet._doubleSided) return CheckState::Checked;
else return CheckState::Unchecked;
}
return CheckState::Indeterminate;
}
void RenderStateSet::DoubleSided::set(CheckState checkState)
{
auto transaction = _underlying->Transaction_Begin("RenderState");
auto& stateSet = transaction->GetAsset()._asset._stateSet;
if (checkState == CheckState::Indeterminate) {
stateSet._flag &= ~RenderCore::Assets::RenderStateSet::Flag::DoubleSided;
} else {
stateSet._flag |= RenderCore::Assets::RenderStateSet::Flag::DoubleSided;
stateSet._doubleSided = (checkState == CheckState::Checked);
}
transaction->Commit();
NotifyPropertyChanged("DoubleSided");
}
CheckState RenderStateSet::Wireframe::get()
{
auto& stateSet = _underlying->GetAsset()._asset._stateSet;
if (stateSet._flag & RenderCore::Assets::RenderStateSet::Flag::Wireframe) {
if (stateSet._wireframe) return CheckState::Checked;
else return CheckState::Unchecked;
}
return CheckState::Indeterminate;
}
void RenderStateSet::Wireframe::set(CheckState checkState)
{
auto transaction = _underlying->Transaction_Begin("RenderState");
auto& stateSet = transaction->GetAsset()._asset._stateSet;
if (checkState == CheckState::Indeterminate) {
stateSet._flag &= ~RenderCore::Assets::RenderStateSet::Flag::Wireframe;
} else {
stateSet._flag |= RenderCore::Assets::RenderStateSet::Flag::Wireframe;
stateSet._wireframe = (checkState == CheckState::Checked);
}
transaction->Commit();
NotifyPropertyChanged("Wireframe");
}
auto RenderStateSet::DeferredBlend::get() -> DeferredBlendState
{
return DeferredBlendState::Unset;
}
void RenderStateSet::DeferredBlend::set(DeferredBlendState)
{
NotifyPropertyChanged("DeferredBlend");
}
class StandardBlendDef
{
public:
StandardBlendModes _standardMode;
RenderCore::Metal::BlendOp::Enum _op;
RenderCore::Metal::Blend::Enum _src;
RenderCore::Metal::Blend::Enum _dst;
};
namespace BlendOp = RenderCore::Metal::BlendOp;
using namespace RenderCore::Metal::Blend;
static const StandardBlendDef s_standardBlendDefs[] =
{
{ StandardBlendModes::NoBlending, BlendOp::NoBlending, One, RenderCore::Metal::Blend::Zero },
{ StandardBlendModes::Decal, BlendOp::NoBlending, One, RenderCore::Metal::Blend::Zero },
{ StandardBlendModes::Transparent, BlendOp::Add, SrcAlpha, InvSrcAlpha },
{ StandardBlendModes::TransparentPremultiplied, BlendOp::Add, One, InvSrcAlpha },
{ StandardBlendModes::Add, BlendOp::Add, One, One },
{ StandardBlendModes::AddAlpha, BlendOp::Add, SrcAlpha, One },
{ StandardBlendModes::Subtract, BlendOp::Subtract, One, One },
{ StandardBlendModes::SubtractAlpha, BlendOp::Subtract, SrcAlpha, One },
{ StandardBlendModes::Min, BlendOp::Min, One, One },
{ StandardBlendModes::Max, BlendOp::Max, One, One }
};
StandardBlendModes AsStandardBlendMode(
const RenderCore::Assets::RenderStateSet& stateSet)
{
auto op = stateSet._forwardBlendOp;
auto src = stateSet._forwardBlendSrc;
auto dst = stateSet._forwardBlendDst;
if (!(stateSet._flag & RenderCore::Assets::RenderStateSet::Flag::ForwardBlend)) {
if (stateSet._flag & RenderCore::Assets::RenderStateSet::Flag::DeferredBlend) {
if (stateSet._deferredBlend == RenderCore::Assets::RenderStateSet::DeferredBlend::Decal)
return StandardBlendModes::Decal;
return StandardBlendModes::NoBlending;
}
return StandardBlendModes::Inherit;
}
if (op == BlendOp::NoBlending) {
if (stateSet._flag & RenderCore::Assets::RenderStateSet::Flag::DeferredBlend)
if (stateSet._deferredBlend == RenderCore::Assets::RenderStateSet::DeferredBlend::Decal)
return StandardBlendModes::Decal;
return StandardBlendModes::NoBlending;
}
for (unsigned c=0; c<dimof(s_standardBlendDefs); ++c)
if ( op == s_standardBlendDefs[c]._op
&& src == s_standardBlendDefs[c]._src
&& dst == s_standardBlendDefs[c]._dst)
return s_standardBlendDefs[c]._standardMode;
return StandardBlendModes::Complex;
}
auto RenderStateSet::StandardBlendMode::get() -> StandardBlendModes
{
const auto& underlying = _underlying->GetAsset();
return AsStandardBlendMode(underlying._asset._stateSet);
}
void RenderStateSet::StandardBlendMode::set(StandardBlendModes newMode)
{
if (newMode == StandardBlendModes::Complex) return;
if (newMode == StandardBlendMode) return;
if (newMode == StandardBlendModes::Inherit) {
auto transaction = _underlying->Transaction_Begin("RenderState");
auto& stateSet = transaction->GetAsset()._asset._stateSet;
stateSet._forwardBlendOp = BlendOp::NoBlending;
stateSet._forwardBlendSrc = One;
stateSet._forwardBlendDst = RenderCore::Metal::Blend::Zero;
stateSet._deferredBlend = RenderCore::Assets::RenderStateSet::DeferredBlend::Opaque;
stateSet._flag &= ~RenderCore::Assets::RenderStateSet::Flag::ForwardBlend;
stateSet._flag &= ~RenderCore::Assets::RenderStateSet::Flag::DeferredBlend;
NotifyPropertyChanged("StandardBlendMode");
transaction->Commit();
return;
}
for (unsigned c=0; c<dimof(s_standardBlendDefs); ++c)
if (s_standardBlendDefs[c]._standardMode == newMode) {
auto transaction = _underlying->Transaction_Begin("RenderState");
auto& stateSet = transaction->GetAsset()._asset._stateSet;
stateSet._forwardBlendOp = s_standardBlendDefs[c]._op;
stateSet._forwardBlendSrc = s_standardBlendDefs[c]._src;
stateSet._forwardBlendDst = s_standardBlendDefs[c]._dst;
stateSet._deferredBlend = RenderCore::Assets::RenderStateSet::DeferredBlend::Opaque;
stateSet._flag |= RenderCore::Assets::RenderStateSet::Flag::ForwardBlend;
stateSet._flag &= ~RenderCore::Assets::RenderStateSet::Flag::DeferredBlend;
if (newMode == StandardBlendModes::Decal) {
stateSet._deferredBlend = RenderCore::Assets::RenderStateSet::DeferredBlend::Decal;
stateSet._flag |= RenderCore::Assets::RenderStateSet::Flag::DeferredBlend;
}
transaction->Commit();
NotifyPropertyChanged("StandardBlendMode");
return;
}
}
RenderStateSet::RenderStateSet(std::shared_ptr<NativeConfig> underlying)
{
_underlying = std::move(underlying);
_propertyChangedContext = System::Threading::SynchronizationContext::Current;
}
RenderStateSet::~RenderStateSet()
{
_underlying.reset();
}
void RenderStateSet::NotifyPropertyChanged(System::String^ propertyName)
{
// This only works correctly in the UI thread. However, given that
// this event can be raised by low-level engine code, we might be
// in some other thread. We can get around that by using the
// synchronisation functionality in .net to post a message to the
// UI thread... That requires creating a delegate type and passing
// propertyName to it. It's easy in C#. But it's a little more difficult
// in C++/CLI.
PropertyChanged(this, gcnew PropertyChangedEventArgs(propertyName));
// _propertyChangedContext->Send(
// gcnew System::Threading::SendOrPostCallback(
// o => PropertyChanged(this, gcnew PropertyChangedEventArgs(propertyName))
// ), nullptr);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
InvalidAssetList::InvalidAssetList()
{
_assetList = gcnew List<Tuple<String^, String^>^>();
// get the list of assets from the underlying manager
auto list = ::Assets::Services::GetInvalidAssetMan().GetAssets();
for (const auto& i : list) {
_assetList->Add(gcnew Tuple<String^, String^>(
clix::marshalString<clix::E_UTF8>(i._name),
clix::marshalString<clix::E_UTF8>(i._errorString)));
}
}
bool InvalidAssetList::HasInvalidAssets()
{
return ::Assets::Services::GetInvalidAssetMan().HasInvalidAssets();
}
///////////////////////////////////////////////////////////////////////////////////////////////////
template PropertyPair<System::String^, unsigned>;
template PropertyPair<System::String^, System::String^>;
}
| 38.022989
| 130
| 0.599607
|
yorung
|
1ef4549004d79180e6d815c3e1c90e953ab6bd85
| 3,651
|
cpp
|
C++
|
src/main.cpp
|
dniklaus/wiring-adafruit-fram-spi-test
|
68d837325c512482d98f60414567764871a84fac
|
[
"MIT"
] | 1
|
2021-01-07T13:10:17.000Z
|
2021-01-07T13:10:17.000Z
|
src/main.cpp
|
dniklaus/wiring-adafruit-fram-spi-test
|
68d837325c512482d98f60414567764871a84fac
|
[
"MIT"
] | null | null | null |
src/main.cpp
|
dniklaus/wiring-adafruit-fram-spi-test
|
68d837325c512482d98f60414567764871a84fac
|
[
"MIT"
] | null | null | null |
/*
* main.cpp
*
* Created on: 15.03.2017
* Author: niklausd
*/
#include <Arduino.h>
#include <SPI.h>
#include <Adafruit_FRAM_SPI.h>
// PlatformIO libraries
#include <SerialCommand.h> // pio lib install 173, lib details see https://github.com/kroimon/Arduino-SerialCommand
#include <Timer.h> // pio lib install 1699, lib details see https://github.com/dniklaus/wiring-timer
// private libraries
#include <DbgCliNode.h>
#include <DbgCliTopic.h>
#include <DbgCliCommand.h>
#include <DbgTracePort.h>
#include <DbgTraceContext.h>
#include <DbgTraceOut.h>
#include <DbgPrintConsole.h>
#include <DbgTraceLevel.h>
#include <AppDebug.h>
#include <ProductDebug.h>
#include <RamUtils.h>
#ifndef BUILTIN_LED
#define BUILTIN_LED 13
#endif
SerialCommand* sCmd = 0;
/* Example code to interrogate Adafruit SPI FRAM breakout for address size and storage capacity */
/* NOTE: This sketch will overwrite data already on the FRAM breakout */
uint8_t FRAM_CS = 10;
Adafruit_FRAM_SPI fram = Adafruit_FRAM_SPI(); // use hardware SPI
uint8_t FRAM_SCK = 13;
uint8_t FRAM_MISO = 12;
uint8_t FRAM_MOSI = 11;
//Or use software SPI, any pins!
//Adafruit_FRAM_SPI fram = Adafruit_FRAM_SPI(FRAM_SCK, FRAM_MISO, FRAM_MOSI, FRAM_CS);
uint8_t addrSizeInBytes = 2; //Default to address size of two bytes
uint32_t memSize;
#if defined(ARDUINO_ARCH_SAMD)
// for Zero, output on USB Serial console, remove line below if using programming port to program the Zero!
#define Serial SerialUSB
#endif
int32_t readBack(uint32_t addr, int32_t data)
{
int32_t check = !data;
int32_t wrapCheck, backup;
fram.read(addr, (uint8_t*) &backup, sizeof(int32_t));
fram.writeEnable(true);
fram.write(addr, (uint8_t*) &data, sizeof(int32_t));
fram.writeEnable(false);
fram.read(addr, (uint8_t*) &check, sizeof(int32_t));
fram.read(0, (uint8_t*) &wrapCheck, sizeof(int32_t));
fram.writeEnable(true);
fram.write(addr, (uint8_t*) &backup, sizeof(int32_t));
fram.writeEnable(false);
// Check for warparound, address 0 will work anyway
if (wrapCheck == check)
{
check = 0;
}
return check;
}
bool testAddrSize(uint8_t addrSize)
{
fram.setAddressSize(addrSize);
if (readBack(4, 0xbeefbead) == 0xbeefbead)
{
return true;
}
return false;
}
void setup()
{
pinMode(BUILTIN_LED, OUTPUT);
digitalWrite(BUILTIN_LED, 0);
setupProdDebugEnv();
if (fram.begin(FRAM_CS, addrSizeInBytes))
{
Serial.println("Found SPI FRAM");
}
else
{
Serial.println("No SPI FRAM found ... check your connections\r\n");
while (1)
;
}
if (testAddrSize(2))
{
addrSizeInBytes = 2;
}
else if (testAddrSize(3))
{
addrSizeInBytes = 3;
}
else if (testAddrSize(4))
{
addrSizeInBytes = 4;
}
else
{
Serial.println(
"SPI FRAM can not be read/written with any address size\r\n");
while (1)
{
;
}
}
memSize = 0;
while (readBack(memSize, memSize) == memSize)
{
memSize += 256;
//Serial.print("Block: #"); Serial.println(memSize/256);
}
Serial.print("SPI FRAM address size is ");
Serial.print(addrSizeInBytes);
Serial.println(" bytes.");
Serial.println("SPI FRAM capacity appears to be..");
Serial.print(memSize); Serial.println(" bytes");
Serial.print(memSize/0x400); Serial.println(" kilobytes");
Serial.print((memSize*8)/0x400); Serial.println(" kilobits");
if (memSize >= (0x100000/8))
{
Serial.print((memSize*8)/0x100000); Serial.println(" megabits");
}
}
void loop()
{
if (0 != sCmd)
{
sCmd->readSerial(); // process serial commands
}
yield(); // process Timers
}
| 23.554839
| 116
| 0.676527
|
dniklaus
|
1ef4dd357e2c5781a5f96babebc9f2cbec703052
| 109
|
hpp
|
C++
|
src/include/randest/data_provider.hpp
|
renegat96/randest
|
29449ff61398526cc1b88a1f003ed8fddef14693
|
[
"MIT"
] | null | null | null |
src/include/randest/data_provider.hpp
|
renegat96/randest
|
29449ff61398526cc1b88a1f003ed8fddef14693
|
[
"MIT"
] | null | null | null |
src/include/randest/data_provider.hpp
|
renegat96/randest
|
29449ff61398526cc1b88a1f003ed8fddef14693
|
[
"MIT"
] | null | null | null |
#include <randest/data_provider.tcc>
#include <randest/mem_data.hpp>
#include <randest/binary_file_data.hpp>
| 27.25
| 39
| 0.807339
|
renegat96
|
1ef53ec52f3b80be3446bc57cdd8442819d20fc5
| 3,867
|
cpp
|
C++
|
src/bindings/Scriptdev2/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp
|
mfooo/wow
|
3e5fad4cfdf0fd1c0a2fd7c9844e6f140a1bb32d
|
[
"OpenSSL"
] | 1
|
2017-11-16T19:04:07.000Z
|
2017-11-16T19:04:07.000Z
|
src/bindings/Scriptdev2/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp
|
mfooo/wow
|
3e5fad4cfdf0fd1c0a2fd7c9844e6f140a1bb32d
|
[
"OpenSSL"
] | null | null | null |
src/bindings/Scriptdev2/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp
|
mfooo/wow
|
3e5fad4cfdf0fd1c0a2fd7c9844e6f140a1bb32d
|
[
"OpenSSL"
] | null | null | null |
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: instance_culling_of_stratholme
SD%Complete: ?%
SDComment: by MaxXx2021
SDCategory: Culling of Stratholme
EndScriptData */
#include "precompiled.h"
#include "def_culling_of_stratholme.h"
enum
{
SPELL_CHAIN_N = 52696,
SPELL_CHAIN_H = 58823,
SPELL_EXPLODED_N = 52666,
SPELL_EXPLODED_H = 58824,
SPELL_FRENZY = 58841,
SAY_MEATHOOK_AGGRO = -1594111,
SAY_MEATHOOK_DEATH = -1594112,
SAY_MEATHOOK_SLAY01 = -1594113,
SAY_MEATHOOK_SLAY02 = -1594114,
SAY_MEATHOOK_SLAY03 = -1594115
};
struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI
{
boss_meathookAI(Creature *pCreature) : ScriptedAI(pCreature)
{
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon();
m_creature->SetActiveObjectState(true);
Reset();
}
ScriptedInstance* m_pInstance;
bool m_bIsHeroic;
uint32 Chain_Timer;
uint32 Exploded_Timer;
uint32 Frenzy_Timer;
void Reset()
{
Chain_Timer = 6300;
Exploded_Timer = 5000;
Frenzy_Timer = 22300;
}
void Aggro(Unit* who)
{
DoScriptText(SAY_MEATHOOK_AGGRO, m_creature);
}
void JustDied(Unit *killer)
{
DoScriptText(SAY_MEATHOOK_DEATH, m_creature);
if(m_pInstance)
m_pInstance->SetData(TYPE_PHASE, 3);
}
void KilledUnit(Unit* pVictim)
{
switch(rand()%3)
{
case 0: DoScriptText(SAY_MEATHOOK_SLAY01, m_creature); break;
case 1: DoScriptText(SAY_MEATHOOK_SLAY02, m_creature); break;
case 2: DoScriptText(SAY_MEATHOOK_SLAY03, m_creature); break;
}
}
void UpdateAI(const uint32 diff)
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
DoMeleeAttackIfReady();
if (Chain_Timer < diff)
{
if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0))
DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N);
Chain_Timer = 6300;
}else Chain_Timer -= diff;
if (Exploded_Timer < diff)
{
if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0))
DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N);
Exploded_Timer = 5000;
}else Exploded_Timer -= diff;
if (Frenzy_Timer < diff)
{
m_creature->InterruptNonMeleeSpells(false);
DoCast(m_creature,SPELL_FRENZY);
Frenzy_Timer = 23300;
}else Frenzy_Timer -= diff;
}
};
CreatureAI* GetAI_boss_meathook(Creature* pCreature)
{
return new boss_meathookAI(pCreature);
}
void AddSC_boss_meathook()
{
Script *newscript;
newscript = new Script;
newscript->Name = "boss_meathook";
newscript->GetAI = &GetAI_boss_meathook;
newscript->RegisterSelf();
}
| 28.021739
| 92
| 0.653737
|
mfooo
|
1ef79654974ecb856f0578181f16a33f388ebd9c
| 10,181
|
hpp
|
C++
|
common/util/bindings.hpp
|
Depau/tablecloth
|
c073d88130eb0b50552a7cd1cf9bc1576b9936ec
|
[
"MIT"
] | 38
|
2018-08-06T13:12:57.000Z
|
2020-12-07T22:18:48.000Z
|
common/util/bindings.hpp
|
Depau/tablecloth
|
c073d88130eb0b50552a7cd1cf9bc1576b9936ec
|
[
"MIT"
] | 5
|
2018-11-02T09:56:03.000Z
|
2020-02-14T22:34:55.000Z
|
common/util/bindings.hpp
|
Depau/tablecloth
|
c073d88130eb0b50552a7cd1cf9bc1576b9936ec
|
[
"MIT"
] | 5
|
2018-10-02T08:40:56.000Z
|
2020-02-11T00:55:39.000Z
|
#pragma once
#include <memory>
#include <variant>
namespace cloth {
template<typename T>
struct owner {
constexpr explicit owner(T* t) noexcept : _val(t) {}
constexpr explicit operator T*() noexcept
{
return _val;
}
private:
T* _val;
};
} // namespace cloth
/// Generate conversions to Base
#define CLOTH_BIND_BASE(Class, BaseClass) \
public: \
using Base = BaseClass; \
using deleter = cloth::util::deleter<Class>; \
Class(Base* base = nullptr) noexcept : _base(base) {} \
\
Class(cloth::owner<Base> base) noexcept : _base({static_cast<Base*>(base), deleter{*this}}) {} \
\
Base* base() noexcept \
{ \
return &*_base; \
} \
\
operator Base*() noexcept \
{ \
return base(); \
} \
\
Base const* base() const noexcept \
{ \
return &*_base; \
} \
\
operator const Base*() const noexcept \
{ \
return base(); \
} \
\
Class& from_voidptr(void* data) noexcept \
{ \
return *static_cast<Class*>(data); \
} \
\
private: \
::cloth::util::raw_or_unique_ptr<Base, Class::deleter> _base; \
\
public:
#define CLOTH_ENABLE_BITMASK_OPS(Enum) \
template<> \
struct enable_bitmask_ops<Enum> : std::true_type {};
namespace cloth {
template<typename Enum>
struct enum_or_bool {
constexpr enum_or_bool(Enum e) : e(e){};
constexpr enum_or_bool(bool e) : e(static_cast<Enum>(e)){};
constexpr operator Enum&() noexcept
{
return e;
}
constexpr operator const Enum&() const noexcept
{
return e;
}
constexpr operator bool() const noexcept
{
return static_cast<bool>(e);
}
Enum e;
};
template<typename Enum>
struct enable_bitmask_ops : std::false_type {};
template<typename Enum>
constexpr auto operator|(Enum lhs, Enum rhs)
-> std::enable_if_t<cloth::enable_bitmask_ops<Enum>::value, Enum>
{
return static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(lhs) |
static_cast<std::underlying_type_t<Enum>>(rhs));
}
template<typename Enum>
constexpr auto operator&(Enum lhs, Enum rhs)
-> std::enable_if_t<cloth::enable_bitmask_ops<Enum>::value, enum_or_bool<Enum>>
{
return static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(lhs) &
static_cast<std::underlying_type_t<Enum>>(rhs));
}
template<typename Enum>
constexpr auto operator^(Enum lhs, Enum rhs)
-> std::enable_if_t<cloth::enable_bitmask_ops<Enum>::value, Enum>
{
return static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(lhs) ^
static_cast<std::underlying_type_t<Enum>>(rhs));
}
template<typename Enum>
constexpr auto operator~(Enum rhs)
-> std::enable_if_t<cloth::enable_bitmask_ops<Enum>::value, Enum>
{
return static_cast<Enum>(~static_cast<std::underlying_type_t<Enum>>(rhs));
}
template<typename Enum>
constexpr auto operator|=(Enum& lhs, Enum rhs)
-> std::enable_if_t<cloth::enable_bitmask_ops<Enum>::value, Enum&>
{
lhs = static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(lhs) |
static_cast<std::underlying_type_t<Enum>>(rhs));
return lhs;
}
template<typename Enum>
constexpr auto operator&=(Enum& lhs, Enum rhs)
-> std::enable_if_t<cloth::enable_bitmask_ops<Enum>::value, Enum&>
{
lhs = static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(lhs) &
static_cast<std::underlying_type_t<Enum>>(rhs));
return lhs;
}
template<typename Enum>
constexpr auto operator^=(Enum& lhs, Enum rhs)
-> std::enable_if_t<cloth::enable_bitmask_ops<Enum>::value, Enum&>
{
lhs = static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(lhs) ^
static_cast<std::underlying_type_t<Enum>>(rhs));
return lhs;
}
} // namespace cloth
namespace cloth::util {
template<typename T1, typename T2>
constexpr auto dynamic_is(const T2& t) -> std::enable_if_t<!std::is_pointer_v<T2>, bool>
{
return dynamic_cast<T1*>(&t) != nullptr;
}
template<typename T1, typename T2>
constexpr auto dynamic_is(T2* t) -> std::enable_if_t<!std::is_pointer_v<T2>, bool>
{
return dynamic_cast<T1*>(t) != nullptr;
}
template<typename E, typename T>
constexpr auto enum_cast(E e) noexcept -> std::enable_if_t<std::is_enum_v<E>, E>
{
return static_cast<E>(e);
}
/// Cast scoped enums to their underlying numeric type
template<typename E>
constexpr auto enum_cast(E e) noexcept -> std::enable_if_t<!std::is_enum_v<E>, E>
{
return e;
}
template<typename E, typename = std::enable_if_t<std::is_enum_v<E>>>
constexpr auto enum_cast(E e) noexcept
{
return static_cast<std::underlying_type_t<E>>(e);
}
template<typename T, typename = int>
struct has_destroy : std::false_type {};
template<typename T>
struct has_destroy<T, decltype((void) std::declval<T>().destroy(), 0)> : std::true_type {};
template<typename Class>
struct deleter {
Class& klass;
using Base = typename Class::Base;
void operator()(Base* ptr)
{
if constexpr (has_destroy<Class>::value) {
klass.destroy();
} else {
delete ptr;
}
}
};
/// A simple function pointer type alias
template<typename Ret, typename... Args>
using function_ptr = Ret (*)(Args...);
template<typename T, typename Del = std::default_delete<T>>
struct raw_or_unique_ptr {
using value_type = T;
using raw_ptr = value_type*;
using unique_ptr = std::unique_ptr<value_type, Del>;
raw_or_unique_ptr(raw_ptr ptr) noexcept : _data(ptr) {}
raw_or_unique_ptr(unique_ptr&& ptr) noexcept : _data(std::move(ptr)) {}
raw_or_unique_ptr(value_type& data) noexcept : _data(&data) {}
raw_or_unique_ptr(value_type&& data) noexcept
: _data(std::make_unique<value_type, Del>(std::move(data)))
{}
raw_or_unique_ptr(raw_or_unique_ptr const&) = delete;
raw_or_unique_ptr(raw_or_unique_ptr&& rhs) noexcept
{
std::swap(_data, rhs._data);
}
void operator=(raw_or_unique_ptr const&) = delete;
void operator=(raw_or_unique_ptr&& rhs) noexcept
{
std::swap(_data, rhs._data);
}
T& operator*() noexcept
{
if (std::holds_alternative<raw_ptr>(_data)) {
return *std::get<raw_ptr>(_data);
} else {
return *std::get<unique_ptr>(_data);
}
}
T const& operator*() const noexcept
{
if (std::holds_alternative<raw_ptr>(_data)) {
return *std::get<raw_ptr>(_data);
} else {
return *std::get<unique_ptr>(_data);
}
}
T* get() noexcept
{
if (std::holds_alternative<raw_ptr>(_data)) {
return std::get<raw_ptr>(_data);
} else {
return std::get<unique_ptr>(_data).get();
}
}
T const* get() const noexcept
{
if (std::holds_alternative<raw_ptr>(_data)) {
return std::get<raw_ptr>(_data);
} else {
return std::get<unique_ptr>(_data).get();
}
}
private:
std::variant<raw_ptr, unique_ptr> _data;
};
} // namespace cloth::util
| 36.754513
| 100
| 0.445732
|
Depau
|
1ef92e66563339e725e9db1ddd5944d44ce3bc82
| 1,548
|
cpp
|
C++
|
Source/OpenGL/GLBuffer.cpp
|
ShenMian/Graphics
|
729364ede3218a236051d3c1e74779021869d363
|
[
"Apache-2.0"
] | 20
|
2021-12-10T05:45:00.000Z
|
2022-03-28T00:18:11.000Z
|
Source/OpenGL/GLBuffer.cpp
|
ShenMian/Graphics
|
729364ede3218a236051d3c1e74779021869d363
|
[
"Apache-2.0"
] | 8
|
2021-12-10T08:55:03.000Z
|
2022-03-09T00:51:35.000Z
|
Source/OpenGL/GLBuffer.cpp
|
ShenMian/Graphics
|
729364ede3218a236051d3c1e74779021869d363
|
[
"Apache-2.0"
] | 2
|
2021-11-13T12:02:29.000Z
|
2021-12-03T05:02:19.000Z
|
// Copyright 2021 ShenMian
// License(Apache-2.0)
#include "GLBuffer.h"
#include "GLCheck.h"
#include <cassert>
#include <cstring>
#include <unordered_map>
namespace
{
std::unordered_map<Buffer::Type, uint32_t> GLType = {
{Buffer::Type::Vertex, GL_ARRAY_BUFFER},
{Buffer::Type::Index, GL_ELEMENT_ARRAY_BUFFER},
{Buffer::Type::Uniform, GL_UNIFORM_BUFFER}
};
std::unordered_map<Buffer::Usage, uint32_t> GLUsage = {
{Buffer::Usage::Static, GL_STATIC_DRAW},
{Buffer::Usage::Dynamic, GL_DYNAMIC_DRAW},
{Buffer::Usage::Stream, GL_STREAM_DRAW}
};
}
GLBuffer::GLBuffer(size_t size, Type type, Usage usage)
: Buffer(size, type, usage), glType(GLType[type])
{
glCreateBuffers(1, &handle);
bind();
glBufferData(glType, size, nullptr, GLUsage[usage]);
GLCheckError();
}
GLBuffer::~GLBuffer()
{
glDeleteBuffers(1, &handle);
}
void GLBuffer::map(size_t size, size_t offset)
{
const GLenum access = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
if(data)
return; // 缓冲区已处于映射状态
if(size == -1)
size = this->size;
assert(size <= this->size);
bind();
data = glMapBufferRange(glType, offset, size, access);
GLCheckError();
}
void GLBuffer::unmap()
{
bind();
glUnmapBuffer(glType);
data = nullptr;
GLCheckError();
}
void GLBuffer::flush(size_t size, size_t offset)
{
if(size == -1)
size = this->size;
assert(size <= this->size);
bind();
glFlushMappedBufferRange(glType, offset, size);
GLCheckError();
}
void GLBuffer::bind()
{
glBindBuffer(glType, handle);
GLCheckError();
}
GLBuffer::operator GLuint() const
{
return handle;
}
| 18.428571
| 58
| 0.702842
|
ShenMian
|
1efaa02d80c4ec972f788dbdf9a4ee1d557db82e
| 10,545
|
cpp
|
C++
|
TVGameShow/software/CFGTOOLDlg.cpp
|
cuongquay/led-matrix-display
|
6dd0e3be9ee23862610dab7b0d40970c6900e5e4
|
[
"Apache-2.0"
] | null | null | null |
TVGameShow/software/CFGTOOLDlg.cpp
|
cuongquay/led-matrix-display
|
6dd0e3be9ee23862610dab7b0d40970c6900e5e4
|
[
"Apache-2.0"
] | null | null | null |
TVGameShow/software/CFGTOOLDlg.cpp
|
cuongquay/led-matrix-display
|
6dd0e3be9ee23862610dab7b0d40970c6900e5e4
|
[
"Apache-2.0"
] | 1
|
2020-06-13T08:34:26.000Z
|
2020-06-13T08:34:26.000Z
|
// CFGTOOLDlg.cpp : implementation file
//
#include "stdafx.h"
#include "CFGTOOL.h"
#include "CFGTOOLDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define LOAD_DATA_MSG 1
#define MAX_DIGIT 12
BYTE buffer[MAX_DIGIT] = {0x00};
/////////////////////////////////////////////////////////////////////////////
// CCFGTOOLDlg dialog
CCFGTOOLDlg::CCFGTOOLDlg(CWnd* pParent /*=NULL*/)
: CDialog(CCFGTOOLDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CCFGTOOLDlg)
m_nPlus_01 = 0;
m_nMinus_01 = 0;
m_nPlus_02 = 0;
m_nPlus_03 = 0;
m_nPlus_04 = 0;
m_nMinus_02 = 0;
m_nMinus_03 = 0;
m_nMinus_04 = 0;
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CCFGTOOLDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCFGTOOLDlg)
DDX_Control(pDX, IDC_STATIC_FRAME, m_Frame);
DDX_Control(pDX, IDC_DIGIT_STATION_3, m_Station03);
DDX_Control(pDX, IDC_DIGIT_STATION_4, m_Station04);
DDX_Control(pDX, IDC_DIGIT_STATION_2, m_Station02);
DDX_Control(pDX, IDC_DIGIT_STATION_1, m_Station01);
DDX_Text(pDX, IDC_EDIT_PLUS_01, m_nPlus_01);
DDV_MinMaxUInt(pDX, m_nPlus_01, 0, 999);
DDX_Text(pDX, IDC_EDIT_MINUS_01, m_nMinus_01);
DDV_MinMaxUInt(pDX, m_nMinus_01, 0, 999);
DDX_Text(pDX, IDC_EDIT_PLUS_2, m_nPlus_02);
DDV_MinMaxUInt(pDX, m_nPlus_02, 0, 999);
DDX_Text(pDX, IDC_EDIT_PLUS_3, m_nPlus_03);
DDV_MinMaxUInt(pDX, m_nPlus_03, 0, 999);
DDX_Text(pDX, IDC_EDIT_PLUS_4, m_nPlus_04);
DDV_MinMaxUInt(pDX, m_nPlus_04, 0, 999);
DDX_Text(pDX, IDC_EDIT_MINUS_2, m_nMinus_02);
DDV_MinMaxUInt(pDX, m_nMinus_02, 0, 999);
DDX_Text(pDX, IDC_EDIT_MINUS_3, m_nMinus_03);
DDV_MinMaxUInt(pDX, m_nMinus_03, 0, 999);
DDX_Text(pDX, IDC_EDIT_MINUS_4, m_nMinus_04);
DDV_MinMaxUInt(pDX, m_nMinus_04, 0, 999);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCFGTOOLDlg, CDialog)
//{{AFX_MSG_MAP(CCFGTOOLDlg)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_CLOSE()
ON_BN_CLICKED(IDC_BUTTON_PLUS_01, OnButtonPlus01)
ON_BN_CLICKED(IDC_BUTTON_PLUS_02, OnButtonPlus02)
ON_BN_CLICKED(IDC_BUTTON_PLUS_03, OnButtonPlus03)
ON_BN_CLICKED(IDC_BUTTON_PLUS_04, OnButtonPlus04)
ON_BN_CLICKED(IDC_BUTTON_MINUS_01, OnButtonMinus01)
ON_BN_CLICKED(IDC_BUTTON_MINUS_02, OnButtonMinus02)
ON_BN_CLICKED(IDC_BUTTON_MINUS_03, OnButtonMinus03)
ON_BN_CLICKED(IDC_BUTTON_MINUS_04, OnButtonMinus04)
//}}AFX_MSG_MAP
ON_WM_SERIAL(OnSerialMsg)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCFGTOOLDlg message handlers
BOOL CCFGTOOLDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
TCHAR szCOM[10] = _T("COM1");
FILE* file = NULL;
file = fopen(_T("config.ini"),_T("rb"));
if (file != NULL){
TCHAR szBuff[MAX_PATH] = {0};
while (fscanf(file,_T("%s"),szBuff) > 0) {
if (strcmp((const char*)szBuff,_T("[HARDWARE]"))==0){
while (fscanf(file,_T("%s = %s"),szBuff,szCOM) > 0){
if (strcmp((const char*)szBuff,_T("PORT"))==0){
break;
}
}
}
}
fclose(file);
}
if (m_Serial.Open(szCOM,m_hWnd,0)!=ERROR_SUCCESS)
{
CString csText = _T("");
csText.Format(_T("The %s isn't exist or may be used by another program!"),szCOM);
MessageBox(csText,_T("OpenCOMM"),MB_OK);
return FALSE;
}
// Register only for the receive event
// m_Serial.SetMask( CSerial::EEventRecv );
m_Serial.SetupReadTimeouts(CSerial::EReadTimeoutNonblocking);
m_Serial.Setup((CSerial::EBaudrate)CBR_9600);
m_nPoint[0] =m_nPoint[1] =m_nPoint[2] =m_nPoint[3] =0;
this->ShowDisplay();
CString csWindowText = _T("GameShow LED Display v1.00 - ");
this->SetWindowText(csWindowText+_T("Designed by CuongQuay\x99"));
return TRUE; // return TRUE unless you set the focus to a control
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CCFGTOOLDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
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;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CCFGTOOLDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CCFGTOOLDlg::OnOK()
{
this->UpdateData(TRUE);
}
void CCFGTOOLDlg::OnCancel()
{
}
void CCFGTOOLDlg::OnClose()
{
CDialog::EndDialog(IDOK);
}
void CCFGTOOLDlg::OnButtonPlus01()
{
this->UpdateData(TRUE);
if (m_nPlus_01 >=0 && m_nPlus_01 < 1000)
if (m_nPoint[0] <1000)
m_nPoint[0] += m_nPlus_01;
if (m_nPoint[0] >=1000)
m_nPoint[0] = 999;
this->ShowDisplay();
}
void CCFGTOOLDlg::OnButtonPlus02()
{
this->UpdateData(TRUE);
if (m_nPlus_02 >=0 && m_nPlus_02 < 1000)
if (m_nPoint[1] <1000)
m_nPoint[1] += m_nPlus_02;
if (m_nPoint[1] >=1000)
m_nPoint[1] = 999;
this->ShowDisplay();
}
void CCFGTOOLDlg::OnButtonPlus03()
{
this->UpdateData(TRUE);
if (m_nPlus_03 >=0 && m_nPlus_03 < 1000)
if (m_nPoint[2] <1000)
m_nPoint[2] += m_nPlus_03;
if (m_nPoint[2] >=1000)
m_nPoint[2] = 999;
this->ShowDisplay();
}
void CCFGTOOLDlg::OnButtonPlus04()
{
this->UpdateData(TRUE);
if (m_nPlus_04 >=0 && m_nPlus_04 < 1000)
if (m_nPoint[3] <1000)
m_nPoint[3] += m_nPlus_04;
if (m_nPoint[3] >=1000)
m_nPoint[3] = 999;
this->ShowDisplay();
}
void CCFGTOOLDlg::OnButtonMinus01()
{
this->UpdateData(TRUE);
if (m_nMinus_01 >=0 && m_nMinus_01 < 1000)
if (m_nPoint[0] >=-99)
m_nPoint[0] -= m_nMinus_01;
if (m_nPoint[0] <-99)
m_nPoint[0] = -99;
this->ShowDisplay();
}
void CCFGTOOLDlg::OnButtonMinus02()
{
this->UpdateData(TRUE);
if (m_nMinus_02 >=0 && m_nMinus_02 < 1000)
if (m_nPoint[1] >=-99)
m_nPoint[1] -= m_nMinus_02;
if (m_nPoint[1] <-99)
m_nPoint[1] = -99;
this->ShowDisplay();
}
void CCFGTOOLDlg::OnButtonMinus03()
{
this->UpdateData(TRUE);
if (m_nMinus_03 >=0 && m_nMinus_03 < 1000)
if (m_nPoint[2] >=-99)
m_nPoint[2] -= m_nMinus_03;
if (m_nPoint[2] <-99)
m_nPoint[2] = -99;
this->ShowDisplay();
}
void CCFGTOOLDlg::OnButtonMinus04()
{
this->UpdateData(TRUE);
if (m_nMinus_04 >=0 && m_nMinus_04 < 1000)
if (m_nPoint[3] >=-99)
m_nPoint[3] -= m_nMinus_04;
if (m_nPoint[3] <-99)
m_nPoint[3] = -99;
this->ShowDisplay();
}
void CCFGTOOLDlg::SendData()
{
WORD wParam = 0;
WORD lParam = MAX_DIGIT;
BYTE nMsg = LOAD_DATA_MSG;
BYTE msg[] = {0x55,0x55,0x55,
nMsg,
HIBYTE(wParam),
LOBYTE(wParam),
HIBYTE(lParam),
LOBYTE(lParam)
};
// send message command
if (m_Serial.Write(msg,sizeof(msg))==ERROR_SUCCESS){
Sleep(100);
}
// send data buffer
for (int i=0; i< MAX_DIGIT; i++){
m_Serial.Write(&buffer[i],sizeof(BYTE));
}
}
void CCFGTOOLDlg::DoFormat(int value, BYTE *buff)
{
if (value >=0){
buff[0] = (value/100);
buff[1] = (value%100)/10;
buff[2] = (value%100)%10;
if (buff[0]==0) {
buff[0] =0x0F; // off segments
if (buff[1]==0) buff[1]=0x0F;
}
}
else{
if ((value%100)/10){
buff[0] = 0x0A; // minus sign
buff[1] = -(value%100)/10;
buff[2] = -(value%100)%10;
}
else{
buff[0] = 0x0F; // off segments
buff[1] = 0x0A; // minus sign
buff[2] = -(value%100)%10;
}
}
BYTE xtable[20] = {0};
FILE* file = NULL;
file = fopen(_T("config.ini"),_T("rb"));
if (file == NULL) return;
TCHAR szBuff[MAX_PATH] = {0};
BYTE code = 0x00;
BYTE index = 0;
while (fscanf(file,_T("%s"),szBuff) > 0) {
if (strcmp((const char*)szBuff,_T("[DECODE]"))==0){
while (fscanf(file,_T("%d = %x"),&index,&code) > 0){
xtable[index] = code;
if (index > 15) break;
}
}
}
fclose(file);
if (buff[0]!=0xFF){
buff[0] = xtable[buff[0]];
}
if (buff[1]!=0xFF){
buff[1] = xtable[buff[1]];
}
if (buff[2]!=0xFF){
buff[2] = xtable[buff[2]];
}
}
void CCFGTOOLDlg::FormatBuffer()
{
DoFormat(m_nPoint[0],&buffer[9]);
DoFormat(m_nPoint[1],&buffer[6]);
DoFormat(m_nPoint[2],&buffer[3]);
DoFormat(m_nPoint[3],&buffer[0]);
}
void CCFGTOOLDlg::ShowDisplay()
{
CString csText = _T("");
csText.Format(_T("%3d"),m_nPoint[0]);
CDigiStatic* pStatic = (CDigiStatic*)GetDlgItem(IDC_DIGIT_STATION_1);
pStatic->SetText(csText);
csText.Format(_T("%3d"),m_nPoint[1]);
pStatic = (CDigiStatic*)GetDlgItem(IDC_DIGIT_STATION_2);
pStatic->SetText(csText);
csText.Format(_T("%3d"),m_nPoint[2]);
pStatic = (CDigiStatic*)GetDlgItem(IDC_DIGIT_STATION_3);
pStatic->SetText(csText);
csText.Format(_T("%3d"),m_nPoint[3]);
pStatic = (CDigiStatic*)GetDlgItem(IDC_DIGIT_STATION_4);
pStatic->SetText(csText);
this->FormatBuffer();
this->SendData();
}
LRESULT CCFGTOOLDlg::OnSerialMsg (WPARAM wParam, LPARAM /*lParam*/)
{
CSerial::EEvent eEvent = CSerial::EEvent(LOWORD(wParam));
CSerial::EError eError = CSerial::EError(HIWORD(wParam));
if (eEvent & CSerial::EEventRecv)
{
// Create a clean buffer
DWORD dwRead;
char szData[1024*8];
const int nBuflen = sizeof(szData)-1;
// Obtain the data from the serial port
do
{
m_Serial.Read(szData,nBuflen,&dwRead);
szData[dwRead] = '\0';
if (dwRead>0)
{
if (szData[0]==0x55 && szData[1]== 0x55 && szData[2]==0x55)
{
TRACE(_T("READ %d byte(s):"),dwRead);
for (int i =0; i< int(dwRead); i++){
TRACE(_T("%02X "),BYTE(szData[i]));
}
TRACE(_T("\n"));
}
else
{
TRACE(_T("READ = %s \r\n"),szData);
}
}
} while (dwRead == nBuflen);
}
return 0;
}
| 24.811765
| 84
| 0.631958
|
cuongquay
|
4805c2f7327658e3143b07363565bc5f92c43818
| 4,790
|
cpp
|
C++
|
src/Semantic/check missing return.cpp
|
Kerndog73/STELA
|
11449b4bb440494f3ec4b1172b2688b5ec1bcd0a
|
[
"MIT"
] | 10
|
2018-06-20T05:12:59.000Z
|
2021-11-23T02:56:04.000Z
|
src/Semantic/check missing return.cpp
|
Kerndog73/STELA
|
11449b4bb440494f3ec4b1172b2688b5ec1bcd0a
|
[
"MIT"
] | null | null | null |
src/Semantic/check missing return.cpp
|
Kerndog73/STELA
|
11449b4bb440494f3ec4b1172b2688b5ec1bcd0a
|
[
"MIT"
] | null | null | null |
//
// check missing return.cpp
// STELA
//
// Created by Indi Kernick on 12/12/18.
// Copyright © 2018 Indi Kernick. All rights reserved.
//
#include "check missing return.hpp"
#include "scope lookup.hpp"
using namespace stela;
namespace {
class Visitor final : public ast::Visitor {
public:
explicit Visitor(sym::Ctx ctx)
: ctx{ctx} {}
void visit(ast::Block &block) override {
occurs = Occurs::no;
bool maybeLeave = false;
Term blockTerm = {};
for (auto s = block.nodes.cbegin(); s != block.nodes.cend(); ++s) {
ast::Statement *stat = s->get();
stat->accept(*this);
if (occurs == Occurs::yes && std::next(s) != block.nodes.cend()) {
ast::Statement *nextStat = std::next(s)->get();
ctx.log.error(nextStat->loc) << "Unreachable code" << fatal;
}
if (occurs == Occurs::maybe && term != Term::returns) {
maybeLeave = true;
}
blockTerm = maxTerm(blockTerm, term);
}
term = blockTerm;
if (maybeLeave) {
occurs = Occurs::maybe;
}
if (occurs != Occurs::yes) {
block.nodes.push_back(make_retain<ast::Terminate>());
}
}
void visit(ast::If &fi) override {
fi.body->accept(*this);
const Term trooTerm = term;
const Occurs trooOccurs = occurs;
if (fi.elseBody) {
fi.elseBody->accept(*this);
} else {
occurs = Occurs::no;
}
if (occurs != trooOccurs || term != trooTerm) {
occurs = Occurs::maybe;
}
if (trooTerm == Term::returns) {
term = Term::returns;
}
}
void visit(ast::Switch &swich) override {
bool foundDefault = false;
size_t retCount = 0;
size_t totalCases = swich.cases.size();
bool maybeRet = false;
for (auto c = swich.cases.cbegin(); c != swich.cases.cend(); ++c) {
if (!c->expr) {
foundDefault = true;
}
c->body->accept(*this);
if (term == Term::returns) {
if (occurs == Occurs::maybe) {
maybeRet = true;
} else if (occurs == Occurs::yes) {
++retCount;
}
} else if (term == Term::continues) {
if (occurs == Occurs::yes) {
--totalCases;
}
if (occurs != Occurs::no && std::next(c) == swich.cases.cend()) {
ctx.log.error(c->loc) << "Case may continue but this case does not precede another" << fatal;
}
}
}
term = Term::returns;
if (retCount == totalCases && foundDefault) {
occurs = Occurs::yes;
swich.alwaysReturns = true;
} else if (maybeRet || retCount != 0) {
occurs = Occurs::maybe;
swich.alwaysReturns = false;
} else {
occurs = Occurs::no;
swich.alwaysReturns = false;
}
}
void visit(ast::Break &) override {
term = Term::breaks;
occurs = Occurs::yes;
}
void visit(ast::Continue &) override {
term = Term::continues;
occurs = Occurs::yes;
}
void visit(ast::Return &) override {
term = Term::returns;
occurs = Occurs::yes;
}
void visit(ast::While &wile) override {
wile.body->accept(*this);
afterLoop();
}
void visit(ast::For &four) override {
four.body->accept(*this);
afterLoop();
}
void afterLoop() {
if (term == Term::returns) {
if (occurs != Occurs::no) {
occurs = Occurs::maybe;
}
} else {
term = Term::returns;
occurs = Occurs::no;
}
}
bool noReturn() const {
return occurs == Occurs::no;
}
bool maybeReturn() const {
return occurs == Occurs::maybe;
}
private:
sym::Ctx ctx;
enum class Term {
continues,
breaks,
returns,
};
enum class Occurs {
no,
maybe,
yes
};
Term term {};
Occurs occurs {};
Term maxTerm(const Term a, const Term b) {
return static_cast<Term>(std::max(
static_cast<int>(a), static_cast<int>(b)
));
}
Occurs maxOccurs(const Occurs a, const Occurs b) {
return static_cast<Occurs>(std::max(
static_cast<int>(a), static_cast<int>(b)
));
}
};
}
void stela::checkMissingRet(sym::Ctx ctx, ast::Block &body, const ast::TypePtr &ret, const Loc loc) {
Visitor visitor{ctx};
body.accept(visitor);
bool retVoid = false;
if (auto *btnType = lookupConcrete<ast::BtnType>(ctx, ret).get()) {
retVoid = btnType->value == ast::BtnTypeEnum::Void;
}
if (retVoid && (visitor.noReturn() || visitor.maybeReturn())) {
if (!body.nodes.empty() && dynamic_cast<ast::Terminate *>(body.nodes.back().get())) {
body.nodes.pop_back();
}
body.nodes.push_back(make_retain<ast::Return>());
return;
}
if (visitor.noReturn()) {
ctx.log.error(loc) << "Non-void function does not return" << fatal;
}
if (visitor.maybeReturn()) {
ctx.log.error(loc) << "Non-void function may not return" << fatal;
}
}
| 25.343915
| 103
| 0.573695
|
Kerndog73
|
48060382023e744db14683300891dcbbbbc883d5
| 9,770
|
cpp
|
C++
|
Software/OOP/Version 2/Soccer_Simulation_v2/Classes/Camera.cpp
|
Brenocq/SoccerOpenRCJ
|
1711e251861c124e49df21abb63eb169569bea4f
|
[
"MIT"
] | 2
|
2019-05-02T23:01:06.000Z
|
2019-05-11T01:29:06.000Z
|
Software/OOP/Version 2/Soccer_Simulation_v2/Classes/Camera.cpp
|
Brenocq/SoccerOpenRCJ
|
1711e251861c124e49df21abb63eb169569bea4f
|
[
"MIT"
] | null | null | null |
Software/OOP/Version 2/Soccer_Simulation_v2/Classes/Camera.cpp
|
Brenocq/SoccerOpenRCJ
|
1711e251861c124e49df21abb63eb169569bea4f
|
[
"MIT"
] | null | null | null |
///////////////////////////////////////////////////////////
// Camera.cpp
// Implementation of the Class Camera
// Created on: 21-mar-2018 21:46:56
// Original author: Breno Queiroz
///////////////////////////////////////////////////////////
#include "Camera.h"
#if !defined(ARDUINO)
#include <iostream>//cout,cin
using std::cout;
using std::cin;
using std::endl;
#include <iomanip>//setprecision
using std::setprecision;
#endif
#if defined(ARDUINO)
#include <Wire.h>
Camera::Camera()
: Sensor(0, 0), fieldOfViewH(75), fieldOfViewV(47)
{
}
void Camera::begin(){
pixy = new PixyI2C;
pixy->init();
}
#else
Camera::Camera(string name,int robotN)
: Sensor(name, robotN), fieldOfViewH(75), fieldOfViewV(75)
{
}
#endif
Camera::~Camera(){
}
#if !defined(ARDUINO)
void Camera::initializeSimulation(int ID)
{
Sensor::initializeSimulation(ID);
string name1 = sensorName + "1#" + std::to_string(robotNumber);
if (simxGetObjectHandle(clientIDSimulation, (const simxChar*)name1.c_str(), (simxInt *)&handleCam1, (simxInt)simx_opmode_oneshot_wait) != simx_return_ok)
cout << sensorName << "1- robot" << robotNumber << " not found!" << std::endl;
else
cout << "Connected to the sensor " << sensorName << "1- robot" << robotNumber << std::endl;
string name2 = sensorName + "2#" + std::to_string(robotNumber);
if (simxGetObjectHandle(clientIDSimulation, (const simxChar*)name2.c_str(), (simxInt *)&handleCam2, (simxInt)simx_opmode_oneshot_wait) != simx_return_ok)
cout << sensorName << "2- robot" << robotNumber << " not found!" << std::endl;
else
cout << "Connected to the sensor " << sensorName << "2- robot" << robotNumber << std::endl;
simxReadVisionSensor(clientIDSimulation, handleSimulation, &state, &auxCameraValues, &auxCameraValuesCount, simx_opmode_streaming);
simxReadVisionSensor(clientIDSimulation, handleCam1, &state, &auxCameraValues, &auxCameraValuesCount, simx_opmode_streaming);
simxReadVisionSensor(clientIDSimulation, handleCam2, &state, &auxCameraValues, &auxCameraValuesCount, simx_opmode_streaming);
}
#endif
void Camera::updateCamera(){
#if defined(ARDUINO)
static int i = 0;
int j;
uint16_t blocks;
char buf[32];
blocks = pixy->getBlocks();
if (blocks){
setNumberObjects(blocks);
for (int i = 0; i < blocks; i++){
int size = (pixy->blocks[i].width) > (pixy->blocks[i].height) ? (pixy->blocks[i].width) : (pixy->blocks[i].height);
float _objX = pixy->blocks[i].x;
float _objY = pixy->blocks[i].y;
setObjectX(_objX / 320, i);
setObjectY(_objY / 200, i);
if ((pixy->blocks[i].width) > (pixy->blocks[i].height)){
float _objSize = pixy->blocks[i].width;
setObjectSize(_objSize / 320, i);
}
else{
float _objSize = pixy->blocks[i].height;
setObjectSize(_objSize / 200, i);
}
}
for (int i = blocks; i < 10; i++){
setObjectX(0, i);
setObjectY(0, i);
setObjectSize(0, i);
}
/*Serial.print("pixy X:");
Serial.print(pixy->blocks[0].x);
Serial.print(" Y:");
Serial.print(pixy->blocks[0].y);
Serial.print(" width:");
Serial.print(pixy->blocks[0].width);
Serial.print(" height:");
Serial.print(pixy->blocks[0].height);
Serial.print(" signature:");
Serial.println(pixy->blocks[0].signature);*/
}
else {
for (int i = 0; i < 10; i++){
setObjectX(0, i);
setObjectY(0, i);
setObjectSize(0, i);
setNumberObjects(0);
}
}
#else
if (simxReadVisionSensor(clientIDSimulation, handleSimulation, &state, &auxCameraValues, &auxCameraValuesCount, simx_opmode_streaming) == simx_return_ok){
setNumberObjects(auxCameraValues[15],0);//nothing=0 (ball)
float objectLenght = auxCameraValues[21];
float objectHeight = auxCameraValues[22];
if (getNumberObjects("ball") != 0)
{
setObjectX(auxCameraValues[19]);
setObjectY(auxCameraValues[20]);
if (objectHeight > objectLenght)
setObjectSize(objectHeight);
else
setObjectSize(objectLenght);
}
else
{
setNumberObjects(0);
setObjectX(0);
setObjectY(0);
}
}
//----- Camera 1(yellow) -----//
if (simxReadVisionSensor(clientIDSimulation, handleCam1, &state, &auxCameraValues, &auxCameraValuesCount, simx_opmode_streaming) == simx_return_ok){
//(15)num objects (19)Xobj1 (20)Yobj1 (21)Lenghtobj1 (22)Heightobj1
// (23) (24) (25)Xobj2 (26)Yobj2 (27)Lenghtobj2 (28)Heightobj2
setNumberObjects(auxCameraValues[15], 1);
int selectObject = 0;
if (getNumberObjects("goaly") == 2){
if (auxCameraValues[21] < auxCameraValues[27])//if object 1 is bigger than object 2
selectObject = 6;//use date from the other object
}
if (getNumberObjects("goaly") !=0)
{
setNumberObjects(auxCameraValues[15], 1);
float objectLenght = auxCameraValues[21 + selectObject];
float objectHeight = auxCameraValues[22 + selectObject];
setObjectX(auxCameraValues[19 + selectObject], 1);
setObjectY(auxCameraValues[20 + selectObject], 1);
setObjectHeight(objectHeight, 1);
setObjectLength(objectLenght, 1);
if (objectHeight > objectLenght)
setObjectSize(objectHeight,1);
else
setObjectSize(objectLenght,1);
}
else
{
setNumberObjects(0,1);
setObjectX(0,1);
setObjectY(0,1);
}
}
//----- Camera 2(blue) -----//
if (simxReadVisionSensor(clientIDSimulation, handleCam2, &state, &auxCameraValues, &auxCameraValuesCount, simx_opmode_streaming) == simx_return_ok){
//(15)num objects (19)Xobj1 (20)Yobj1 (21)Lenghtobj1 (22)Heightobj1
// (23) (24) (25)Xobj2 (26)Yobj2 (27)Lenghtobj2 (28)Heightobj2
setNumberObjects(auxCameraValues[15], 2);
int selectObject = 0;
if (getNumberObjects("goalb") == 2){
if (auxCameraValues[21] < auxCameraValues[27])//if object 1 is bigger than object 2
selectObject = 6;//use date from the other object
}
if (getNumberObjects("goalb") != 0)
{
setNumberObjects(auxCameraValues[15], 2);
float objectLenght = auxCameraValues[21 + selectObject];
float objectHeight = auxCameraValues[22 + selectObject];
setObjectX(auxCameraValues[19 + selectObject], 2);
setObjectY(auxCameraValues[20 + selectObject], 2);
setObjectHeight(objectHeight, 2);
setObjectLength(objectLenght, 2);
if (objectHeight > objectLenght)
setObjectSize(objectHeight, 2);
else
setObjectSize(objectLenght, 2);
}
else
{
setNumberObjects(0, 2);
setObjectX(0, 2);
setObjectY(0, 2);
}
}
#endif
}
void Camera :: print()const{
#if defined(ARDUINO)
if (getNumberObjects()>0)
{
int numObjects = getNumberObjects();
Serial.print("pixy numObj:");
Serial.print(numObjects);
for (int i = 0; i<numObjects; i++)
{
Serial.println(" ");
Serial.print(" Object ");
Serial.print(i);
Serial.print("--> X:");
Serial.print(getObjectX(i));
Serial.print(" Y:");
Serial.print(getObjectY(i));
Serial.print(" size:");
Serial.print(getObjectSize(i));
delay(100);
}
delay(1000);
Serial.println(" ");
Serial.println(" ");
}
else
Serial.println("0 objects detected");
#else
#endif
}
//Get property
float Camera::getObjectX(string name)const {
if (name=="ball")
return objectX[0];
else if (name == "goal"){
if (getNumberObjects("goalb") > getNumberObjects("goaly"))
return objectX[2];
else
return objectX[1];
}
else
cout << endl << "getObjectX Camera: please use a valid name";
}
float Camera::getObjectY(string name)const {
if (name == "ball")
return objectY[0];
else if (name == "goal"){
if (getNumberObjects("goalb") > getNumberObjects("goaly"))
return objectY[2];
else
return objectY[1];
}
else
cout << endl << "getObjectY Camera: please use a valid name";
}
float Camera::getObjectSize(string name)const
{
if (name == "ball")
return objectSize[0];
else if (name == "goal"){
if (objectSize[1] > objectSize[2])
return objectSize[1];
else
return objectSize[2];
}
else
cout << endl << "getObjectSize Camera: please use a valid name";
}
float Camera::getObjectLength(string name)const
{
if (name == "ball")
return objectLenght[0];
else if (name == "goal"){
if (getNumberObjects("goalb") > getNumberObjects("goaly"))
return objectLenght[2];
else
return objectLenght[1];
}
else
cout << endl << "getObjectSize Camera: please use a valid name";
return 0;
}
float Camera::getObjectHeight(string name)const
{
if (name == "ball")
return objectHeight[0];
else if (name == "goal"){
if (getNumberObjects("goalb") > getNumberObjects("goaly"))
return objectHeight[2];
else
return objectHeight[1];
}
else
cout << endl << "getObjectSize Camera: please use a valid name";
return 0;
}
int Camera::getNumberObjects(string name) const{
if (name == "ball")
return numberObjects[0];
else if (name == "goaly")
return numberObjects[1];
else if (name == "goalb")
return numberObjects[2];
else
cout << endl << "getObjectSize Camera: please use a valid name";
return 0;
}
int Camera::getFieldOfViewH()const
{
return fieldOfViewH;
}
int Camera::getFieldOfViewV()const
{
return fieldOfViewV;
}
//Set property
void Camera::setObjectX(float val, int objN){
objectX[objN] = val;
}
void Camera::setObjectY(float val, int objN){
objectY[objN] = val;
}
void Camera::setObjectSize(float val, int objN)
{
objectSize[objN] = val;
}
void Camera::setObjectLength(float val, int objN)
{
objectLenght[objN] = val;
}
void Camera::setObjectHeight(float val, int objN)
{
objectHeight[objN] = val;
}
void Camera::setNumberObjects(int val, int objN){
numberObjects[objN] = val;
}
| 27.755682
| 156
| 0.649949
|
Brenocq
|
4806568eb5c5e9c717e90d55e0ec7a96409bd50e
| 5,465
|
hpp
|
C++
|
src/vlGraphics/EdgeUpdateCallback.hpp
|
zpc930/visualizationlibrary
|
c81fa75c720a3d04d295b977a1f5dc4624428b53
|
[
"BSD-2-Clause"
] | null | null | null |
src/vlGraphics/EdgeUpdateCallback.hpp
|
zpc930/visualizationlibrary
|
c81fa75c720a3d04d295b977a1f5dc4624428b53
|
[
"BSD-2-Clause"
] | null | null | null |
src/vlGraphics/EdgeUpdateCallback.hpp
|
zpc930/visualizationlibrary
|
c81fa75c720a3d04d295b977a1f5dc4624428b53
|
[
"BSD-2-Clause"
] | null | null | null |
/**************************************************************************************/
/* */
/* Visualization Library */
/* http://www.visualizationlibrary.org */
/* */
/* Copyright (c) 2005-2010, Michele Bosi */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or without modification, */
/* are permitted provided that the following conditions are met: */
/* */
/* - Redistributions of source code must retain the above copyright notice, this */
/* list of conditions and the following disclaimer. */
/* */
/* - Redistributions in binary form must reproduce the above copyright notice, this */
/* list of conditions and the following disclaimer in the documentation and/or */
/* other materials provided with the distribution. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */
/* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR */
/* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
/* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
/* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* */
/**************************************************************************************/
#ifndef EdgeUpdateCallback_INCLUDE_ONCE
#define EdgeUpdateCallback_INCLUDE_ONCE
#include <vlGraphics/Actor.hpp>
#include <vlGraphics/EdgeExtractor.hpp>
#include <vlGraphics/Geometry.hpp>
#include <vlGraphics/Camera.hpp>
namespace vl
{
//! The EdgeUpdateCallback class updates at every frame the edges of an Actor for the purpose of edge-enhancement.
//! \sa EdgeExtractor
class EdgeUpdateCallback: public ActorEventCallback
{
VL_INSTRUMENT_CLASS(vl::EdgeUpdateCallback, ActorEventCallback)
public:
EdgeUpdateCallback(): mShowCreases(true)
{
VL_DEBUG_SET_OBJECT_NAME()
}
EdgeUpdateCallback(const std::vector<EdgeExtractor::Edge>& edge): mEdges(edge), mShowCreases(false)
{
VL_DEBUG_SET_OBJECT_NAME()
}
//! If \p true only the edges forming the silhouette of an object will be rendered.
void setShowCreases(bool sonly) { mShowCreases = sonly; }
//! If \p true only the edges forming the silhouette of an object will be rendered.
bool showCreases() const { return mShowCreases; }
virtual void onActorDelete(Actor*) {}
virtual void onActorRenderStarted(Actor* act, real /*frame_clock*/, const Camera* cam, Renderable* renderable, const Shader*, int pass)
{
if (pass != 0)
return;
fmat4 vmat = (fmat4)cam->viewMatrix();
if (act->transform())
vmat = vmat * (fmat4)act->transform()->worldMatrix();
fmat4 nmat = vmat.as3x3();
nmat = nmat.getInverse().transpose();
ref<Geometry> geom = cast<Geometry>(renderable);
ref<ArrayFloat3> vert_array = cast<ArrayFloat3>(geom->vertexArray());
// VL_CHECK(vert_array->size() == edges().size()*2);
for(unsigned i=0; i<edges().size(); ++i)
{
bool insert_edge = edges()[i].isCrease() && showCreases();
if (!insert_edge)
{
fvec3 v1 = vmat * edges()[i].vertex1();
fvec3 v2 = vmat * edges()[i].vertex2();
fvec3 v = ((v1+v2) * 0.5f).normalize();
fvec3 n1 = nmat * edges()[i].normal1();
fvec3 n2 = nmat * edges()[i].normal2();
insert_edge = dot(n1, v) * dot(n2, v) < 0;
}
if ( insert_edge )
{
vert_array->at(i*2+0) = edges()[i].vertex1();
vert_array->at(i*2+1) = edges()[i].vertex2();
}
else
{
// degenerate
vert_array->at(i*2+0) = vert_array->at(i*2+1);
}
}
}
const std::vector<EdgeExtractor::Edge>& edges() const { return mEdges; }
std::vector<EdgeExtractor::Edge>& edges() { return mEdges; }
private:
std::vector<EdgeExtractor::Edge> mEdges;
bool mShowCreases;
};
}
#endif
| 47.112069
| 140
| 0.507045
|
zpc930
|
480779afd2cdd1dfb5a4ebd00e961fb057db8e51
| 3,344
|
cpp
|
C++
|
libraries/audio/src/AudioEffectOptions.cpp
|
ey6es/hifi
|
23f9c799dde439e4627eef45341fb0d53feff80b
|
[
"Apache-2.0"
] | 1
|
2015-03-11T19:49:20.000Z
|
2015-03-11T19:49:20.000Z
|
libraries/audio/src/AudioEffectOptions.cpp
|
ey6es/hifi
|
23f9c799dde439e4627eef45341fb0d53feff80b
|
[
"Apache-2.0"
] | null | null | null |
libraries/audio/src/AudioEffectOptions.cpp
|
ey6es/hifi
|
23f9c799dde439e4627eef45341fb0d53feff80b
|
[
"Apache-2.0"
] | null | null | null |
//
// AudioEffectOptions.cpp
// libraries/audio/src
//
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AudioEffectOptions.h"
static const QString MAX_ROOM_SIZE_HANDLE = "maxRoomSize";
static const QString ROOM_SIZE_HANDLE = "roomSize";
static const QString REVERB_TIME_HANDLE = "reverbTime";
static const QString DAMPIMG_HANDLE = "damping";
static const QString SPREAD_HANDLE = "spread";
static const QString INPUT_BANDWIDTH_HANDLE = "inputBandwidth";
static const QString EARLY_LEVEL_HANDLE = "earlyLevel";
static const QString TAIL_LEVEL_HANDLE = "tailLevel";
static const QString DRY_LEVEL_HANDLE = "dryLevel";
static const QString WET_LEVEL_HANDLE = "wetLevel";
AudioEffectOptions::AudioEffectOptions(QScriptValue arguments) :
_maxRoomSize(50.0f),
_roomSize(50.0f),
_reverbTime(4.0f),
_damping(0.5f),
_spread(15.0f),
_inputBandwidth(0.75f),
_earlyLevel(-22.0f),
_tailLevel(-28.0f),
_dryLevel(0.0f),
_wetLevel(6.0f) {
if (arguments.property(MAX_ROOM_SIZE_HANDLE).isNumber()) {
_maxRoomSize = arguments.property(MAX_ROOM_SIZE_HANDLE).toNumber();
}
if (arguments.property(ROOM_SIZE_HANDLE).isNumber()) {
_roomSize = arguments.property(ROOM_SIZE_HANDLE).toNumber();
}
if (arguments.property(REVERB_TIME_HANDLE).isNumber()) {
_reverbTime = arguments.property(REVERB_TIME_HANDLE).toNumber();
}
if (arguments.property(DAMPIMG_HANDLE).isNumber()) {
_damping = arguments.property(DAMPIMG_HANDLE).toNumber();
}
if (arguments.property(SPREAD_HANDLE).isNumber()) {
_spread = arguments.property(SPREAD_HANDLE).toNumber();
}
if (arguments.property(INPUT_BANDWIDTH_HANDLE).isNumber()) {
_inputBandwidth = arguments.property(INPUT_BANDWIDTH_HANDLE).toNumber();
}
if (arguments.property(EARLY_LEVEL_HANDLE).isNumber()) {
_earlyLevel = arguments.property(EARLY_LEVEL_HANDLE).toNumber();
}
if (arguments.property(TAIL_LEVEL_HANDLE).isNumber()) {
_tailLevel = arguments.property(TAIL_LEVEL_HANDLE).toNumber();
}
if (arguments.property(DRY_LEVEL_HANDLE).isNumber()) {
_dryLevel = arguments.property(DRY_LEVEL_HANDLE).toNumber();
}
if (arguments.property(WET_LEVEL_HANDLE).isNumber()) {
_wetLevel = arguments.property(WET_LEVEL_HANDLE).toNumber();
}
}
AudioEffectOptions::AudioEffectOptions(const AudioEffectOptions &other) {
*this = other;
}
AudioEffectOptions& AudioEffectOptions::operator=(const AudioEffectOptions &other) {
_maxRoomSize = other._maxRoomSize;
_roomSize = other._roomSize;
_reverbTime = other._reverbTime;
_damping = other._damping;
_spread = other._spread;
_inputBandwidth = other._inputBandwidth;
_earlyLevel = other._earlyLevel;
_tailLevel = other._tailLevel;
_dryLevel = other._dryLevel;
_wetLevel = other._wetLevel;
return *this;
}
QScriptValue AudioEffectOptions::constructor(QScriptContext* context, QScriptEngine* engine) {
return engine->newQObject(new AudioEffectOptions(context->argument(0)));
}
| 37.573034
| 94
| 0.700957
|
ey6es
|
48081e868788e0ee93c3e3e089e42fab2d22bd84
| 720
|
cpp
|
C++
|
hiro/gtk/widget/icon-view-item.cpp
|
CasualPokePlayer/ares
|
58690cd5fc7bb6566c22935c5b80504a158cca29
|
[
"BSD-3-Clause"
] | 153
|
2020-07-25T17:55:29.000Z
|
2021-10-01T23:45:01.000Z
|
hiro/gtk/widget/icon-view-item.cpp
|
CasualPokePlayer/ares
|
58690cd5fc7bb6566c22935c5b80504a158cca29
|
[
"BSD-3-Clause"
] | 245
|
2021-10-08T09:14:46.000Z
|
2022-03-31T08:53:13.000Z
|
hiro/gtk/widget/icon-view-item.cpp
|
CasualPokePlayer/ares
|
58690cd5fc7bb6566c22935c5b80504a158cca29
|
[
"BSD-3-Clause"
] | 44
|
2020-07-25T08:51:55.000Z
|
2021-09-25T16:09:01.000Z
|
#if defined(Hiro_IconView)
namespace hiro {
auto pIconViewItem::construct() -> void {
}
auto pIconViewItem::destruct() -> void {
}
auto pIconViewItem::setIcon(const image& icon) -> void {
if(auto parent = _parent()) {
parent->setItemIcon(self().offset(), icon);
}
}
auto pIconViewItem::setSelected(bool selected) -> void {
if(auto parent = _parent()) {
parent->setItemSelected(self().offset(), selected);
}
}
auto pIconViewItem::setText(const string& text) -> void {
if(auto parent = _parent()) {
parent->setItemText(self().offset(), text);
}
}
auto pIconViewItem::_parent() -> pIconView* {
if(auto parent = self().parentIconView()) return parent->self();
return nullptr;
}
}
#endif
| 19.459459
| 66
| 0.663889
|
CasualPokePlayer
|
48096ad7d2fb39deb394920b266dff9a8c83229c
| 3,733
|
hpp
|
C++
|
include/bulk/partitionings/block.hpp
|
roelhem/Bulk
|
8a84bb8cf0a71a5d67ed6ffd818f072d9076630f
|
[
"MIT"
] | 92
|
2016-05-11T14:26:04.000Z
|
2022-01-07T03:54:19.000Z
|
include/bulk/partitionings/block.hpp
|
roelhem/Bulk
|
8a84bb8cf0a71a5d67ed6ffd818f072d9076630f
|
[
"MIT"
] | 6
|
2016-05-15T05:58:47.000Z
|
2020-11-25T15:29:26.000Z
|
include/bulk/partitionings/block.hpp
|
roelhem/Bulk
|
8a84bb8cf0a71a5d67ed6ffd818f072d9076630f
|
[
"MIT"
] | 13
|
2016-05-14T11:14:14.000Z
|
2022-01-25T10:17:24.000Z
|
#include "partitioning.hpp"
namespace bulk {
/**
* A block distribution. This equally block-distributes the first G axes.
*/
template <int D, int G = D>
class block_partitioning : public rectangular_partitioning<D, G> {
public:
using rectangular_partitioning<D, G>::local_size;
using rectangular_partitioning<D, G>::origin;
using rectangular_partitioning<D, G>::global;
/**
* Constructs a block partitioning in nD.
*
* `grid`: the number of processors in each dimension
* `data_size`: the global number of processors along each axis
*/
block_partitioning(index_type<D> data_size, index_type<G> grid)
: block_partitioning(data_size, grid, iota_()) {}
/**
* Constructs a block partitioning in nD.
*
* `grid`: the number of processors in each dimension
* `data_size`: the global number of processors along each axis
* `axes`: an array of size `G` that indicates the axes over which to
* partition
*/
block_partitioning(index_type<D> data_size, index_type<G> grid,
index_type<G> axes)
: rectangular_partitioning<D, G>(data_size, grid), axes_(axes) {
static_assert(G <= D,
"Dimensionality of the data should be larger or equal to "
"that of the processor grid.");
block_size_ = data_size;
for (int i = 0; i < G; ++i) {
int d = axes_[i];
block_size_[d] = ((data_size[d] - 1) / grid[i]) + 1;
}
}
/** Compute the local indices of a element using its global indices */
index_type<D> local(index_type<D> index) override final {
auto t = this->owner(index);
for (int d = 0; d < D; ++d) {
index[d] = index[d] - this->origin(t)[d];
}
return index;
}
/** The total number of elements along each axis on the processor index with
* `idxs...` */
index_type<D> local_size(index_type<G> idxs) override final {
index_type<D> size = this->global_size_;
for (int i = 0; i < G; ++i) {
auto dim = axes_[i];
size[dim] =
(this->global_size_[dim] + this->grid_size_[i] - idxs[i] - 1) /
this->grid_size_[i];
}
return size;
}
/** Block in first 'G' dimensions. */
index_type<G> multi_owner(index_type<D> xs) override final {
index_type<G> result = {};
for (int i = 0; i < G; ++i) {
auto d = this->axes_[i];
auto n = this->global_size_[d];
auto k = this->block_size_[d];
auto P = this->grid_size_[i];
// For irregular block partitionings, only the first 'l' processors will
// have block_size_, the other n - l processors have block_size - 1.
auto l = P - (k * P - n);
if (xs[d] <= k * l) {
result[i] = xs[d] / block_size_[d];
} else {
result[i] = l + (xs[d] - k * l) / (block_size_[d] - 1);
}
}
return result;
}
/** Obtain the block size in each dimension. */
index_type<D> block_size() const { return block_size_; }
/** Obtain the origin of the block of processor `multi_index'. */
index_type<D> origin(index_type<G> multi_index) const override {
index_type<D> result = {};
for (int i = 0; i < G; ++i) {
auto d = axes_[i];
auto n = this->global_size_[d];
auto k = this->block_size_[d];
auto P = this->grid_size_[i];
auto l = P - (k * P - n);
auto t = multi_index[i];
if (t <= l) {
result[d] = k * multi_index[i];
} else {
result[d] = k * l + (t - l) * (k - 1);
}
}
return result;
}
private:
index_type<D> block_size_;
index_type<G> axes_;
static index_type<G> iota_() {
index_type<G> result = {};
for (int i = 0; i < G; ++i) {
result[i] = i;
}
return result;
}
};
} // namespace bulk
| 29.864
| 78
| 0.587999
|
roelhem
|
4810dc57efded153cc58025a7b7ead6e5999d4e8
| 3,826
|
cpp
|
C++
|
SDKs/CryCode/3.6.15/CryEngine/CryAction/VehicleSystem/VehicleDamageBehaviorAISignal.cpp
|
amrhead/FireNET
|
34d439aa0157b0c895b20b2b664fddf4f9b84af1
|
[
"BSD-2-Clause"
] | 4
|
2017-12-18T20:10:16.000Z
|
2021-02-07T21:21:24.000Z
|
SDKs/CryCode/3.8.1/CryEngine/CryAction/VehicleSystem/VehicleDamageBehaviorAISignal.cpp
|
amrhead/FireNET
|
34d439aa0157b0c895b20b2b664fddf4f9b84af1
|
[
"BSD-2-Clause"
] | null | null | null |
SDKs/CryCode/3.8.1/CryEngine/CryAction/VehicleSystem/VehicleDamageBehaviorAISignal.cpp
|
amrhead/FireNET
|
34d439aa0157b0c895b20b2b664fddf4f9b84af1
|
[
"BSD-2-Clause"
] | 3
|
2019-03-11T21:36:15.000Z
|
2021-02-07T21:21:26.000Z
|
/*************************************************************************
Crytek Source File.
Copyright (C), Crytek Studios, 2001-2006.
-------------------------------------------------------------------------
$Id$
$DateTime$
Description: Implements a damage behavior which send an AI signal
-------------------------------------------------------------------------
History:
- 23:11:2006: Created by Mathieu Pinard
*************************************************************************/
#include "StdAfx.h"
#include "IAgent.h"
#include "IVehicleSystem.h"
#include "VehicleDamageBehaviorAISignal.h"
//------------------------------------------------------------------------
bool CVehicleDamageBehaviorAISignal::Init(IVehicle* pVehicle, const CVehicleParams& table)
{
m_pVehicle = pVehicle;
CVehicleParams signalTable = table.findChild("AISignal");
if (!signalTable)
return false;
if (!signalTable.getAttr("signalId", m_signalId))
return false;
m_signalText = signalTable.getAttr("signalText");
m_freeSignalText = signalTable.getAttr("freeSignalText");
m_freeSignalRadius = 15.0f;
signalTable.getAttr("freeSignalRadius", m_freeSignalRadius);
m_freeSignalRepeat = false;
signalTable.getAttr("freeSignalRepeat",m_freeSignalRepeat);
return true;
}
void CVehicleDamageBehaviorAISignal::Reset()
{
if (m_isActive)
ActivateUpdate(false);
}
//------------------------------------------------------------------------
void CVehicleDamageBehaviorAISignal::ActivateUpdate(bool activate)
{
if (activate && !m_isActive)
{
m_timeCounter = 1.0f;
m_pVehicle->SetObjectUpdate(this, IVehicle::eVOU_AlwaysUpdate);
}
else if (!activate && m_isActive)
m_pVehicle->SetObjectUpdate(this, IVehicle::eVOU_NoUpdate);
m_isActive = activate;
}
//------------------------------------------------------------------------
void CVehicleDamageBehaviorAISignal::OnDamageEvent(EVehicleDamageBehaviorEvent event,
const SVehicleDamageBehaviorEventParams& behaviorParams)
{
if(event == eVDBE_VehicleDestroyed || event == eVDBE_MaxRatioExceeded)
{
ActivateUpdate(false);
return;
}
if(event != eVDBE_Hit)
return;
IEntity* pEntity = m_pVehicle->GetEntity();
CRY_ASSERT(pEntity);
IAISystem* pAISystem = gEnv->pAISystem;
if(!pAISystem)
return;
if (!m_freeSignalText.empty() && pEntity)
{
Vec3 entityPosition = pEntity->GetPos();
IAISignalExtraData* pData = gEnv->pAISystem->CreateSignalExtraData();
pData->point = entityPosition;
pAISystem->SendAnonymousSignal(m_signalId, m_freeSignalText.c_str(), entityPosition, m_freeSignalRadius, NULL, pData);
if(m_freeSignalRepeat)
ActivateUpdate(true);
}
if (!pEntity || !pEntity->HasAI())
return;
IAISignalExtraData* pExtraData = pAISystem->CreateSignalExtraData();
CRY_ASSERT(pExtraData);
if (pExtraData)
pExtraData->iValue = behaviorParams.shooterId;
pAISystem->SendSignal(SIGNALFILTER_SENDER, m_signalId, m_signalText.c_str(), pEntity->GetAI(), pExtraData);
}
void CVehicleDamageBehaviorAISignal::Update( const float deltaTime )
{
if(m_pVehicle->IsDestroyed())
{
ActivateUpdate(false);
return;
}
m_timeCounter -= deltaTime;
if(m_timeCounter < 0.0f)
{
IEntity* pEntity = m_pVehicle->GetEntity();
CRY_ASSERT(pEntity);
IAISystem* pAISystem = gEnv->pAISystem;
CRY_ASSERT(pAISystem);
Vec3 entityPosition = pEntity->GetPos();
IAISignalExtraData* pData = gEnv->pAISystem->CreateSignalExtraData();
pData->point = entityPosition;
pAISystem->SendAnonymousSignal(m_signalId, m_freeSignalText.c_str(), entityPosition, m_freeSignalRadius, NULL, pData);
m_timeCounter = 1.0f;
}
}
void CVehicleDamageBehaviorAISignal::GetMemoryUsage(ICrySizer * s) const
{
s->AddObject(this,sizeof(*this));
s->AddObject(m_signalText);
}
DEFINE_VEHICLEOBJECT(CVehicleDamageBehaviorAISignal);
| 26.943662
| 120
| 0.653424
|
amrhead
|
48125ad0a671cb50bf7bb151cdbd99db6bfeb1a6
| 3,835
|
cpp
|
C++
|
Advanced Algorithms and Complexity/Coping with NP-complete problems/maximise_weight.cpp
|
OssamaEls/Data-Structures-and-Algorithms
|
b6affc28a792f577010e666d565ec6cc7f0ecbfa
|
[
"MIT"
] | null | null | null |
Advanced Algorithms and Complexity/Coping with NP-complete problems/maximise_weight.cpp
|
OssamaEls/Data-Structures-and-Algorithms
|
b6affc28a792f577010e666d565ec6cc7f0ecbfa
|
[
"MIT"
] | null | null | null |
Advanced Algorithms and Complexity/Coping with NP-complete problems/maximise_weight.cpp
|
OssamaEls/Data-Structures-and-Algorithms
|
b6affc28a792f577010e666d565ec6cc7f0ecbfa
|
[
"MIT"
] | null | null | null |
//Input Format.The first line contains an integer 𝑛 — the number of people in the company.The next line
//contains 𝑛 numbers 𝑓𝑖 — the fun factors of each of the 𝑛 people in the company.Each of the next 𝑛−1
//lines describes the subordination structure.Everyone but for the CEO of the company has exactly one
//direct boss.There are no cycles : nobody can be a boss of a boss of a ... of a boss of himself.So, the
//subordination structure is a regular tree.Each of the 𝑛 − 1 lines contains two integers 𝑢 and 𝑣, and
//you know that either 𝑢 is the boss of 𝑣 or vice versa(you don’t really need to know which one is the
//boss, but you can invite only one of them or none of them).
//
//Constraints. 1 ≤ 𝑛 ≤ 100 000; 1 ≤ 𝑓𝑖 ≤ 1 000; 1 ≤ 𝑢, 𝑣 ≤ 𝑛; 𝑢 ̸ = 𝑣.
//
//Output Format.Output the maximum possible total fun factor of the party(the sum of fun factors of all
// the invited people)
#include <iostream>
#include <vector>
#include <sys/resource.h>
struct Vertex {
int weight;
std::vector <int> children;
};
typedef std::vector<Vertex> Graph;
typedef std::vector<int> Sum;
using std::vector;
Graph ReadTree() {
int vertices_count;
std::cin >> vertices_count;
Graph tree(vertices_count);
for (int i = 0; i < vertices_count; ++i)
std::cin >> tree[i].weight;
for (int i = 1; i < vertices_count; ++i) {
int from, to, weight;
std::cin >> from >> to;
tree[from - 1].children.push_back(to - 1);
tree[to - 1].children.push_back(from - 1);
}
return tree;
}
void dfs(const Graph& graph, int vertex, int parent, vector<vector<int>>& actual_tree) {
for (int child : graph[vertex].children)
if (child != parent)
{
actual_tree[vertex].push_back(child);
dfs(graph, child, vertex, actual_tree);
}
}
int maximise_total_weight(const Graph& graph, const vector<vector<int>>& tree, vector<int>& max_weights, int vertex)
{
if (max_weights[vertex] == 0)
{
if (tree[vertex].empty())
{
max_weights[vertex] = graph[vertex].weight;
}
else
{
int m1 = graph[vertex].weight;
for (int child : tree[vertex])
{
for (int great_child : tree[child])
{
m1 = m1 + maximise_total_weight(graph, tree, max_weights, great_child);
}
}
int m0 = 0;
for (int child : tree[vertex])
{
m0 = m0 + maximise_total_weight(graph, tree, max_weights, child);
}
max_weights[vertex] = m0 < m1 ? m1 : m0;
}
}
return max_weights[vertex];
}
int MaxWeightIndependentTreeSubset(const Graph& graph) {
size_t size = graph.size();
if (size == 0)
return 0;
vector<vector<int>> tree(size);
dfs(graph, 0, -1, tree);
vector<int> max_weights(size, 0);
return maximise_total_weight(graph, tree, max_weights, 0);
}
int main_with_large_stack_space() {
Graph tree = ReadTree();
int weight = MaxWeightIndependentTreeSubset(tree);
std::cout << weight << std::endl;
return 0;
}
int main(int argc, char** argv) {
// This code is here to increase the stack size to avoid stack overflow
// in depth-first search.
const rlim_t kStackSize = 64L * 1024L * 1024L; // min stack size = 64 Mb
struct rlimit rl;
int result;
result = getrlimit(RLIMIT_STACK, &rl);
if (result == 0)
{
if (rl.rlim_cur < kStackSize)
{
rl.rlim_cur = kStackSize;
result = setrlimit(RLIMIT_STACK, &rl);
if (result != 0)
{
fprintf(stderr, "setrlimit returned result = %d\n", result);
}
}
}
return main_with_large_stack_space();
}
| 29.5
| 116
| 0.59661
|
OssamaEls
|
4815fcc9841fd2f3e523841e8749cd62ecf0fd64
| 4,359
|
cpp
|
C++
|
tests/src/nearest_neighbors/visible_proximity_tests.cpp
|
falcowinkler/flockingbird
|
eed3e7cead4a37635625d1055fb0a830e6152d1b
|
[
"MIT"
] | 2
|
2021-05-30T19:19:50.000Z
|
2021-08-29T05:58:21.000Z
|
tests/src/nearest_neighbors/visible_proximity_tests.cpp
|
falcowinkler/flockingbird
|
eed3e7cead4a37635625d1055fb0a830e6152d1b
|
[
"MIT"
] | null | null | null |
tests/src/nearest_neighbors/visible_proximity_tests.cpp
|
falcowinkler/flockingbird
|
eed3e7cead4a37635625d1055fb0a830e6152d1b
|
[
"MIT"
] | 1
|
2021-12-01T07:00:49.000Z
|
2021-12-01T07:00:49.000Z
|
#include "nearest_neighbors/nanoflann.hpp"
#include "nearest_neighbors/visible_proximity.hpp"
#include "utility/random_numbers.hpp"
#include "gtest/gtest.h"
#include <cmath>
#include <cstdlib>
#include <vector>
using namespace nanoflann;
using namespace flockingbird;
class VisibleProximityTest : public ::testing::Test {
public:
protected:
VisibleProximityTest()
: flock(Flock(0, 10, 10)) {
Vector2D dummyDirection = Vector2D(1.0, 1.0);
Boid boid1 = Boid(Vector2D(1.01, 2.12), dummyDirection);
Boid boid2 = Boid(Vector2D(1.5, 2.5), dummyDirection);
Boid boid3 = Boid(Vector2D(5, 4), dummyDirection);
Boid boid4 = Boid(Vector2D(5.01, 3.99), dummyDirection);
flock.boids.push_back(boid1);
flock.boids.push_back(boid2);
flock.boids.push_back(boid3);
flock.boids.push_back(boid4);
};
Flock flock;
virtual void TearDown(){};
};
TEST_F(VisibleProximityTest, FindNearestNeighborsInCloseProximity) {
VisibleProximity visibleProximity(flock);
const float visionRange = 1;
std::vector<Boid> visibleBoids = visibleProximity.of(/*boid at index*/ 0, visionRange);
EXPECT_EQ(visibleBoids.size(), 1);
Boid firstBoid = visibleBoids.front();
EXPECT_EQ(firstBoid.position.x, 1.5);
EXPECT_EQ(firstBoid.position.y, 2.5);
}
TEST_F(VisibleProximityTest, FindsPointsOnEdgeOfSearchRadius) {
VisibleProximity visibleProximity(flock);
const float visionRange = 0.3845 + 1E-5; // ((1.5 - 1.01) ^ 2 + (2.5-2.12) ^ 2 == 0.3845)
std::vector<Boid> visibleBoids = visibleProximity.of(/*boid at index*/ 0, visionRange);
EXPECT_EQ(visibleBoids.size(), 1);
Boid firstBoid = visibleBoids.front();
EXPECT_EQ(firstBoid.position.x, 1.5);
EXPECT_EQ(firstBoid.position.y, 2.5);
}
TEST_F(VisibleProximityTest, ExcludesPointsOnEdgeOfSearchRadius) {
VisibleProximity visibleProximity(flock);
const float visionRange = 0.3844; // ((1.5 - 1.01) ^ 2 + (2.5-2.12) ^ 2 == 0.3845)
std::vector<Boid> visibleBoids = visibleProximity.of(/*boid at index*/ 0, visionRange);
EXPECT_EQ(visibleBoids.size(), 0);
}
TEST_F(VisibleProximityTest, MultipleCallsDontVaryTheResult) {
VisibleProximity visibleProximity(flock);
const float visionRange = 0.3844; // ((1.5 - 1.01) ^ 2 + (2.5-2.12) ^ 2 == 0.3845)
visibleProximity.of(/*boid at index*/ 0, visionRange);
visibleProximity.of(/*boid at index*/ 2, visionRange);
visibleProximity.of(/*boid at index*/ 1, visionRange);
std::vector<Boid> visibleBoids = visibleProximity.of(0, visionRange);
EXPECT_EQ(visibleBoids.size(), 0);
}
TEST_F(VisibleProximityTest, FindTheWholeFlockWithASufficientVisionRange) {
VisibleProximity visibleProximity(flock);
const float visionRange = 50;
std::vector<Boid> visibleBoids = visibleProximity.of(/*boid at index*/ 2, visionRange);
EXPECT_EQ(visibleBoids.size(), flock.boids.size() - 1);
}
TEST_F(VisibleProximityTest, FindsNeigborWithVeryNarrowVision) {
VisibleProximity visibleProximity(flock);
const float visionRange = 0.2;
std::vector<Boid> visibleBoids = visibleProximity.of(/*boid at index*/ 2, visionRange);
EXPECT_EQ(visibleBoids.size(), 1);
}
/*
* Random tests
*
*/
inline float L2_Reference(Vector2D a, Vector2D b) { return pow(a.x - b.x, 2) + pow(a.y - b.y, 2); }
TEST_F(VisibleProximityTest, RandomTests) {
int N = 30; // if test runs in under 1 sec, we can reach this fps
for (int testRun = 0; testRun < N; testRun++) {
int numBoids = 500;
std::vector<Boid> boids;
for (int boid = 0; boid < numBoids; boid++) {
boids.push_back(
Boid(Vector2D(randomInBounds(0, 10), randomInBounds(0, 10)), Vector2D(0, 0)));
}
float visionRange = randomInBounds(0, 10);
Flock flock = Flock();
flock.boids = boids;
Flock refFlock(flock);
VisibleProximity visibleProximity(flock);
for (int i = 0; i < numBoids; i++) {
std::vector<Boid> visibleBoids = visibleProximity.of(/*boid at index*/ i, visionRange);
for (auto boidIt = visibleBoids.begin(); boidIt != visibleBoids.end(); boidIt++) {
EXPECT_LE(L2_Reference(boidIt->position, refFlock.boids[i].position), visionRange);
}
}
}
}
| 36.325
| 99
| 0.666208
|
falcowinkler
|
4818223e907164f123db5669c2d9396977ef78db
| 3,431
|
cpp
|
C++
|
src/Library/Shaders/TransparencyShaderOp.cpp
|
aravindkrishnaswamy/rise
|
297d0339a7f7acd1418e322a30a21f44c7dbbb1d
|
[
"BSD-2-Clause"
] | 1
|
2018-12-20T19:31:02.000Z
|
2018-12-20T19:31:02.000Z
|
src/Library/Shaders/TransparencyShaderOp.cpp
|
aravindkrishnaswamy/rise
|
297d0339a7f7acd1418e322a30a21f44c7dbbb1d
|
[
"BSD-2-Clause"
] | null | null | null |
src/Library/Shaders/TransparencyShaderOp.cpp
|
aravindkrishnaswamy/rise
|
297d0339a7f7acd1418e322a30a21f44c7dbbb1d
|
[
"BSD-2-Clause"
] | null | null | null |
//////////////////////////////////////////////////////////////////////
//
// TransparencyShaderOp.cpp - Implementation of the TransparencyShaderOp class
//
// Author: Aravind Krishnaswamy
// Date of Birth: March 8, 2005
// Tabs: 4
// Comments:
//
// License Information: Please see the attached LICENSE.TXT file
//
//////////////////////////////////////////////////////////////////////
#include "pch.h"
#include "TransparencyShaderOp.h"
#include "../Utilities/GeometricUtilities.h"
using namespace RISE;
using namespace RISE::Implementation;
TransparencyShaderOp::TransparencyShaderOp(
const IPainter& transparency_,
const bool bOneSided_
) :
transparency( transparency_ ),
bOneSided( bOneSided_ )
{
transparency.addref();
}
TransparencyShaderOp::~TransparencyShaderOp( )
{
transparency.release();
}
//! Tells the shader to apply shade to the given intersection point
void TransparencyShaderOp::PerformOperation(
const RuntimeContext& rc, ///< [in] Runtime context
const RayIntersection& ri, ///< [in] Intersection information
const IRayCaster& caster, ///< [in] The Ray Caster to use for all ray casting needs
const IRayCaster::RAY_STATE& rs, ///< [in] Current ray state
RISEPel& c, ///< [in/out] Resultant color from op
const IORStack* const ior_stack, ///< [in/out] Index of refraction stack
const ScatteredRayContainer* pScat ///< [in] Scattering information
) const
{
// What we do is continue the ray through this intersection and composite with the value behind
Ray ray = ri.geometric.ray;
ray.Advance( ri.geometric.range+2e-8 );
RISEPel cthis;
if( caster.CastRay( rc, ri.geometric.rast, ray, cthis, rs, 0, ri.pRadianceMap, ior_stack ) ) {
// Blend by painter color
// But if we one sided only and the ray is coming from behind, then don't
if( bOneSided ) {
if( Vector3Ops::Dot( ri.geometric.ray.dir, ri.geometric.vNormal ) > 0 ) {
c = cthis;
}
}
// Blend
const RISEPel factor = transparency.GetColor(ri.geometric);
c = cthis*factor + c*(1.0-factor);
}
}
//! Tells the shader to apply shade to the given intersection point for the given wavelength
/// \return Amplitude of spectral function
Scalar TransparencyShaderOp::PerformOperationNM(
const RuntimeContext& rc, ///< [in] Runtime context
const RayIntersection& ri, ///< [in] Intersection information
const IRayCaster& caster, ///< [in] The Ray Caster to use for all ray casting needs
const IRayCaster::RAY_STATE& rs, ///< [in] Current ray state
const Scalar caccum, ///< [in] Current value for wavelength
const Scalar nm, ///< [in] Wavelength to shade
const IORStack* const ior_stack, ///< [in/out] Index of refraction stack
const ScatteredRayContainer* pScat ///< [in] Scattering information
) const
{
Scalar c=0;
// What we do is continue the ray through this intersection and composite with the value behind
Ray ray = ri.geometric.ray;
ray.Advance( ri.geometric.range+2e-8 );
if( caster.CastRayNM( rc, ri.geometric.rast, ray, c, rs, nm, 0, ri.pRadianceMap, ior_stack ) ) {
// Blend by painter color
// But if we one sided only and the ray is coming from behind, then don't
if( bOneSided ) {
if( Vector3Ops::Dot( ri.geometric.ray.dir, ri.geometric.vNormal ) > 0 ) {
return c;
}
}
// Blend
const Scalar trans = transparency.GetColorNM(ri.geometric,nm);
c = caccum*(1.0-trans) + c*trans;
}
return c;
}
| 33.637255
| 97
| 0.67269
|
aravindkrishnaswamy
|
481a1e888edeec4886eee0735473addf22e87086
| 11,722
|
cpp
|
C++
|
src/robot/devices/externalFileClass.cpp
|
1069B/Tower_Takeover
|
331a323216cd006a8cc3bc7a326ebe3a463e429f
|
[
"MIT"
] | null | null | null |
src/robot/devices/externalFileClass.cpp
|
1069B/Tower_Takeover
|
331a323216cd006a8cc3bc7a326ebe3a463e429f
|
[
"MIT"
] | 3
|
2019-07-26T15:56:19.000Z
|
2019-07-29T02:55:32.000Z
|
src/robot/devices/externalFileClass.cpp
|
1069B/Tower_Takeover
|
331a323216cd006a8cc3bc7a326ebe3a463e429f
|
[
"MIT"
] | null | null | null |
#include "externalFileClass.hpp"
bool ExternalFile::SDCardIsInserted(){
std::fstream m_file;
m_file.open("/usd/.PROS_SD_Detection/SD_Card.txt", std::ios::app);
m_file.close();
m_file.open("/usd/.PROS_SD_Detection/SD_Card.txt", std::ios::in);
if(m_file.is_open()){
m_file.close();
return true;
}
return false;
}
ExternalFile::ExternalFile(const std::string p_address, const bool p_erase){
m_fileAddress = "/usd/" + p_address;
m_file.open(m_fileAddress, std::ios::in);
if(!p_erase && m_file.is_open()){
m_file.close();
}
else{
m_file.open(m_fileAddress, std::ios::out);
m_file.close();
}
}
bool ExternalFile::fileExist(){
if(!SDCardIsInserted()){
return false;
}
m_file.open(m_fileAddress, std::ios::in);
if(m_file.is_open()){
m_file.close();
return true;
}
return false;
}
bool ExternalFile::varExist(const std::string p_varibleTitle){
m_file.open(m_fileAddress, std::ios::in);
std::string tempString;
while(std::getline(m_file, tempString)){
if(!tempString.find(p_varibleTitle)){
m_file.close();
return true;
}
}
m_file.close();
return false;
}
int ExternalFile::addLine(const std::string p_lineValue){
m_file.open(m_fileAddress, std::ios::app);
m_file << p_lineValue << std::endl;
m_file.close();
return 0;
}
int ExternalFile::updateLine(const std::string p_varibleTitle, const std::string p_lineValue){
std::vector<std::string> stringVector;
std::string tempString;
m_file.open(m_fileAddress, std::ios::in);
while(std::getline(m_file, tempString)){
if(!tempString.find(p_varibleTitle)){
tempString = p_lineValue;
stringVector.push_back(tempString);
}
else{
stringVector.push_back(tempString);
}
}
m_file.close();
m_file.open(m_fileAddress, std::ios::out);
for(int x = 0; x < stringVector.size(); x++){
m_file << stringVector.at(x) << std::endl;
}
m_file.close();
return 0;
}
std::string ExternalFile::readLine(const std::string p_varibleTitle){
m_file.open(m_fileAddress, std::ios::in);
std::string tempString;
while(std::getline(m_file, tempString)){
if(!tempString.find(p_varibleTitle)){
m_file.close();
return tempString;
}
}
m_file.close();
return "Error";
}
int ExternalFile::storeVar(const std::string p_varibleTitle, const std::string p_lineValue){
if(varExist(p_varibleTitle)){
updateLine(p_varibleTitle, p_lineValue);
}
else{
addLine(p_lineValue);
}
return 0;
}
int ExternalFile::storeInt(const std::string p_varibleName, const int p_varibleValue){
std::string varibleTitle = p_varibleName + ":Int= ";
std::string lineValue = varibleTitle + std::to_string(p_varibleValue);
return storeVar(varibleTitle, lineValue);
}
int ExternalFile::readInt(const std::string varibleName){
std::string varibleTitle = varibleName + ":Int= ";
std::string lineValue = readLine(varibleTitle);
if(lineValue == "Error")
return -1;
return std::stoi(lineValue.substr(varibleTitle.size()));
}
int ExternalFile::storeDouble(const std::string p_varibleName, const double p_varibleValue){
std::string varibleTitle = p_varibleName + ":Double= ";
std::string lineValue = varibleTitle + std::to_string(p_varibleValue);
return storeVar(varibleTitle, lineValue);
}
double ExternalFile::readDouble(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":Double= ";
std::string lineValue = readLine(varibleTitle);
if(lineValue == "Error")
return -1.1;
return std::stod(lineValue.substr(varibleTitle.size()));
}
int ExternalFile::storeChar(const std::string p_varibleName, const char p_varibleValue){
std::string varibleTitle = p_varibleName + ":Char= ";
std::string lineValue = varibleTitle + p_varibleValue;
return storeVar(varibleTitle, lineValue);
}
char ExternalFile::readChar(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":Char= ";
std::string lineValue = readLine(varibleTitle);
if(lineValue == "Error")
return 'E';
return lineValue.at(varibleTitle.size());
}
int ExternalFile::storeBool(const std::string p_varibleName, const bool p_varibleValue){
std::string varibleTitle = p_varibleName + ":Bool= ";
std::string lineValue = varibleTitle + std::to_string(p_varibleValue);
return storeVar(varibleTitle, lineValue);
}
bool ExternalFile::readBool(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":Bool= ";
std::string lineValue = readLine(varibleTitle);
if(lineValue == "Error")
return false;
return std::stoi(lineValue.substr(varibleTitle.size()));
}
int ExternalFile::storeString(const std::string p_varibleName, const std::string p_varibleValue){
std::string varibleTitle = p_varibleName + ":String= ";
std::string lineValue = varibleTitle + p_varibleValue;
return storeVar(varibleTitle, lineValue);
}
std::string ExternalFile::readString(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":String= ";
std::string lineValue = readLine(varibleTitle);
if(lineValue == "Error")
return "Error";
return lineValue.substr(varibleTitle.size());
}
// Array of Varibles
int ExternalFile::storeIntArray(const std::string p_varibleName,const std::vector<int> p_varibleValue){
std::string varibleTitle = p_varibleName + ":IntArray= ";
std::string lineValue = varibleTitle;
for(int x = 0; x<p_varibleValue.size()-1; x++){
lineValue += std::to_string(p_varibleValue.at(x))+ ", ";
}
lineValue += std::to_string(p_varibleValue.at(p_varibleValue.size()-1))+"~";
return storeVar(varibleTitle, lineValue);
}
std::vector<int> ExternalFile::readIntArray(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":IntArray= ";
std::string lineValue = readLine(varibleTitle);
std::vector<int> tempVec;
if(lineValue == "Error"){
tempVec.push_back(-1);
return tempVec;
}
int position = (int)varibleTitle.size();
bool x = true;
while(x){
std::string tempString = lineValue.substr(position);
if(tempString.find(",") == -1){
tempVec.push_back(std::stoi(tempString.substr(0, tempString.find("~"))));
x = false;
}
else{
tempVec.push_back(std::stoi(tempString.substr(0,tempString.find(","))));
position+=tempString.find(",")+2;
}
}
return tempVec;
}
int ExternalFile::storeDoubleArray(const std::string p_varibleName, const std::vector<double> p_varibleValue){
std::string varibleTitle = p_varibleName + ":DoubleArray= ";
std::string lineValue = varibleTitle;
for(int x = 0; x<p_varibleValue.size()-1; x++){
lineValue += std::to_string(p_varibleValue.at(x))+ ", ";
}
lineValue += std::to_string(p_varibleValue.at(p_varibleValue.size()-1))+"~";
return storeVar(varibleTitle, lineValue);
}
std::vector<double> ExternalFile::readDoubleArray(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":DoubleArray= ";
std::string lineValue = readLine(varibleTitle);
std::vector<double> tempVec;
if(lineValue == "Error"){
tempVec.push_back(-1.1);
return tempVec;
}
int position = (int)varibleTitle.size();
bool x = true;
while(x){
std::string tempString = lineValue.substr(position);
if(tempString.find(",") == -1){
tempVec.push_back(std::stod(tempString.substr(0, tempString.find("~"))));
x = false;
}
else{
tempVec.push_back(std::stod(tempString.substr(0,tempString.find(","))));
position+=tempString.find(",")+2;
}
}
return tempVec;
}
int ExternalFile::storeCharArray(const std::string p_varibleName, const std::vector<char> p_varibleValue){
std::string varibleTitle = p_varibleName + ":CharArray= ";
std::string lineValue = varibleTitle;
for(int x = 0; x<p_varibleValue.size()-1; x++){
lineValue += std::string(1, p_varibleValue.at(x))+ ", ";
}
lineValue += std::string(1, p_varibleValue.at(p_varibleValue.size()-1))+"~";
return storeVar(varibleTitle, lineValue);
}
std::vector<char> ExternalFile::readCharArray(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":CharArray= ";
std::string lineValue = readLine(varibleTitle);
std::vector<char> tempVec;
if(lineValue == "Error"){
tempVec.push_back('E');
tempVec.push_back('R');
return tempVec;
}
int position = (int)varibleTitle.size();
bool x = true;
while(x){
std::string tempString = lineValue.substr(position);
if(tempString.find(",") == -1){
tempVec.push_back(tempString.at(tempString.find("~")-1));
x = false;
}
else{
tempVec.push_back(tempString.at(tempString.find(",")-1));
position+=tempString.find(",")+2;
}
}
return tempVec;
}
int ExternalFile::storeBoolArray(const std::string p_varibleName, const std::vector<bool> p_varibleValue){
std::string varibleTitle = p_varibleName + ":BoolArray= ";
std::string lineValue = varibleTitle;
for(int x = 0; x<p_varibleValue.size()-1; x++){
lineValue += std::to_string(p_varibleValue.at(x))+ ", ";
}
lineValue += std::to_string(p_varibleValue.at(p_varibleValue.size()-1))+"~";
return storeVar(varibleTitle, lineValue);
}
std::vector<bool> ExternalFile::readBoolArray(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":BoolArray= ";
std::string lineValue = readLine(varibleTitle);
std::vector<bool> tempVec;
if(lineValue == "Error"){
tempVec.push_back(false);
return tempVec;
}
int position = (int)varibleTitle.size();
bool x = true;
while(x){
std::string tempString = lineValue.substr(position);
if(tempString.find(",") == -1){
tempVec.push_back(std::stoi(tempString.substr(0, tempString.find("~"))));
x = false;
}
else{
tempVec.push_back(std::stoi(tempString.substr(0,tempString.find(","))));
position+=tempString.find(",")+2;
}
}
return tempVec;
}
int ExternalFile::storeStringArray(const std::string p_varibleName, const std::vector<std::string> p_varibleValue){
std::string varibleTitle = p_varibleName + ":StringArray= ";
std::string lineValue = varibleTitle;
for(int x = 0; x<p_varibleValue.size()-1; x++){
lineValue += p_varibleValue.at(x)+ ", ";
}
lineValue += p_varibleValue.at(p_varibleValue.size()-1)+"~";
return storeVar(varibleTitle, lineValue);
}
std::vector<std::string> ExternalFile::readStringArray(const std::string p_varibleName){
std::string varibleTitle = p_varibleName + ":StringArray= ";
std::string lineValue = readLine(varibleTitle);
std::vector<std::string> tempVec;
if(lineValue == "Error"){
tempVec.push_back("Error");
return tempVec;
}
int position = (int)varibleTitle.size();
bool x = true;
while(x){
std::string tempString = lineValue.substr(position);
if(tempString.find(",") == -1){
tempVec.push_back(tempString.substr(0, tempString.find("~")));
x = false;
}
else{
tempVec.push_back(tempString.substr(0,tempString.find(",")));
position+=tempString.find(",")+2;
}
}
return tempVec;
}
| 35.095808
| 115
| 0.649548
|
1069B
|
481d74ac07a63be9e04420ce81ed6a85c7a87c44
| 551
|
cpp
|
C++
|
55. Jump Game| LIS variant.cpp
|
i-am-grut/Leetcode-top-interview-q
|
5f763f9a15558a1bfef62d860a4fe89326eee450
|
[
"MIT"
] | 2
|
2021-06-25T07:26:30.000Z
|
2021-07-14T05:46:57.000Z
|
55. Jump Game| LIS variant.cpp
|
i-am-grut/Leetcode-top-interview-q
|
5f763f9a15558a1bfef62d860a4fe89326eee450
|
[
"MIT"
] | null | null | null |
55. Jump Game| LIS variant.cpp
|
i-am-grut/Leetcode-top-interview-q
|
5f763f9a15558a1bfef62d860a4fe89326eee450
|
[
"MIT"
] | null | null | null |
class Solution {
public:
bool canJump(vector<int>& nums) {
int n=nums.size();
if(n==0 || n==1){
return true;
}
if(nums[0]==0){
return false;
}
bool dp[n];
dp[0]=true;
//LIS
for(int i=1;i<n;i++){
dp[i]=false;
for(int j=i-1;j>=0;j--){
if(dp[j]!=false && nums[j]+j>=i){
dp[i]=true;
break;
}
}
}
return dp[n-1];
}
};
| 20.407407
| 49
| 0.321234
|
i-am-grut
|
481eb51151b2c71d48f3439b321aff841c45f75f
| 6,222
|
cpp
|
C++
|
sunglasses/src/Physics/GJKAlgorithm.cpp
|
jonathanbuchanan/Sunglasses
|
ab82b66f32650a813234cee8963f9b598ef5c1c8
|
[
"MIT"
] | 1
|
2016-04-01T02:21:27.000Z
|
2016-04-01T02:21:27.000Z
|
sunglasses/src/Physics/GJKAlgorithm.cpp
|
jonathanbuchanan/Sunglasses
|
ab82b66f32650a813234cee8963f9b598ef5c1c8
|
[
"MIT"
] | 49
|
2015-07-08T13:48:06.000Z
|
2017-06-27T01:40:51.000Z
|
sunglasses/src/Physics/GJKAlgorithm.cpp
|
jonathanbuchanan/Sunglasses
|
ab82b66f32650a813234cee8963f9b598ef5c1c8
|
[
"MIT"
] | null | null | null |
// Copyright 2016 Jonathan Buchanan.
// This file is part of Sunglasses, which is licensed under the MIT License.
// See LICENSE.md for details.
#include <sunglasses/Physics/GJKAlgorithm.h>
#include <iostream>
namespace sunglasses {
glm::vec3 getFarthestPointAlongAxis(PhysicsColliderMesh *mesh, glm::vec3 axis) {
glm::vec3 farthestPoint = mesh->getPositionAtIndex(0);
float farthestDistance = glm::dot(mesh->getPositionAtIndex(0), axis);
for (int i = 0; i < mesh->getVertexCount(); i++) {
float temporaryDistance = glm::dot(mesh->getPositionAtIndex(i), axis);
if (temporaryDistance > farthestDistance) {
farthestDistance = temporaryDistance;
farthestPoint = mesh->getPositionAtIndex(i);
}
}
return farthestPoint;
}
glm::vec3 getFarthestPointAlongAxis(PhysicsColliderSphere *sphere, glm::vec3 axis) {
glm::vec3 localPoint = glm::normalize(axis) * sphere->getRadius();
glm::vec3 globalPoint = localPoint + sphere->getPosition();
return globalPoint;
}
glm::vec3 getFarthestPointAlongAxis(PhysicsColliderAABB *aabb, glm::vec3 axis) {
glm::vec3 AABBPoints[8] = {
glm::vec3(aabb->getSecondPointX(), aabb->getSecondPointY(), aabb->getSecondPointZ()),
glm::vec3(aabb->getFirstPointX(), aabb->getSecondPointY(), aabb->getSecondPointZ()),
glm::vec3(aabb->getSecondPointX(), aabb->getFirstPointY(), aabb->getSecondPointZ()),
glm::vec3(aabb->getSecondPointX(), aabb->getSecondPointY(), aabb->getFirstPointZ()),
glm::vec3(aabb->getFirstPointX(), aabb->getFirstPointY(), aabb->getSecondPointZ()),
glm::vec3(aabb->getFirstPointX(), aabb->getSecondPointY(), aabb->getFirstPointZ()),
glm::vec3(aabb->getSecondPointX(), aabb->getFirstPointY(), aabb->getFirstPointZ()),
glm::vec3(aabb->getFirstPointX(), aabb->getFirstPointY(), aabb->getFirstPointZ())
};
glm::vec3 farthestPoint = AABBPoints[0];
float farthestDistance = glm::dot(AABBPoints[0], axis);
for (int i = 0; i < 8; i++) {
float temporaryDistance = glm::dot(AABBPoints[i], axis);
if (temporaryDistance > farthestDistance) {
farthestDistance = temporaryDistance;
farthestPoint = AABBPoints[i];
}
}
return farthestPoint;
}
glm::vec3 support(PhysicsColliderMesh *first, PhysicsColliderMesh *second, glm::vec3 axis, Simplex &simplex) {
glm::vec3 firstPoint = getFarthestPointAlongAxis(first, axis);
glm::vec3 secondPoint = getFarthestPointAlongAxis(second, -axis);
glm::vec3 result = firstPoint - secondPoint;
return result;
}
glm::vec3 support(PhysicsColliderMesh *first, PhysicsColliderSphere *sphere, glm::vec3 axis, Simplex &simplex) {
glm::vec3 firstPoint = getFarthestPointAlongAxis(first, axis);
glm::vec3 secondPoint = getFarthestPointAlongAxis(sphere, -axis);
glm::vec3 result = firstPoint - secondPoint;
return result;
}
glm::vec3 support(PhysicsColliderMesh *first, PhysicsColliderAABB *aabb, glm::vec3 axis, Simplex &simplex) {
glm::vec3 firstPoint = getFarthestPointAlongAxis(first, axis);
glm::vec3 secondPoint = getFarthestPointAlongAxis(aabb, -axis);
glm::vec3 result = firstPoint - secondPoint;
return result;
}
glm::vec3 tripleCross(glm::vec3 a, glm::vec3 b, glm::vec3 c) {
return a * b * c;
}
bool processLine(Simplex &simplex, glm::vec3 &direction) {
glm::vec3 a = simplex.a;
glm::vec3 b = simplex.b;
glm::vec3 ao = -a;
glm::vec3 ab = b - a;
glm::vec3 abPerp = glm::cross(glm::cross(ab, ao), ab);
direction = abPerp;
return false;
}
bool processTriangle(Simplex &simplex, glm::vec3 &direction) {
glm::vec3 a = simplex.a;
glm::vec3 b = simplex.b;
glm::vec3 c = simplex.c;
glm::vec3 ao = -a;
glm::vec3 ab = b - a;
glm::vec3 ac = c - a;
glm::vec3 abc = glm::cross(ab, ac);
glm::vec3 abPerp = glm::cross(ab, abc);
glm::vec3 acPerp = glm::cross(abc, ac);
bool firstFailed = false;
bool secondFailed = false;
if (glm::dot(abPerp, ao) > 0) {
simplex.set(a, b);
direction = tripleCross(ab, ao, ab);
} else {
firstFailed = true;
}
if (glm::dot(acPerp, ao) > 0) {
simplex.set(a, c);
direction = tripleCross(ac, ao, ac);
} else {
secondFailed = true;
}
if (firstFailed == true && secondFailed == true) {
if (glm::dot(abc, ao) > 0) {
direction = abc;
} else {
simplex.set(a, c, b);
direction = -abc;
}
}
return false;
}
bool processTetrahedron(Simplex &simplex, glm::vec3 &direction) {
glm::vec3 a = simplex.a;
glm::vec3 b = simplex.b;
glm::vec3 c = simplex.c;
glm::vec3 d = simplex.d;
glm::vec3 ao = -a;
glm::vec3 ab = b - a;
glm::vec3 ac = c - a;
glm::vec3 ad = d - a;
glm::vec3 abc = glm::cross(ab, ac);
glm::vec3 acd = glm::cross(ac, ad);
glm::vec3 adb = glm::cross(ad, ab);
bool collision = true;
if (glm::dot(abc, ao) > 0) {
collision = false;
}
if (glm::dot(acd, ao) > 0) {
simplex.set(a, c, d);
collision = false;
}
if (glm::dot(adb, ao) > 0) {
simplex.set(a, d, b);
collision = false;
}
if (collision)
return true;
a = simplex.a;
b = simplex.b;
c = simplex.c;
d = simplex.d;
ao = -a;
ab = b - a;
ac = c - a;
ad = d - a;
abc = glm::cross(ab, ac);
bool done = false;
if (glm::dot(ab, abc) > 0) {
simplex.set(a, b);
direction = tripleCross(ab, ao, ab);
done = true;
}
if (glm::dot(abc, ac) > 0) {
simplex.set(a, c);
direction = tripleCross(ac, ao, ac);
done = true;
}
if (!done) {
simplex.set(a, b, c);
direction = abc;
}
return false;
}
bool processSimplex(Simplex &simplex, glm::vec3 &direction) {
if (simplex.size == 2)
return processLine(simplex, direction);
else if (simplex.size == 3)
return processTriangle(simplex, direction);
else if (simplex.size == 4)
return processTetrahedron(simplex, direction);
return false;
}
} // namespace
| 29.628571
| 112
| 0.612022
|
jonathanbuchanan
|
481ed80201f82ef25036bd11ae8d6b31cc62cb4b
| 3,072
|
cpp
|
C++
|
artifact/storm/src/storm/utility/builder.cpp
|
glatteis/tacas21-artifact
|
30b4f522bd3bdb4bebccbfae93f19851084a3db5
|
[
"MIT"
] | null | null | null |
artifact/storm/src/storm/utility/builder.cpp
|
glatteis/tacas21-artifact
|
30b4f522bd3bdb4bebccbfae93f19851084a3db5
|
[
"MIT"
] | null | null | null |
artifact/storm/src/storm/utility/builder.cpp
|
glatteis/tacas21-artifact
|
30b4f522bd3bdb4bebccbfae93f19851084a3db5
|
[
"MIT"
] | 1
|
2022-02-05T12:39:53.000Z
|
2022-02-05T12:39:53.000Z
|
#include <storm/models/sparse/StochasticTwoPlayerGame.h>
#include "storm/utility/builder.h"
#include "storm/models/sparse/Dtmc.h"
#include "storm/models/sparse/Ctmc.h"
#include "storm/models/sparse/Mdp.h"
#include "storm/models/sparse/Pomdp.h"
#include "storm/models/sparse/MarkovAutomaton.h"
#include "storm/exceptions/InvalidModelException.h"
namespace storm {
namespace utility {
namespace builder {
template<typename ValueType, typename RewardModelType>
std::shared_ptr<storm::models::sparse::Model<ValueType, RewardModelType>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<ValueType, RewardModelType>&& components) {
switch (modelType) {
case storm::models::ModelType::Dtmc:
return std::make_shared<storm::models::sparse::Dtmc<ValueType, RewardModelType>>(std::move(components));
case storm::models::ModelType::Ctmc:
return std::make_shared<storm::models::sparse::Ctmc<ValueType, RewardModelType>>(std::move(components));
case storm::models::ModelType::Mdp:
return std::make_shared<storm::models::sparse::Mdp<ValueType, RewardModelType>>(std::move(components));
case storm::models::ModelType::Pomdp:
return std::make_shared<storm::models::sparse::Pomdp<ValueType, RewardModelType>>(std::move(components));
case storm::models::ModelType::MarkovAutomaton:
return std::make_shared<storm::models::sparse::MarkovAutomaton<ValueType, RewardModelType>>(std::move(components));
case storm::models::ModelType::S2pg:
return std::make_shared<storm::models::sparse::StochasticTwoPlayerGame<ValueType, RewardModelType>>(std::move(components));
}
STORM_LOG_THROW(false, storm::exceptions::InvalidModelException, "Unknown model type");
}
template std::shared_ptr<storm::models::sparse::Model<double>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<double>&& components);
template std::shared_ptr<storm::models::sparse::Model<double, storm::models::sparse::StandardRewardModel<storm::Interval>>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<double, storm::models::sparse::StandardRewardModel<storm::Interval>>&& components);
template std::shared_ptr<storm::models::sparse::Model<storm::RationalNumber>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<storm::RationalNumber>&& components);
template std::shared_ptr<storm::models::sparse::Model<storm::RationalFunction>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<storm::RationalFunction>&& components);
}
}
}
| 73.142857
| 320
| 0.681641
|
glatteis
|
48212a1472ffd40fc0488b5f9d61fc9fa7296d10
| 3,041
|
cpp
|
C++
|
libraries/chain/evaluator.cpp
|
1aerostorm/golos
|
06105e960537347bee7c4657e0b63c85adfff26f
|
[
"MIT"
] | 8
|
2019-03-29T10:44:05.000Z
|
2019-11-01T12:06:57.000Z
|
libraries/chain/evaluator.cpp
|
1aerostorm/golos
|
06105e960537347bee7c4657e0b63c85adfff26f
|
[
"MIT"
] | 63
|
2019-12-29T18:26:15.000Z
|
2021-08-25T13:14:25.000Z
|
libraries/chain/evaluator.cpp
|
1aerostorm/golos
|
06105e960537347bee7c4657e0b63c85adfff26f
|
[
"MIT"
] | 5
|
2019-04-11T17:58:55.000Z
|
2019-10-27T16:24:21.000Z
|
#include <golos/chain/evaluator.hpp>
#include <golos/chain/database.hpp>
#include <golos/chain/account_object.hpp>
#include <golos/chain/steem_objects.hpp>
namespace golos { namespace chain {
asset get_balance(const database& _db, const account_object &account, balance_type type, asset_symbol_type symbol) {
switch(type) {
case MAIN_BALANCE:
if (symbol == STEEM_SYMBOL) {
return account.balance;
} else if (symbol == SBD_SYMBOL) {
return account.sbd_balance;
} else {
GOLOS_CHECK_VALUE(_db.has_hardfork(STEEMIT_HARDFORK_0_24__95), "invalid symbol");
return _db.get_or_default_account_balance(account.name, symbol).balance;
}
case SAVINGS:
if (symbol == STEEM_SYMBOL) {
return account.savings_balance;
} else if (symbol == SBD_SYMBOL) {
return account.savings_sbd_balance;
} else {
GOLOS_CHECK_VALUE(false, "invalid symbol");
}
case VESTING:
GOLOS_CHECK_VALUE(symbol == VESTS_SYMBOL, "invalid symbol");
return account.vesting_shares;
case EFFECTIVE_VESTING:
GOLOS_CHECK_VALUE(symbol == VESTS_SYMBOL, "invalid symbol");
return account.effective_vesting_shares();
case HAVING_VESTING:
GOLOS_CHECK_VALUE(symbol == VESTS_SYMBOL, "invalid symbol");
return account.available_vesting_shares(false);
case AVAILABLE_VESTING:
GOLOS_CHECK_VALUE(symbol == VESTS_SYMBOL, "invalid symbol");
return account.available_vesting_shares(true);
case TIP_BALANCE:
if (symbol == STEEM_SYMBOL) {
return account.tip_balance;
} else {
GOLOS_CHECK_VALUE(_db.has_hardfork(STEEMIT_HARDFORK_0_24__95), "invalid symbol");
return _db.get_or_default_account_balance(account.name, symbol).tip_balance;
}
default: FC_ASSERT(false, "invalid balance type");
}
}
std::string get_balance_name(balance_type type) {
switch(type) {
case MAIN_BALANCE: return "fund";
case SAVINGS: return "savings";
case VESTING: return "vesting shares";
case EFFECTIVE_VESTING: return "effective vesting shares";
case HAVING_VESTING: return "having vesting shares";
case AVAILABLE_VESTING: return "available vesting shares";
case TIP_BALANCE: return "tip balance";
default: FC_ASSERT(false, "invalid balance type");
}
}
} } // golos::chain
| 47.515625
| 124
| 0.542914
|
1aerostorm
|
48218bcc6c1635295fbbefa0cc4105edc15745de
| 719
|
cpp
|
C++
|
src/attic/BezierCurve.cpp
|
mgerhardy/myplayground
|
ad5ed00e7946108f2991ad9031096da161f2e6a7
|
[
"MIT"
] | 1
|
2018-01-18T20:09:47.000Z
|
2018-01-18T20:09:47.000Z
|
src/attic/BezierCurve.cpp
|
mgerhardy/myplayground
|
ad5ed00e7946108f2991ad9031096da161f2e6a7
|
[
"MIT"
] | null | null | null |
src/attic/BezierCurve.cpp
|
mgerhardy/myplayground
|
ad5ed00e7946108f2991ad9031096da161f2e6a7
|
[
"MIT"
] | null | null | null |
#include "BezierCurve.h"
#include "engine/common/Math.h"
#include <assert.h>
BezierCurve::BezierCurve ()
{
}
BezierCurve::~BezierCurve ()
{
}
float BezierCurve::lerp (const double a, const double b, const double t)
{
const double p = a + (b - a) * t;
return p;
}
float BezierCurve::bezier (const Points& points, const double t)
{
if (points.size() == 2) {
const double p = lerp(points[0], points[1], t);
return p;
}
assert(points.size() > 2);
Points::const_iterator i = points.begin();
double prev = *i++;
Points lerped;
for (; i != points.end(); ++i) {
const double current = *i;
const double p = lerp(prev, current, t);
prev = current;
lerped.push_back(p);
}
return bezier(lerped, t);
}
| 17.975
| 72
| 0.641168
|
mgerhardy
|
4827b63227ac1ae126081fcbed824c8e9077ca0c
| 164,620
|
cpp
|
C++
|
vulkanon/generator/tmp/05-gen-callingvector/vulkanon/l0_boss5-left.cpp
|
pqrs-org/Vulkanon
|
3c161b83e64f18be2ba916055e5761fbc0b61028
|
[
"Unlicense"
] | 5
|
2020-04-20T02:28:15.000Z
|
2021-12-05T22:04:06.000Z
|
vulkanon/generator/tmp/05-gen-callingvector/vulkanon/l0_boss5-left.cpp
|
pqrs-org/Vulkanon
|
3c161b83e64f18be2ba916055e5761fbc0b61028
|
[
"Unlicense"
] | null | null | null |
vulkanon/generator/tmp/05-gen-callingvector/vulkanon/l0_boss5-left.cpp
|
pqrs-org/Vulkanon
|
3c161b83e64f18be2ba916055e5761fbc0b61028
|
[
"Unlicense"
] | null | null | null |
extern const BulletStepFunc bullet_7381bc6f43eb422d458a2239f53566ea_8bfcd38de5961107785fdc25e687ca15[] = {
stepfunc_efe2c0d124d296be77286f5d11e9f0b8_8bfcd38de5961107785fdc25e687ca15,
stepfunc_0fdd59aa50ca3c3515c1b7e88bbab930_8bfcd38de5961107785fdc25e687ca15,
NULL};
extern const BulletStepFunc bullet_7ec1b7e792d02c73be80cb4c5cc56a1c_8bfcd38de5961107785fdc25e687ca15[] = {
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_5e8e5dd10e033233c7403e7dee40b025_8bfcd38de5961107785fdc25e687ca15,
stepfunc_48335121df3ff5225f00d637f2b62596_8bfcd38de5961107785fdc25e687ca15,
stepfunc_dae2cf81747ffb5070f05c8837b1d568_8bfcd38de5961107785fdc25e687ca15,
NULL};
| 75.931734
| 107
| 0.973539
|
pqrs-org
|
4838143530d158a17848e6fbac3a0c84b9a5d0d1
| 1,545
|
cpp
|
C++
|
src/ioobject.cpp
|
abbyssoul/libcadence
|
c9a49d95df608497e9551f7d62169d0c78a48737
|
[
"Apache-2.0"
] | 2
|
2020-04-24T15:07:33.000Z
|
2020-06-12T07:01:53.000Z
|
src/ioobject.cpp
|
abbyssoul/libcadence
|
c9a49d95df608497e9551f7d62169d0c78a48737
|
[
"Apache-2.0"
] | null | null | null |
src/ioobject.cpp
|
abbyssoul/libcadence
|
c9a49d95df608497e9551f7d62169d0c78a48737
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright 2016 Ivan Ryabov
*
* 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.
*/
/*******************************************************************************
* libcadence
* @file ioobject.cpp
* @brief Implementation of IOObject
******************************************************************************/
#include "cadence/ioobject.hpp"
using namespace Solace;
using namespace cadence;
IOObject::IOResult
IOObject::read(ByteWriter& destBuffer, size_type bytesToRead) {
auto destSlice = destBuffer.viewRemaining().slice(0, bytesToRead);
return read(destSlice)
.then([&destBuffer](auto bytesRead) {
destBuffer.advance(bytesRead);
return bytesRead;
});
}
IOObject::IOResult
IOObject::write(ByteReader& srcBuffer, size_type bytesToWrite) {
return write(srcBuffer.viewRemaining().slice(0, bytesToWrite))
.then([&srcBuffer](auto bytesRead) {
srcBuffer.advance(bytesRead);
return bytesRead;
});
}
| 31.530612
| 80
| 0.616828
|
abbyssoul
|
4839df4259064d37c9fa66ac7ecc18fe920df6d9
| 559
|
cpp
|
C++
|
BAC/exercises/ch8/UVa10954.cpp
|
Anyrainel/aoapc-code
|
e787a01380698fb9236d933462052f97b20e6132
|
[
"Apache-2.0"
] | 3
|
2017-08-15T06:00:01.000Z
|
2018-12-10T09:05:53.000Z
|
BAC/exercises/ch8/UVa10954.cpp
|
Anyrainel/aoapc-related-code
|
e787a01380698fb9236d933462052f97b20e6132
|
[
"Apache-2.0"
] | null | null | null |
BAC/exercises/ch8/UVa10954.cpp
|
Anyrainel/aoapc-related-code
|
e787a01380698fb9236d933462052f97b20e6132
|
[
"Apache-2.0"
] | 2
|
2017-09-16T18:46:27.000Z
|
2018-05-22T05:42:03.000Z
|
// UVa10954 Add All
// Rujia Liu
// 题意:有n个数的集合S,每次可以从S中删除两个数,然后把它们的和放回集合,直到剩一个数。每次操作的开销等于删除的两个数之和。求最小总开销。
// 算法:Huffman编码
#include<cstdio>
#include<queue>
using namespace std;
int main() {
int n, x;
while(scanf("%d", &n) == 1 && n) {
priority_queue<int, vector<int>, greater<int> > q;
for(int i = 0; i < n; i++) { scanf("%d", &x); q.push(x); }
int ans = 0;
for(int i = 0; i < n-1; i++) {
int a = q.top(); q.pop();
int b = q.top(); q.pop();
ans += a+b;
q.push(a+b);
}
printf("%d\n", ans);
}
return 0;
}
| 22.36
| 72
| 0.531306
|
Anyrainel
|
483a6f49df9f84078f07a23dbc3ecfcc4034026c
| 348
|
cpp
|
C++
|
invertedNestedLoops2.cpp
|
yishenli/learncpp
|
734a3ef753b32a3252b731d7e370b808fcf79a6b
|
[
"MIT"
] | null | null | null |
invertedNestedLoops2.cpp
|
yishenli/learncpp
|
734a3ef753b32a3252b731d7e370b808fcf79a6b
|
[
"MIT"
] | null | null | null |
invertedNestedLoops2.cpp
|
yishenli/learncpp
|
734a3ef753b32a3252b731d7e370b808fcf79a6b
|
[
"MIT"
] | null | null | null |
#include <iostream>
int main()
{
const int max = 9;
int outer = 1;
while (outer <= max)
{
for (int i = 0; i < max - outer; ++i)
{
std::cout << " ";
}
int inner = 1;
while (inner <= outer)
{
std::cout << inner << ' ';
++inner;
}
std::cout << '\n';
++outer;
}
return 0;
}
| 12.888889
| 41
| 0.408046
|
yishenli
|
c617798ac904d56e48a37c30273eadb25eee3ae2
| 6,897
|
cpp
|
C++
|
examples/logreg.cpp
|
haptork/easyLambda
|
2a8cae9c6e26517e301b5aa6f9c1518aa5a22417
|
[
"BSL-1.0"
] | 537
|
2016-03-15T09:26:41.000Z
|
2022-01-18T02:44:56.000Z
|
examples/logreg.cpp
|
haptork/easyLambda
|
2a8cae9c6e26517e301b5aa6f9c1518aa5a22417
|
[
"BSL-1.0"
] | 10
|
2016-03-15T11:56:00.000Z
|
2019-11-14T20:01:47.000Z
|
examples/logreg.cpp
|
haptork/easyLambda
|
2a8cae9c6e26517e301b5aa6f9c1518aa5a22417
|
[
"BSL-1.0"
] | 55
|
2016-03-15T11:53:07.000Z
|
2020-12-27T02:53:21.000Z
|
/*!
* @file
* An example of logistic regression training and testing.
* The data is taken from:
*
* command to run:
* mpirung -n 4 ./bin/logreg "data/logreg/train.csv"
*
* For running on some different data-set specify the columns etc. in `fromFile`
* Also change the `D` parameter and inFile variable.
* Testing data files can be given as arguments after training data file.
*
* benchmarks at the bottom
* */
#include <array>
#include <iostream>
#include <stdexcept>
#include <ezl.hpp>
#include <ezl/algorithms/io.hpp>
#include <ezl/algorithms/reduceAlls.hpp>
#include <ezl/algorithms/reduces.hpp>
#include <ezl/algorithms/fromFile.hpp>
using namespace std;
using ezl::fromFile;
using ezl::fromMem;
using ezl::rise;
using ezl::Karta;
using ezl::llmode;
using ezl::flow;
template <size_t D>
double calcNorm(const array<double, D> &weights,
const array<double, D> &weightsNew) {
auto sum = 0.;
for (size_t i = 0; i < weights.size(); ++i) {
auto minus = weights[i] - weightsNew[i];
sum += (minus * minus);
}
return sqrt(sum);
}
void logreg(int argc, char* argv[]) {
std::string inFile = "data/logreg/train.csv";
if (argc < 2) {
Karta::inst().print0("Provide args as glob pattern for train files followed"
" by test file pattern(s). Continuing with default: " + inFile);
} else {
inFile = std::string(argv[1]);
}
constexpr auto D = 3; // number of features
constexpr auto maxIters = 1000;
// specify columns and other read properties if required.
auto reader = fromFile<double, array<double, D>>(inFile).colSeparator(",");
auto data = rise(reader).get(); // load once in memory
if (data.empty()) {
Karta::inst().print("no data");
return;
}
array<double, D> w{}, wn{}, grad{}; // weights initialised to zero;
auto sumAr = [](auto &a, auto &b) -> auto & { // updating the reference
transform(begin(b), end(b), begin(a), begin(a), plus<double>());
return a;
};
auto sigmoid = [](double x) { return 1. / (1. + exp(-x)); };
auto calcGrad = [&](const double &y, array<double, D> x) {
auto s = sigmoid(inner_product(begin(w), end(w), begin(x), 0.)) - y;
for_each(begin(x), end(x), [&s](double& x) { x *= s; });
return x;
};
// build flow for final gradient value in all procs
auto train = rise(fromMem(data)).map(calcGrad).colsTransform()
.reduce(sumAr, array<double, D>{}).inprocess()
.reduce(sumAr, array<double, D>{}).prll(1., llmode::dupe)
.build();
auto iters = 0;
auto norm = 0.;
while (iters++ < maxIters) {
tie(grad) = flow(train).get()[0]; // running flow
constexpr static auto gamma = 0.002;
transform(begin(w), end(w), begin(grad), begin(wn),
[](double a, double b) { return a - gamma * b;});
norm = calcNorm(wn, w);
w = move(wn);
constexpr auto epsilon = 0.0001;
if(norm < epsilon) break;
}
Karta::inst().print0("iters: " + to_string(iters-1));
Karta::inst().print0("norm: " + to_string(norm));
// building testing flow
auto testFlow = rise(reader)
.map<2>([&](auto x) {
auto pred = 0.;
for (size_t i = 0; i < x.size(); ++i) {
pred += w[i] * x[i];
}
return (sigmoid(pred) > 0.5);
}).colsTransform()
.reduce<1, 2>(ezl::count(), 0)
.dump("", "real-y, predicted-y, count")
.build();
for (int i = 1; i < argc; ++i) { // testing all the file patterns
reader = reader.filePattern(argv[i]);
Karta::inst().print0("Testing file " + string(argv[i]));
flow(testFlow).run();
}
}
int main(int argc, char *argv[]) {
ezl::Env env{argc, argv, false};
try {
logreg(argc, argv);
} catch (const exception& ex) {
cerr<<"error: "<<ex.what()<<'\n';
env.abort(1);
} catch (...) {
cerr<<"unknown exception\n";
env.abort(2);
}
return 0;
}
/*!
* benchmark results: i7(hdd); input: 450MBs
* *nprocs* | 1 | 2 | 4 |
* --- |--- |--- |--- |
* *time(s)*| 120 | 63 | 38 |
*
* benchmark results: Linux(lustre); input: 48GBs; iterations: 10; units: secs
* *nprocs* | 1x24 | 2x24 | 4x24 | 8x24 | 16x24 |
* --- |--- |--- |--- | --- | --- |
* *time(s)*| 335 | 182 | 98 | 55 | 31 |
*
* benchmark results: Linux(lustre); input: weak; iterations: 10; units: secs
* *nprocs* | 1x24 | 2x24 | 4x24 | 8x24 | 16x24 |
* *input* | 3GB | 6GB | 12GB | 24GB | 48GB |
* --- |--- |--- |--- | --- | --- |
* *time(s)*| 22 | 22 | 26 | 26 | 29 |
* --- |--- |--- |--- | --- | --- |
* *nprocs* | 4x12 | 8x6 | 8x12 | 16x6 |
* *input* | 6GB | 6GB | 12GB | 12GB |
* --- |--- |--- |--- | --- |
* *time(s)*| 23 | 23 | 27 | 26 |
*
* benchmark results: Linux(nfs-3); input: 48GBs; iterations: 10; units: secs
* *nprocs* | 2x12 | 4x12 | 8x12 | 16x12 |
* --- |--- |--- |--- | --- |
* *time(s)*| 520 | 260 | 140 | 75 |
*
* benchmark results: Linux(nfs-3); input: weak; iterations: 10; units: secs
* *nprocs* | 2x12 | 4x12 | 8x12 | 16x12 |
* *input* | 3GB | 6GB | 12GB | 24GB |
* --- |--- |--- |--- | --- |
* *time(s)*| 31 | 31 | 34 | 32 / 90 |
* --- |--- |--- |--- | --- |
* *nprocs* | 4x6 | 8x6 | 16x6 |
* *input* | 3GB | 6GB | 12GB |
* --- |--- |--- |--- |
* *time(s)*| 31 | 31 | 65 / 31 |
*
* **Remark:** the value with 16 x 12 / 16 x 6 sometimes takes long time
* (~90secs / 65secs), usually when benchmark is run for the
* first time.
*
* benchmark results: Linux(nfs-3); input: 2.9GBs; iterations: 100; units: secs
* *nprocs* | 1x12 | 2x12 | 4x12 | 8x12 | 12x12 |
* --- |--- |--- |--- | --- | |
* *time(s)*| 190 | 91 | 50 | 36 | 34 |
*
* benchmark results: EC2(nfs-3); input: 2.2GBs; iterations: 10 ; units: secs
* *nprocs* | 8 | 16 | 32 |
* --- |--- |--- |--- |
* *time(s)* ezl | 54 | 27 | 15 |
* *time(s)* PySpark| 150 | 102 | 72 |
*
*/
| 38.316667
| 80
| 0.46484
|
haptork
|
c61fefb57288bfadbe5fb89cf78c995d48351ae8
| 17,082
|
cpp
|
C++
|
src/core/graphics/basic_renderer.cpp
|
Caravetta/Engine
|
6e2490a68727dc731b466335499f3204490acc5f
|
[
"MIT"
] | 2
|
2018-05-21T02:12:50.000Z
|
2019-04-23T20:56:00.000Z
|
src/core/graphics/basic_renderer.cpp
|
Caravetta/Engine
|
6e2490a68727dc731b466335499f3204490acc5f
|
[
"MIT"
] | 12
|
2018-05-30T13:15:25.000Z
|
2020-02-02T21:29:42.000Z
|
src/core/graphics/basic_renderer.cpp
|
Caravetta/Engine
|
6e2490a68727dc731b466335499f3204490acc5f
|
[
"MIT"
] | 2
|
2018-06-14T19:03:29.000Z
|
2018-12-30T07:37:22.000Z
|
#include "basic_renderer.h"
#include "ecs.h"
#include "gtx/string_cast.hpp"
namespace Engine {
char light_pass_vert[] = " \
#version 330 core\n \
\
layout(location = 0) in vec3 vertexPosition_modelspace;\n \
\
out vec2 uv;\n \
\
void main(){\n \
gl_Position = vec4(vertexPosition_modelspace, 1);\n \
uv = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;\n \
}\n \
";
char light_pass_frag[] = " \
#version 330 core\n \
\
out vec4 FragColor;\n \
\
in vec2 uv;\n \
\
uniform sampler2D gPosition;\n \
uniform sampler2D gNormal;\n \
uniform sampler2D gAlbedoSpec;\n \
\
struct Light {\n \
vec3 Position;\n \
vec3 Color;\n \
float Linear;\n \
float Quadratic;\n \
};\n \
\
void main()\n \
{\n \
vec3 viewPos = vec3(0, 0, 0);\n \
\
Light light;\n \
light.Position = vec3(0.5, 0.1, -7);\n \
light.Color = vec3(1, 1, 0);\n \
light.Linear = 0.7;\n \
light.Quadratic = 1.8;\n \
\
// retrieve data from gbuffer\n \
vec3 FragPos = texture(gPosition, uv).rgb;\n \
vec3 Normal = texture(gNormal, uv).rgb;\n \
vec3 Diffuse = texture(gAlbedoSpec, uv).rgb;\n \
\
// then calculate lighting as usual\n \
vec3 lighting = Diffuse * 0.9; // hard-coded ambient component\n \
vec3 viewDir = normalize(viewPos - FragPos);\n \
\
// diffuse\n \
vec3 lightDir = normalize(light.Position - FragPos);\n \
vec3 diffuse = max(dot(Normal, lightDir), 0.0) * Diffuse * light.Color;\n \
// attenuation\n \
float distance = length(light.Position - FragPos);\n \
float attenuation = 1.0 / (1.0 + light.Linear * distance + light.Quadratic * distance * distance);\n \
diffuse *= attenuation;\n \
lighting += diffuse;\n \
FragColor = vec4(lighting, 1.0);\n \
}\n \
";
char pass_frag1[] = " \
#version 330 core\n \
out vec4 color;\n \
in vec2 uv;\n \
\
uniform sampler2D text;\n \
mat3 sx = mat3( 1.0, 2.0, 1.0, 0.0, 0.0, 0.0, -1.0, -2.0, -1.0 );\n \
mat3 sy = mat3( 1.0, 0.0, -1.0, 2.0, 0.0, -2.0, 1.0, 0.0, -1.0 );\n \
void main()\n \
{\n \
vec3 diffuse = texture(text, uv.st).rgb;\n \
mat3 I;\n \
for (int i=0; i<3; i++) {\n \
for (int j=0; j<3; j++) {\n \
vec3 sample = texelFetch(text, ivec2(gl_FragCoord) + ivec2(i-1,j-1), 0 ).rgb;\n \
I[i][j] = length(sample);\n \
}\n \
}\n \
float gx = dot(sx[0], I[0]) + dot(sx[1], I[1]) + dot(sx[2], I[2]);\n \
float gy = dot(sy[0], I[0]) + dot(sy[1], I[1]) + dot(sy[2], I[2]);\n \
float g = sqrt(pow(gx, 2.0)+pow(gy, 2.0));\n \
color = vec4(diffuse - vec3(g), 1.0);\n \
}\n \
";
Engine::Render_Texture* _outline;
struct Outline_Pass : public Engine::Render_Pass {
Engine::Material* _material;
Outline_Pass( Engine::Material& material )
{
_material = &material;
};
void configure( void )
{
Engine::Camera camera = get_active_camera();
Engine::Render_Texture_Info texture_info(camera.window->width(), camera.window->height(),
Engine::Texture_Format::RGB_FORMAT, Engine::Data_Type::UNSIGNED_BYTE);
_outline = new (std::nothrow) Engine::Render_Texture(texture_info);
};
void execute( Engine::Render_Context& context )
{
blit(context, *context.get_color_texture(Engine::Attachment_Type::COLOR_ATTACHMENT_0), *_outline, *_material);
};
void cleanup( void )
{
};
};
Outline_Pass* outline_pass;
int width = 0;
int height = 0;
void Basic_Renderer::init( void )
{
// Setup G Buffer
Engine::Render_Texture_Info format(800, 600, Engine::Texture_Format::RGB_16F_FORMAT,
Engine::Texture_Format::RGB_FORMAT, Engine::Data_Type::FLOAT_DATA);
position_texture = new Engine::Render_Texture(format);
normal_texture = new Engine::Render_Texture(format);
Engine::Render_Texture_Info albformat(800, 600, Engine::Texture_Format::RGB_FORMAT,
Engine::Texture_Format::RGB_FORMAT, Engine::Data_Type::UNSIGNED_BYTE);
albedo_texture = new Engine::Render_Texture(albformat);
lighting_texture = new Engine::Render_Texture(albformat);
Engine::Render_Texture_Info depthformat(800, 600, Engine::Texture_Format::DEPTH24_STENCIL8_FORMAT,
Engine::Texture_Format::DEPTH_STENCIL, Engine::Data_Type::UNSIGNED_INT_24_8);
depth_texture = new Engine::Render_Texture(depthformat);
std::vector<Engine::Shader_String> shader_strings = {{Engine::VERTEX_SHADER, light_pass_vert, sizeof(light_pass_vert)},
{Engine::FRAGMENT_SHADER, pass_frag1, sizeof(pass_frag1)}};
lighting_shader = new Engine::Shader(shader_strings);
Engine::add_shader(lighting_shader->id(), *lighting_shader);
outline_material.shader_id = lighting_shader->id();
outline_pass = new Outline_Pass(outline_material);
outline_pass->configure();
#if 1
std::vector<Engine::Shader_String> shader_strings1 = {{Engine::VERTEX_SHADER, light_pass_vert, sizeof(light_pass_vert)},
{Engine::FRAGMENT_SHADER, light_pass_frag, sizeof(light_pass_frag)}};
lighting_shader1 = new Engine::Shader(shader_strings1);
#endif
}
int l_width = 800;
int l_height = 600;
void Basic_Renderer::update( float time_step )
{
Engine::Entity_Group group({Engine::component_id<Engine::Mesh_Info>(),
Engine::component_id<Engine::Transform>(),
Engine::component_id<Engine::Material>()});
Engine::Component_Data_Array<Engine::Transform> trans_infos(group);
Engine::Component_Data_Array<Engine::Mesh_Info> mesh_infos(group);
Engine::Component_Data_Array<Engine::Material> material_infos(group);
Engine::Camera camera = get_active_camera();
// Check to see if we need to regen textures since window changed size //REMOVE
if ( width != camera.window->width() ||
height != camera.window->height() ) {
width = camera.window->width();
height = camera.window->height();
position_texture->reload(width, height);
normal_texture->reload(width, height);
albedo_texture->reload(width, height);
lighting_texture->reload(width, height);
depth_texture->reload(width, height);
_outline->reload(width, height);
l_width = width;
l_height = height;
}
Engine::Render_Context* render_context = Engine::Render_Context::instance();
size_t num_entites = trans_infos.size();
// Attach the G Buffer
render_context->bind();
render_context->set_color_texture(albedo_texture, Engine::Attachment_Type::COLOR_ATTACHMENT_0);
render_context->set_color_texture(position_texture, Engine::Attachment_Type::COLOR_ATTACHMENT_1);
render_context->set_color_texture(normal_texture, Engine::Attachment_Type::COLOR_ATTACHMENT_2);
render_context->set_depth_texture(depth_texture);
Engine::graphics_clear(Engine::COLOR_BUFFER_CLEAR | Engine::DEPTH_BUFFER_CLEAR);
Engine::Attachment_Type attachments[3] = { Engine::Attachment_Type::COLOR_ATTACHMENT_0,
Engine::Attachment_Type::COLOR_ATTACHMENT_1,
Engine::Attachment_Type::COLOR_ATTACHMENT_2 };
Engine::set_draw_buffers(attachments, 3);
Engine::enable_graphics_option(Engine::DEPTH_TEST_OPTION);
Engine::set_depth_func(Engine::DEPTH_LESS_FUNC);
Engine::graphics_clear(Engine::COLOR_BUFFER_CLEAR | Engine::DEPTH_BUFFER_CLEAR);
/** Start G Buffer Pass **/
for ( size_t ii = 0; ii < num_entites; ii++ ) {
Engine::Transform trans = trans_infos[ii];
Engine::Mesh_Info mesh_info = mesh_infos[ii];
Engine::Material material = material_infos[ii];
Shader shader = get_shader(material.shader_id);
use_program(shader.id());
size_t indc = 0;
Engine::bind_mesh(mesh_info.handle, indc);
Engine::Matrix4f model_transform = Engine::model_transform(trans.position,
trans.scale,
trans.rotation);
int mvp_location = shader.uniform_id("per");
if ( mvp_location != -1 ) {
shader.set_uniform_mat4(mvp_location, (Engine::Matrix4f*)&camera.perspective);
}
mvp_location = shader.uniform_id("view");
if ( mvp_location != -1 ) {
shader.set_uniform_mat4(mvp_location, (Engine::Matrix4f*)&camera.view);
}
mvp_location = shader.uniform_id("model");
if ( mvp_location != -1 ) {
shader.set_uniform_mat4(mvp_location, (Engine::Matrix4f*)&model_transform);
}
Engine::draw_elements_data(Engine::TRIANGLE_MODE, indc, Engine::UNSIGNED_INT, 0);
}
Engine::disable_graphics_option(Engine::DEPTH_TEST_OPTION);
render_context->clear_color_texture(Engine::Attachment_Type::COLOR_ATTACHMENT_1);
render_context->clear_color_texture(Engine::Attachment_Type::COLOR_ATTACHMENT_2);
/** End G Buffer Pass **/
// render passes go here
outline_pass->execute(*render_context);
/** Start Lighting Pass **/
Engine::Render_Texture* end_texure = render_context->get_color_texture(Engine::Attachment_Type::COLOR_ATTACHMENT_0);
Engine::bind_texture(Texture_Unit::TEXTURE_UNIT_0, position_texture->texture());
Engine::bind_texture(Texture_Unit::TEXTURE_UNIT_1, normal_texture->texture());
Engine::bind_texture(Texture_Unit::TEXTURE_UNIT_2, end_texure->texture());
render_context->set_color_texture(lighting_texture, Attachment_Type::COLOR_ATTACHMENT_0);
use_program(lighting_shader1->id());
int32_t texture_pos = lighting_shader1->uniform_id("gPosition");
int32_t texture_norm = lighting_shader1->uniform_id("gNormal");
int32_t texture_alb = lighting_shader1->uniform_id("gAlbedoSpec");
lighting_shader1->set_uniform_int1(texture_pos, 0);
lighting_shader1->set_uniform_int1(texture_norm, 1);
lighting_shader1->set_uniform_int1(texture_alb, 2);
uint32_t buff_id = render_context->quad_id();
bind_vertex_array(buff_id);
draw_data(Engine::TRIANGLE_MODE, 0, 6);
bind_vertex_array(0);
Engine::bind_texture(Texture_Unit::TEXTURE_UNIT_0, 0);
Engine::bind_texture(Texture_Unit::TEXTURE_UNIT_1, 0);
Engine::bind_texture(Texture_Unit::TEXTURE_UNIT_2, 0);
/** End Lighting Pass **/
//render_context->clear_color_texture(Engine::Attachment_Type::DEPTH_STENCIL_ATTACHMENT);
}
void Basic_Renderer::shutdown( void )
{
}
} // end namespace Engine
| 57.130435
| 136
| 0.406451
|
Caravetta
|
c6216a733e5a42023596134d2f5ad5324d3f092f
| 15,480
|
hpp
|
C++
|
include/Types.hpp
|
scribelang/scribe
|
8b82ed839e290c1204928dcd196237c6cd6000ba
|
[
"MIT"
] | 2
|
2021-12-01T06:45:58.000Z
|
2021-12-01T07:30:52.000Z
|
include/Types.hpp
|
scribelang/scribe
|
8b82ed839e290c1204928dcd196237c6cd6000ba
|
[
"MIT"
] | null | null | null |
include/Types.hpp
|
scribelang/scribe
|
8b82ed839e290c1204928dcd196237c6cd6000ba
|
[
"MIT"
] | null | null | null |
/*
MIT License
Copyright (c) 2022 Scribe Language Repositories
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.
*/
#ifndef TYPES_HPP
#define TYPES_HPP
#include "Context.hpp"
#include "Error.hpp"
#include "Values.hpp"
namespace sc
{
enum Types : uint16_t
{
TVOID,
// TNIL, // = i1 (0)
// TBOOL, // = i1
TTYPE,
TANY,
TINT,
TFLT,
TPTR,
TFUNC,
TSTRUCT,
TVARIADIC,
_LAST
};
enum TypeInfoMask
{
REF = 1 << 0, // is a reference
STATIC = 1 << 1, // is static
CONST = 1 << 2, // is const
VOLATILE = 1 << 3, // is volatile
COMPTIME = 1 << 4, // is comptime
VARIADIC = 1 << 5, // is variadic
};
class Stmt;
class StmtExpr;
class StmtVar;
class StmtFnDef;
class StmtFnCallInfo;
typedef bool (*IntrinsicFn)(Context &c, StmtExpr *stmt, Stmt **source, Vector<Stmt *> &args);
#define INTRINSIC(name) \
bool intrinsic_##name(Context &c, StmtExpr *stmt, Stmt **source, Vector<Stmt *> &args)
class Type
{
uint32_t id;
Types type;
uint16_t info;
public:
Type(const Types &type, const uint16_t &info, const uint32_t &id);
virtual ~Type();
bool isBaseCompatible(Context &c, Type *rhs, const ModuleLoc *loc);
String infoToStr();
String baseToStr();
bool requiresCast(Type *other);
virtual uint32_t getUniqID(); // used by codegen
virtual uint32_t getID();
virtual bool isTemplate(const size_t &weak_depth = 0);
virtual String toStr(const size_t &weak_depth = 0);
virtual Type *clone(Context &c, const bool &as_is = false,
const size_t &weak_depth = 0) = 0;
virtual bool mergeTemplatesFrom(Type *ty, const size_t &weak_depth = 0);
virtual void unmergeTemplates(const size_t &weak_depth = 0);
virtual bool isCompatible(Context &c, Type *rhs, const ModuleLoc *loc);
inline void setInfo(const size_t &inf)
{
info = inf;
}
inline void appendInfo(const size_t &inf)
{
info |= inf;
}
inline uint16_t getInfo() const
{
return info;
}
inline bool isPrimitive() const
{
return isInt() || isFlt();
}
inline bool isPrimitiveOrPtr() const
{
return isInt() || isFlt() || isPtr();
}
inline bool isIntegral() const
{
return isInt();
}
inline bool isFloat() const
{
return isFlt();
}
virtual Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
#define SetModifierX(Fn, Mod) \
inline void set##Fn() \
{ \
info |= Mod; \
}
SetModifierX(Static, STATIC);
SetModifierX(Const, CONST);
SetModifierX(Volatile, VOLATILE);
SetModifierX(Ref, REF);
SetModifierX(Comptime, COMPTIME);
SetModifierX(Variadic, VARIADIC);
#define UnsetModifierX(Fn, Mod) \
inline void unset##Fn() \
{ \
info &= ~Mod; \
}
UnsetModifierX(Static, STATIC);
UnsetModifierX(Const, CONST);
UnsetModifierX(Volatile, VOLATILE);
UnsetModifierX(Ref, REF);
UnsetModifierX(Comptime, COMPTIME);
UnsetModifierX(Variadic, VARIADIC);
#define IsTyX(Fn, Ty) \
inline bool is##Fn() const \
{ \
return type == T##Ty; \
}
IsTyX(Void, VOID);
IsTyX(TypeTy, TYPE);
IsTyX(Any, ANY);
IsTyX(Int, INT);
IsTyX(Flt, FLT);
IsTyX(Ptr, PTR);
IsTyX(Func, FUNC);
IsTyX(Struct, STRUCT);
IsTyX(Variadic, VARIADIC);
#define IsModifierX(Fn, Mod) \
inline bool has##Fn() const \
{ \
return info & Mod; \
}
IsModifierX(Static, STATIC);
IsModifierX(Const, CONST);
IsModifierX(Volatile, VOLATILE);
IsModifierX(Ref, REF);
IsModifierX(Comptime, COMPTIME);
IsModifierX(Variadic, VARIADIC);
inline const uint32_t &getBaseID() const
{
return id;
}
};
template<typename T> T *as(Type *t)
{
return static_cast<T *>(t);
}
class VoidTy : public Type
{
public:
VoidTy();
VoidTy(const uint16_t &info);
~VoidTy();
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
static VoidTy *create(Context &c);
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
class AnyTy : public Type
{
public:
AnyTy();
AnyTy(const uint16_t &info);
~AnyTy();
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
static AnyTy *create(Context &c);
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
class IntTy : public Type
{
uint16_t bits;
bool sign; // signed
public:
IntTy(const uint16_t &bits, const bool &sign);
IntTy(const uint16_t &info, const uint32_t &id, const uint16_t &bits, const bool &sign);
~IntTy();
uint32_t getID();
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
static IntTy *create(Context &c, const uint16_t &_bits, const bool &_sign);
inline const uint16_t &getBits() const
{
return bits;
}
inline const bool &isSigned() const
{
return sign;
}
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
class FltTy : public Type
{
uint16_t bits;
public:
FltTy(const uint16_t &bits);
FltTy(const uint16_t &info, const uint32_t &id, const uint16_t &bits);
~FltTy();
uint32_t getID();
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
static FltTy *create(Context &c, const uint16_t &_bits);
inline const uint16_t &getBits() const
{
return bits;
}
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
class TypeTy : public Type
{
uint32_t containedtyid;
public:
TypeTy();
TypeTy(const uint16_t &info, const uint32_t &id, const uint32_t &containedtyid);
~TypeTy();
uint32_t getUniqID();
bool isTemplate(const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
bool mergeTemplatesFrom(Type *ty, const size_t &weak_depth = 0);
void unmergeTemplates(const size_t &weak_depth = 0);
static TypeTy *create(Context &c);
void clearContainedTy();
void setContainedTy(Type *ty);
Type *getContainedTy();
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
class PtrTy : public Type
{
Type *to;
uint16_t count; // 0 = normal pointer, > 0 = array pointer with count = size
bool is_weak; // required for self referencing members in struct
public:
PtrTy(Type *to, const uint16_t &count, const bool &is_weak);
PtrTy(const uint16_t &info, const uint32_t &id, Type *to, const uint16_t &count,
const bool &is_weak);
~PtrTy();
uint32_t getUniqID();
bool isTemplate(const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
bool mergeTemplatesFrom(Type *ty, const size_t &weak_depth = 0);
void unmergeTemplates(const size_t &weak_depth = 0);
static PtrTy *create(Context &c, Type *ptr_to, const uint16_t &count, const bool &is_weak);
inline void setTo(Type *ty)
{
to = ty;
}
inline void setWeak(const bool &weak)
{
is_weak = weak;
}
inline Type *&getTo()
{
return to;
}
inline const uint16_t &getCount()
{
return count;
}
inline bool isWeak()
{
return is_weak;
}
inline bool isArrayPtr()
{
return count > 0;
}
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
class StructTy : public Type
{
Map<StringRef, size_t> fieldpos;
Vector<StringRef> fieldnames;
Vector<Type *> fields;
Map<StringRef, size_t> templatepos;
Vector<StringRef> templatenames;
Vector<TypeTy *> templates;
bool has_template;
bool externed;
public:
StructTy(const Vector<StringRef> &fieldnames, const Vector<Type *> &fields,
const Vector<StringRef> &templatenames, const Vector<TypeTy *> &templates,
const bool &externed);
StructTy(const uint16_t &info, const uint32_t &id, const Vector<StringRef> &fieldnames,
const Map<StringRef, size_t> &fieldpos, const Vector<Type *> &fields,
const Vector<StringRef> &templatenames, const Map<StringRef, size_t> &templatepos,
const Vector<TypeTy *> &templates, const bool &has_template, const bool &externed);
~StructTy();
uint32_t getUniqID();
bool isTemplate(const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
bool mergeTemplatesFrom(Type *ty, const size_t &weak_depth = 0);
void unmergeTemplates(const size_t &weak_depth = 0);
bool isCompatible(Context &c, Type *rhs, const ModuleLoc *loc);
// specializes a structure type
StructTy *applyTemplates(Context &c, const ModuleLoc *loc, const Vector<Type *> &actuals);
// returns a NON-def struct type
StructTy *instantiate(Context &c, const ModuleLoc *loc, const Vector<Stmt *> &callargs);
static StructTy *create(Context &c, const Vector<StringRef> &_fieldnames,
const Vector<Type *> &_fields,
const Vector<StringRef> &_templatenames,
const Vector<TypeTy *> &_templates, const bool &_externed);
inline void insertField(StringRef name, Type *ty)
{
fieldpos[name] = fields.size();
fieldnames.push_back(name);
fields.push_back(ty);
}
inline void setExterned(const bool &ext)
{
externed = ext;
}
inline StringRef getFieldName(const size_t &idx)
{
return fieldnames[idx];
}
inline Vector<Type *> &getFields()
{
return fields;
}
inline const Vector<TypeTy *> &getTemplates()
{
return templates;
}
inline const Vector<StringRef> &getTemplateNames()
{
return templatenames;
}
inline void clearTemplates()
{
templates.clear();
}
inline void setTemplate(const bool &has_templ)
{
has_template = has_templ;
}
inline bool isExtern()
{
return externed;
}
Type *getField(StringRef name);
Type *getField(const size_t &pos);
bool hasTemplate();
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
enum IntrinType
{
INONE,
IPARSE,
IVALUE,
};
class FuncTy : public Type
{
StmtVar *var;
Vector<Type *> args;
Type *ret;
IntrinsicFn intrin;
IntrinType inty;
uint32_t uniqid;
bool externed;
public:
FuncTy(StmtVar *var, const Vector<Type *> &args, Type *ret, IntrinsicFn intrin,
const IntrinType &inty, const bool &externed);
FuncTy(const uint16_t &info, const uint32_t &id, StmtVar *var, const Vector<Type *> &args,
Type *ret, IntrinsicFn intrin, const IntrinType &inty, const uint32_t &uniqid,
const bool &externed);
~FuncTy();
// returns ID of parameters + ret type
uint32_t getSignatureID();
uint32_t getNonUniqID();
uint32_t getID();
bool isTemplate(const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
bool mergeTemplatesFrom(Type *ty, const size_t &weak_depth = 0);
void unmergeTemplates(const size_t &weak_depth = 0);
bool isCompatible(Context &c, Type *rhs, const ModuleLoc *loc);
// specializes a function type using StmtFnCallInfo
FuncTy *createCall(Context &c, const ModuleLoc *loc, const Vector<Stmt *> &callargs);
static FuncTy *create(Context &c, StmtVar *_var, const Vector<Type *> &_args, Type *_ret,
IntrinsicFn _intrin, const IntrinType &_inty, const bool &_externed);
inline void setVar(StmtVar *v)
{
var = v;
}
inline void setArg(const size_t &idx, Type *arg)
{
args[idx] = arg;
}
inline void setRet(Type *retty)
{
ret = retty;
}
inline void insertArg(Type *arg)
{
args.push_back(arg);
}
inline void insertArg(const size_t &idx, Type *arg)
{
args.insert(args.begin() + idx, arg);
}
inline void eraseArg(const size_t &idx)
{
args.erase(args.begin() + idx);
}
inline void setExterned(const bool &ext)
{
externed = ext;
}
inline StmtVar *&getVar()
{
return var;
}
inline Vector<Type *> &getArgs()
{
return args;
}
inline Type *getArg(const size_t &idx)
{
return args.size() > idx ? args[idx] : nullptr;
}
inline Type *getRet()
{
return ret;
}
inline bool isIntrinsic()
{
return intrin != nullptr;
}
inline bool isParseIntrinsic()
{
return inty == IPARSE;
}
inline bool isExtern()
{
return externed;
}
inline IntrinsicFn getIntrinsicFn()
{
return intrin;
}
void updateUniqID();
bool callIntrinsic(Context &c, StmtExpr *stmt, Stmt **source, Vector<Stmt *> &callargs);
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
class VariadicTy : public Type
{
Vector<Type *> args;
public:
VariadicTy(const Vector<Type *> &args);
VariadicTy(const uint16_t &info, const uint32_t &id, const Vector<Type *> &args);
~VariadicTy();
bool isTemplate(const size_t &weak_depth = 0);
String toStr(const size_t &weak_depth = 0);
Type *clone(Context &c, const bool &as_is = false, const size_t &weak_depth = 0);
bool mergeTemplatesFrom(Type *ty, const size_t &weak_depth = 0);
void unmergeTemplates(const size_t &weak_depth = 0);
bool isCompatible(Context &c, Type *rhs, const ModuleLoc *loc);
static VariadicTy *create(Context &c, const Vector<Type *> &_args);
inline void addArg(Type *ty)
{
args.push_back(ty);
}
inline Vector<Type *> &getArgs()
{
return args;
}
inline Type *getArg(const size_t &idx)
{
return args.size() > idx ? args[idx] : nullptr;
}
Value *toDefaultValue(Context &c, const ModuleLoc *loc, ContainsData cd,
const size_t &weak_depth = 0);
};
// helpful functions
inline IntTy *mkI0Ty(Context &c)
{
return IntTy::create(c, 0, true);
}
inline IntTy *mkI1Ty(Context &c)
{
return IntTy::create(c, 1, true);
}
inline IntTy *mkI8Ty(Context &c)
{
return IntTy::create(c, 8, true);
}
inline IntTy *mkI16Ty(Context &c)
{
return IntTy::create(c, 16, true);
}
inline IntTy *mkI32Ty(Context &c)
{
return IntTy::create(c, 32, true);
}
inline IntTy *mkI64Ty(Context &c)
{
return IntTy::create(c, 64, true);
}
inline IntTy *mkU8Ty(Context &c)
{
return IntTy::create(c, 8, false);
}
inline IntTy *mkU16Ty(Context &c)
{
return IntTy::create(c, 16, false);
}
inline IntTy *mkU32Ty(Context &c)
{
return IntTy::create(c, 32, false);
}
inline IntTy *mkU64Ty(Context &c)
{
return IntTy::create(c, 64, false);
}
inline FltTy *mkF0Ty(Context &c)
{
return FltTy::create(c, 0);
}
inline FltTy *mkF32Ty(Context &c)
{
return FltTy::create(c, 32);
}
inline FltTy *mkF64Ty(Context &c)
{
return FltTy::create(c, 64);
}
inline PtrTy *mkPtrTy(Context &c, Type *to, const size_t &count, const bool &is_weak)
{
return PtrTy::create(c, to, count, is_weak);
}
inline Type *mkStrTy(Context &c)
{
Type *res = IntTy::create(c, 8, true);
res = PtrTy::create(c, res, 0, false);
res->setConst();
return res;
}
inline VoidTy *mkVoidTy(Context &c)
{
return VoidTy::create(c);
}
inline AnyTy *mkAnyTy(Context &c)
{
return AnyTy::create(c);
}
inline TypeTy *mkTypeTy(Context &c)
{
return TypeTy::create(c);
}
} // namespace sc
#endif // TYPES_HPP
| 23.85208
| 93
| 0.691085
|
scribelang
|
c621ff4fd2aecfd1ca1209c8f0b71cc9d0d1689a
| 1,389
|
cpp
|
C++
|
test/function/scalar/asinpi.cpp
|
yaeldarmon/boost.simd
|
561316cc54bdc6353ca78f3b6d7e9120acd11144
|
[
"BSL-1.0"
] | null | null | null |
test/function/scalar/asinpi.cpp
|
yaeldarmon/boost.simd
|
561316cc54bdc6353ca78f3b6d7e9120acd11144
|
[
"BSL-1.0"
] | null | null | null |
test/function/scalar/asinpi.cpp
|
yaeldarmon/boost.simd
|
561316cc54bdc6353ca78f3b6d7e9120acd11144
|
[
"BSL-1.0"
] | null | null | null |
//==================================================================================================
/*!
Copyright 2015 NumScale SAS
Copyright 2015 J.T. Lapreste
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//==================================================================================================
#include <boost/simd/function/scalar/asinpi.hpp>
#include <simd_test.hpp>
#include <boost/simd/constant/inf.hpp>
#include <boost/simd/constant/minf.hpp>
#include <boost/simd/constant/nan.hpp>
#include <boost/simd/constant/one.hpp>
#include <boost/simd/constant/mone.hpp>
#include <boost/simd/constant/zero.hpp>
#include <boost/simd/constant/mzero.hpp>
STF_CASE_TPL (" asinpi", STF_IEEE_TYPES)
{
namespace bs = boost::simd;
namespace bd = boost::dispatch;
using bs::asinpi;
using r_t = decltype(asinpi(T()));
// return type conformity test
STF_TYPE_IS(r_t, T);
// specific values tests
#ifndef BOOST_SIMD_NO_INVALIDS
STF_ULP_EQUAL(asinpi(bs::Nan<T>()), bs::Nan<r_t>(), 0.5);
#endif
STF_ULP_EQUAL(asinpi(bs::Half<T>()), T(1)/6, 0.5);
STF_ULP_EQUAL(asinpi(bs::Mhalf<T>()), -T(1)/6, 0.5);
STF_ULP_EQUAL(asinpi(bs::Mone<T>()), -0.5, 0.5);
STF_ULP_EQUAL(asinpi(bs::One<T>()), 0.5, 0.5);
STF_ULP_EQUAL(asinpi(bs::Zero<T>()), bs::Zero<r_t>(), 0.5);
}
| 32.302326
| 100
| 0.595392
|
yaeldarmon
|
c622a8c7367790c9c0e76b440ce73da8ce00645d
| 1,719
|
cpp
|
C++
|
code/C/num2en.cpp
|
LingfengPang/C-C-learning
|
4ad4a8f56f1ed06622c4b6f4cd0749c0541b7641
|
[
"MIT"
] | 4
|
2021-04-16T02:20:25.000Z
|
2021-10-04T12:22:35.000Z
|
code/C/num2en.cpp
|
LingfengPang/C-C-learning
|
4ad4a8f56f1ed06622c4b6f4cd0749c0541b7641
|
[
"MIT"
] | null | null | null |
code/C/num2en.cpp
|
LingfengPang/C-C-learning
|
4ad4a8f56f1ed06622c4b6f4cd0749c0541b7641
|
[
"MIT"
] | 2
|
2022-01-08T06:30:20.000Z
|
2022-03-26T08:39:20.000Z
|
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main(){
//num是一个两位数
int num;
string res;
cin >> num;
if(num < 10||num>99){
return 0;
}
int _1stdig = num/10;
int _2nddig = num%10;
if(num == 10){
cout <<"ten"<<endl;
}
switch (_1stdig)
{
case 1:break;
case 2: res+="twenty";break;
case 3: res+="thirty";break;
case 4: res+="forty";break;
case 5: res+="fifty";break;
case 6: res+="sixty";break;
case 7: res+="seventy";break;
case 8: res+="eighty";break;
case 9: res+="ninty";break;
default:
break;
}
if(_2nddig == 0 ){
cout << res <<endl;
system("pause");
return 0;
}
else if(_1stdig >= 2)
res+="-";
if(num >= 20)
switch (_2nddig)
{
case 1: res+="one";break;
case 2: res+="two";break;
case 3: res+="three";break;
case 4: res+="four";break;
case 5: res+="five";break;
case 6: res+="six";break;
case 7: res+="seven";break;
case 8: res+="eigh";break;
case 9: res+="nine";break;
default:
break;
}
else
switch (_2nddig)
{
case 1: res+="eleven";break;
case 2: res+="twelve";break;
case 3: res+="thirteen";break;
case 4: res+="fourteen";break;
case 5: res+="fifteen";break;
case 6: res+="sixteen";break;
case 7: res+="seventeen";break;
case 8: res+="eighteen";break;
case 9: res+="nineteen";break;
default:
break;
}
cout << res <<endl;
system("pause");
return 0;
}
| 22.038462
| 39
| 0.481094
|
LingfengPang
|
c6270adb490cf5d2a69bec5a9f03a03d22840976
| 627
|
hpp
|
C++
|
library/ATF/_trap_create_setdata.hpp
|
lemkova/Yorozuya
|
f445d800078d9aba5de28f122cedfa03f26a38e4
|
[
"MIT"
] | 29
|
2017-07-01T23:08:31.000Z
|
2022-02-19T10:22:45.000Z
|
library/ATF/_trap_create_setdata.hpp
|
kotopes/Yorozuya
|
605c97d3a627a8f6545cc09f2a1b0a8afdedd33a
|
[
"MIT"
] | 90
|
2017-10-18T21:24:51.000Z
|
2019-06-06T02:30:33.000Z
|
library/ATF/_trap_create_setdata.hpp
|
kotopes/Yorozuya
|
605c97d3a627a8f6545cc09f2a1b0a8afdedd33a
|
[
"MIT"
] | 44
|
2017-12-19T08:02:59.000Z
|
2022-02-24T23:15:01.000Z
|
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <CPlayer.hpp>
#include <_character_create_setdata.hpp>
START_ATF_NAMESPACE
#pragma pack(push, 8)
struct _trap_create_setdata : _character_create_setdata
{
int nHP;
CPlayer *pMaster;
int nTrapMaxAttackPnt;
public:
_trap_create_setdata();
void ctor__trap_create_setdata();
};
#pragma pack(pop)
static_assert(ATF::checkSize<_trap_create_setdata, 56>(), "_trap_create_setdata");
END_ATF_NAMESPACE
| 27.26087
| 108
| 0.708134
|
lemkova
|
c62ba82f26507c4449211900d7af3342ea19710f
| 854
|
cpp
|
C++
|
lab3/lab6/lab6/main.cpp
|
AlexBlack559/stllabs
|
8dd7bcf154c87631e125874dffa9d5189d1c14f9
|
[
"MIT"
] | null | null | null |
lab3/lab6/lab6/main.cpp
|
AlexBlack559/stllabs
|
8dd7bcf154c87631e125874dffa9d5189d1c14f9
|
[
"MIT"
] | null | null | null |
lab3/lab6/lab6/main.cpp
|
AlexBlack559/stllabs
|
8dd7bcf154c87631e125874dffa9d5189d1c14f9
|
[
"MIT"
] | null | null | null |
//
// main.cpp
// lab6
//
// Created by Alexander Chernyi on 29/09/2017.
// Copyright © 2017 Alexander Chernyi. All rights reserved.
//
#include <iostream>
#include <fstream>
#include <streambuf>
#include <vector>
#include <set>
using namespace std;
struct Point {
int x,y;
};
struct Shape {
int vetex_num;
vector<Point> vertexes;
};
void task1() {
ifstream file;
file.open("File.txt");
if (!file) {
cerr << "Error reading file" << endl;
return;
}
set<string> words;
copy(istream_iterator<string>(file), istream_iterator<string>(), inserter(words, words.begin()));
copy(words.begin(), words.end(), ostream_iterator<string>(cout, " "));
cout << endl;
}
void task2() {
}
int main(int argc, const char * argv[]) {
task1();
task2();
return 0;
}
| 16.113208
| 101
| 0.591335
|
AlexBlack559
|
c632a0e5946095aca67f1f114964edc6bfc45080
| 14,720
|
cpp
|
C++
|
src/2ls/summary_checker_base.cpp
|
viktormalik/2ls
|
d35ccf73c34d48e6fbf9a25049cd9c77bc2cb02a
|
[
"BSD-4-Clause"
] | null | null | null |
src/2ls/summary_checker_base.cpp
|
viktormalik/2ls
|
d35ccf73c34d48e6fbf9a25049cd9c77bc2cb02a
|
[
"BSD-4-Clause"
] | 3
|
2017-09-15T14:43:44.000Z
|
2017-11-24T09:12:41.000Z
|
src/2ls/summary_checker_base.cpp
|
viktormalik/2ls
|
d35ccf73c34d48e6fbf9a25049cd9c77bc2cb02a
|
[
"BSD-4-Clause"
] | 2
|
2017-09-18T09:41:22.000Z
|
2018-01-29T18:12:33.000Z
|
/*******************************************************************\
Module: Summary Checker Base
Author: Peter Schrammel
\*******************************************************************/
/// \file
/// Summary Checker Base
#include <iostream>
#include <util/options.h>
#include <util/i2string.h>
#include <util/simplify_expr.h>
#include <langapi/language_util.h>
#include <util/prefix.h>
#include <goto-programs/write_goto_binary.h>
#include <solvers/sat/satcheck.h>
#include <solvers/flattening/bv_pointers.h>
#include <solvers/prop/literal_expr.h>
#include <ssa/local_ssa.h>
#include <ssa/simplify_ssa.h>
#include <ssa/ssa_build_goto_trace.h>
#include <domains/ssa_analyzer.h>
#include <ssa/ssa_unwinder.h>
#include <solver/summarizer_fw.h>
#include <solver/summarizer_fw_term.h>
#include <solver/summarizer_bw.h>
#include <solver/summarizer_bw_term.h>
#ifdef SHOW_CALLING_CONTEXTS
#include <solver/summarizer_fw_contexts.h>
#endif
#include "show.h"
#include "instrument_goto.h"
#include "summary_checker_base.h"
void summary_checker_baset::SSA_functions(
const goto_modelt &goto_model,
const namespacet &ns)
{
// compute SSA for all the functions
forall_goto_functions(f_it, goto_model.goto_functions)
{
if(!f_it->second.body_available())
continue;
if(has_prefix(id2string(f_it->first), TEMPLATE_DECL))
continue;
status() << "Computing SSA of " << f_it->first << messaget::eom;
ssa_db.create(f_it->first, f_it->second, ns);
local_SSAt &SSA=ssa_db.get(f_it->first);
// simplify, if requested
if(simplify)
{
status() << "Simplifying" << messaget::eom;
::simplify(SSA, ns);
}
SSA.output(debug()); debug() << eom;
}
// properties
initialize_property_map(goto_model.goto_functions);
}
void summary_checker_baset::summarize(
const goto_modelt &goto_model,
bool forward,
bool termination)
{
summarizer_baset *summarizer=NULL;
#ifdef SHOW_CALLING_CONTEXTS
if(options.get_bool_option("show-calling-contexts"))
summarizer=new summarizer_fw_contextst(
options, summary_db, ssa_db, ssa_unwinder, ssa_inliner);
else // NOLINT(*)
#endif
{
if(forward && !termination)
summarizer=new summarizer_fwt(
options, summary_db, ssa_db, ssa_unwinder, ssa_inliner);
if(forward && termination)
summarizer=new summarizer_fw_termt(
options, summary_db, ssa_db, ssa_unwinder, ssa_inliner);
if(!forward && !termination)
summarizer=new summarizer_bwt(
options, summary_db, ssa_db, ssa_unwinder, ssa_inliner);
if(!forward && termination)
summarizer=new summarizer_bw_termt(
options, summary_db, ssa_db, ssa_unwinder, ssa_inliner);
}
assert(summarizer!=NULL);
summarizer->set_message_handler(get_message_handler());
if(!options.get_bool_option("context-sensitive") &&
options.get_bool_option("all-functions"))
summarizer->summarize();
else
summarizer->summarize(goto_model.goto_functions.entry_point());
// statistics
solver_instances+=summarizer->get_number_of_solver_instances();
solver_calls+=summarizer->get_number_of_solver_calls();
summaries_used+=summarizer->get_number_of_summaries_used();
termargs_computed+=summarizer->get_number_of_termargs_computed();
delete summarizer;
}
summary_checker_baset::resultt summary_checker_baset::check_properties()
{
// analyze all the functions
for(ssa_dbt::functionst::const_iterator f_it=ssa_db.functions().begin();
f_it!=ssa_db.functions().end(); f_it++)
{
status() << "Checking properties of " << f_it->first << messaget::eom;
#if 0
// for debugging
show_ssa_symbols(*f_it->second, std::cerr);
#endif
check_properties(f_it);
if(options.get_bool_option("show-invariants"))
{
if(!summary_db.exists(f_it->first))
continue;
show_invariants(*(f_it->second), summary_db.get(f_it->first), result());
result() << eom;
}
}
summary_checker_baset::resultt result=property_checkert::PASS;
for(property_mapt::const_iterator
p_it=property_map.begin(); p_it!=property_map.end(); p_it++)
{
if(p_it->second.result==FAIL)
return property_checkert::FAIL;
if(p_it->second.result==UNKNOWN)
result=property_checkert::UNKNOWN;
}
return result;
}
void summary_checker_baset::check_properties(
const ssa_dbt::functionst::const_iterator f_it)
{
unwindable_local_SSAt &SSA=*f_it->second;
bool all_properties=options.get_bool_option("all-properties");
SSA.output_verbose(debug()); debug() << eom;
// incremental version
// solver
incremental_solvert &solver=ssa_db.get_solver(f_it->first);
solver.set_message_handler(get_message_handler());
// give SSA to solver
solver << SSA;
SSA.mark_nodes();
solver.new_context();
exprt enabling_expr=SSA.get_enabling_exprs();
solver << enabling_expr;
// invariant, calling contexts
if(summary_db.exists(f_it->first))
{
solver << summary_db.get(f_it->first).fw_invariant;
solver << summary_db.get(f_it->first).fw_precondition;
if(options.get_bool_option("heap") &&
summary_db.get(f_it->first).aux_precondition.is_not_nil())
{
solver << summary_db.get(f_it->first).aux_precondition;
}
}
// callee summaries
solver << ssa_inliner.get_summaries(SSA);
// freeze loop head selects
exprt::operandst loophead_selects=
get_loophead_selects(f_it->first, SSA, *solver.solver);
// check whether loops have been fully unwound
exprt::operandst loop_continues=
get_loop_continues(f_it->first, SSA, *solver.solver);
bool fully_unwound=
is_fully_unwound(loop_continues, loophead_selects, solver);
status() << "Loops " << (fully_unwound ? "" : "not ")
<< "fully unwound" << eom;
cover_goals_extt cover_goals(
SSA, solver, loophead_selects, property_map,
!fully_unwound && options.get_bool_option("spurious-check"),
all_properties,
options.get_bool_option("trace") ||
options.get_option("graphml-witness")!="" ||
options.get_option("json-cex")!="");
#if 0
debug() << "(C) " << from_expr(SSA.ns, "", enabling_expr) << eom;
#endif
const goto_programt &goto_program=SSA.goto_function.body;
for(goto_programt::instructionst::const_iterator
i_it=goto_program.instructions.begin();
i_it!=goto_program.instructions.end();
i_it++)
{
if(!i_it->is_assert())
continue;
const source_locationt &location=i_it->source_location;
irep_idt property_id=location.get_property_id();
if(i_it->guard.is_true())
{
property_map[property_id].result=PASS;
continue;
}
// do not recheck properties that have already been decided
if(property_map[property_id].result!=UNKNOWN)
continue;
// TODO: some properties do not show up in initialize_property_map
if(property_id=="")
continue;
std::list<local_SSAt::nodest::const_iterator> assertion_nodes;
SSA.find_nodes(i_it, assertion_nodes);
unsigned property_counter=0;
for(std::list<local_SSAt::nodest::const_iterator>::const_iterator
n_it=assertion_nodes.begin();
n_it!=assertion_nodes.end();
n_it++)
{
for(local_SSAt::nodet::assertionst::const_iterator
a_it=(*n_it)->assertions.begin();
a_it!=(*n_it)->assertions.end();
a_it++, property_counter++)
{
exprt property=*a_it;
if(simplify)
property=::simplify_expr(property, SSA.ns);
#if 0
std::cout << "property: " << from_expr(SSA.ns, "", property)
<< std::endl;
#endif
property_map[property_id].location=i_it;
cover_goals.goal_map[property_id].conjuncts.push_back(property);
}
}
}
for(cover_goals_extt::goal_mapt::const_iterator
it=cover_goals.goal_map.begin();
it!=cover_goals.goal_map.end();
it++)
{
// Our goal is to falsify a property.
// The following is TRUE if the conjunction is empty.
literalt p=!solver.convert(conjunction(it->second.conjuncts));
cover_goals.add(p);
}
status() << "Running " << solver.solver->decision_procedure_text() << eom;
cover_goals();
// set all non-covered goals to PASS except if we do not try
// to cover all goals and we have found a FAIL
if(all_properties || cover_goals.number_covered()==0)
{
std::list<cover_goals_extt::cover_goalt>::const_iterator g_it=
cover_goals.goals.begin();
for(cover_goals_extt::goal_mapt::const_iterator
it=cover_goals.goal_map.begin();
it!=cover_goals.goal_map.end();
it++, g_it++)
{
if(!g_it->covered)
property_map[it->first].result=PASS;
}
}
solver.pop_context();
debug() << "** " << cover_goals.number_covered()
<< " of " << cover_goals.size() << " failed ("
<< cover_goals.iterations() << " iterations)" << eom;
}
void summary_checker_baset::report_statistics()
{
for(ssa_dbt::functionst::const_iterator f_it=ssa_db.functions().begin();
f_it!=ssa_db.functions().end(); f_it++)
{
incremental_solvert &solver=ssa_db.get_solver(f_it->first);
unsigned calls=solver.get_number_of_solver_calls();
if(calls>0)
solver_instances++;
solver_calls+=calls;
}
statistics() << "** statistics: " << eom;
statistics() << " number of solver instances: " << solver_instances << eom;
statistics() << " number of solver calls: " << solver_calls << eom;
statistics() << " number of summaries used: "
<< summaries_used << eom;
statistics() << " number of termination arguments computed: "
<< termargs_computed << eom;
statistics() << eom;
}
void summary_checker_baset::do_show_vcc(
const local_SSAt &SSA,
const goto_programt::const_targett i_it,
const local_SSAt::nodet::assertionst::const_iterator &a_it)
{
std::cout << i_it->source_location << "\n";
std::cout << i_it->source_location.get_comment() << "\n";
std::list<exprt> ssa_constraints;
ssa_constraints << SSA;
unsigned i=1;
for(std::list<exprt>::const_iterator c_it=ssa_constraints.begin();
c_it!=ssa_constraints.end();
c_it++, i++)
std::cout << "{-" << i << "} " << from_expr(SSA.ns, "", *c_it) << "\n";
std::cout << "|--------------------------\n";
std::cout << "{1} " << from_expr(SSA.ns, "", *a_it) << "\n";
std::cout << "\n";
}
/// returns the select guards at the loop heads in order to check whether a
/// countermodel is spurious
exprt::operandst summary_checker_baset::get_loophead_selects(
const irep_idt &function_name,
const local_SSAt &SSA, prop_convt &solver)
{
// TODO: this should be provided by unwindable_local_SSA
exprt::operandst loophead_selects;
for(local_SSAt::nodest::const_iterator n_it=SSA.nodes.begin();
n_it!=SSA.nodes.end(); n_it++)
{
if(n_it->loophead==SSA.nodes.end())
continue;
symbol_exprt lsguard=
SSA.name(SSA.guard_symbol(), local_SSAt::LOOP_SELECT, n_it->location);
ssa_unwinder.get(function_name).unwinder_rename(lsguard, *n_it, true);
loophead_selects.push_back(not_exprt(lsguard));
solver.set_frozen(solver.convert(lsguard));
}
literalt loophead_selects_literal=
solver.convert(conjunction(loophead_selects));
if(!loophead_selects_literal.is_constant())
solver.set_frozen(loophead_selects_literal);
#if 0
std::cout << "loophead_selects: "
<< from_expr(SSA.ns, "", conjunction(loophead_selects))
<< std::endl;
#endif
return loophead_selects;
}
/// returns the loop continuation guards at the end of the loops in order to
/// check whether we can unroll further
exprt::operandst summary_checker_baset::get_loop_continues(
const irep_idt &function_name,
const local_SSAt &SSA, prop_convt &solver)
{
// TODO: this should be provided by unwindable_local_SSA
exprt::operandst loop_continues;
ssa_unwinder.get(function_name).loop_continuation_conditions(loop_continues);
if(loop_continues.size()==0)
{
// TODO: this should actually be done transparently by the unwinder
for(local_SSAt::nodest::const_iterator n_it=SSA.nodes.begin();
n_it!=SSA.nodes.end(); n_it++)
{
if(n_it->loophead==SSA.nodes.end())
continue;
symbol_exprt guard=SSA.guard_symbol(n_it->location);
symbol_exprt cond=SSA.cond_symbol(n_it->location);
loop_continues.push_back(and_exprt(guard, cond));
}
}
#if 0
std::cout << "loophead_continues: "
<< from_expr(SSA.ns, "", disjunction(loop_continues)) << std::endl;
#endif
return loop_continues;
}
/// checks whether the loops have been fully unwound
bool summary_checker_baset::is_fully_unwound(
const exprt::operandst &loop_continues,
const exprt::operandst &loophead_selects,
incremental_solvert &solver)
{
solver.new_context();
solver <<
and_exprt(conjunction(loophead_selects), disjunction(loop_continues));
solver_calls++; // statistics
switch(solver())
{
case decision_proceduret::D_SATISFIABLE:
solver.pop_context();
return false;
break;
case decision_proceduret::D_UNSATISFIABLE:
solver.pop_context();
solver << conjunction(loophead_selects);
return true;
break;
case decision_proceduret::D_ERROR:
default:
throw "error from decision procedure";
}
}
/// checks whether a countermodel is spurious
bool summary_checker_baset::is_spurious(
const exprt::operandst &loophead_selects,
incremental_solvert &solver)
{
// check loop head choices in model
bool invariants_involved=false;
for(exprt::operandst::const_iterator l_it=loophead_selects.begin();
l_it!=loophead_selects.end(); l_it++)
{
if(solver.get(l_it->op0()).is_true())
{
invariants_involved=true;
break;
}
}
if(!invariants_involved)
return false;
// force avoiding paths going through invariants
solver << conjunction(loophead_selects);
solver_calls++; // statistics
switch(solver())
{
case decision_proceduret::D_SATISFIABLE:
return false;
break;
case decision_proceduret::D_UNSATISFIABLE:
return true;
break;
case decision_proceduret::D_ERROR:
default:
throw "error from decision procedure";
}
}
/// instruments the code with the inferred information and outputs it to a goto-
/// binary
void summary_checker_baset::instrument_and_output(goto_modelt &goto_model)
{
instrument_gotot instrument_goto(options, ssa_db, summary_db);
instrument_goto(goto_model);
std::string filename=options.get_option("instrument-output");
status() << "Writing instrumented goto-binary " << filename << eom;
write_goto_binary(
filename,
goto_model.symbol_table,
goto_model.goto_functions,
get_message_handler());
}
| 28.862745
| 80
| 0.68587
|
viktormalik
|
c634b533805e345840f1a76fbdcf6a21e52977b2
| 2,745
|
hpp
|
C++
|
aessparse.hpp
|
pibara/AESsparsepp
|
12c51fd93ea344e6a65715026fe5baa6c18c34ed
|
[
"BSD-3-Clause"
] | 1
|
2019-04-30T05:40:55.000Z
|
2019-04-30T05:40:55.000Z
|
aessparse.hpp
|
pibara/AESsparsepp
|
12c51fd93ea344e6a65715026fe5baa6c18c34ed
|
[
"BSD-3-Clause"
] | null | null | null |
aessparse.hpp
|
pibara/AESsparsepp
|
12c51fd93ea344e6a65715026fe5baa6c18c34ed
|
[
"BSD-3-Clause"
] | null | null | null |
#ifndef _AESSPARSE_HPP
#define _AESSPARSE_HPP
namespace aessparse {
//Interface for any type of sparse file implementation.
struct abstract_sparse_file {
//Low level read and write.
virtual ssize_t read(void *buf, size_t count, off_t offset) = 0;
virtual ssize_t write(const void *buf, size_t count, off_t offset) = 0;
//Navigation functions within hole/data fragments.
virtual off_t lseek_data(off_t offset) = 0;
virtual off_t lseek_hole(off_t offset) = 0;
//Query the size of the file.
virtual off_t getsize() = 0;
};
//Non owning open file rw opened loopback implementation for sparse file.
struct loopback_sparse_file: public abstract_sparse_file {
loopback_sparse_file(int file);
ssize_t read(void *buf, size_t count, off_t offset);
ssize_t write(const void *buf, size_t count, off_t offset);
off_t lseek_data(off_t offset);
off_t lseek_hole(off_t offset);
off_t getsize();
private:
int mFile;
};
//Interface for aes sparse file.
struct abstract_aes_sparse_file {
//low level read and write functions.
virtual ssize_t read(void *buf, size_t count, off_t offset) = 0;
virtual ssize_t write(const void *buf, size_t count, off_t offset) = 0;
//Don't really know a good interface for communicating padding size yet, this is a place holder for something suitable.
virtual ssize_t getpadlen() = 0;
};
struct aes_sparse_file;
//movable pimpl wrapper.
struct aes_sparse_file: public abstract_aes_sparse_file {
//creation function is frind so it can invoke constructor.
friend aes_sparse_file create_aes_sparse_file(abstract_sparse_file const &, CryptoPP::SecByteBlock);
//Move constuctor, needed by creator function invocation.
aes_sparse_file(aes_sparse_file&& other);
aes_sparse_file& operator=(aes_sparse_file&& other);
//No coppy allowed
aes_sparse_file(aes_sparse_file& other) = delete;
aes_sparse_file& operator=(aes_sparse_file& other) = delete;
//destructor will destroy 'owned' pImpl if needed.
~aes_sparse_file();
ssize_t read(void *buf, size_t count, off_t offset);
ssize_t write(const void *buf, size_t count, off_t offset);
virtual ssize_t getpadlen();
private:
//Private constructor to be used by friend creation function
aes_sparse_file(abstract_sparse_file *impl);
//Pointer to implementation.
abstract_aes_sparse_file *pImpl;
};
//Function for creating a aes sparse file using a sparse file and a file encryption key.
aes_sparse_file create_aes_sparse_file(abstract_sparse_file const &, CryptoPP::SecByteBlock);
}
#endif
| 45.75
| 125
| 0.704918
|
pibara
|
c637589e05691bfe79809edbeceb26fcd88d3765
| 1,972
|
cpp
|
C++
|
Other/CampusChapter1/GAMENUM.cpp
|
vinaysomawat/CodeChef-Solutions
|
9a0666a4f1badd593cd075f3beb05377e3c6657a
|
[
"MIT"
] | 1
|
2020-04-12T01:39:10.000Z
|
2020-04-12T01:39:10.000Z
|
Other/CampusChapter1/GAMENUM.cpp
|
vinaysomawat/CodeChef-Solutions
|
9a0666a4f1badd593cd075f3beb05377e3c6657a
|
[
"MIT"
] | null | null | null |
Other/CampusChapter1/GAMENUM.cpp
|
vinaysomawat/CodeChef-Solutions
|
9a0666a4f1badd593cd075f3beb05377e3c6657a
|
[
"MIT"
] | null | null | null |
/*
Contest: CodeChef March 2020 Cook-Off challange
Problem link:https://www.codechef.com/CHPTRS01/problems/GAMENUM
GitHub Solution Repository: https://github.com/vinaysomawat/CodeChef-Solutions
Author: Vinay Somawat
Author's Webpage: http://vinaysomawat.github.io/
Author's mail: vinaysomawat@hotmail.com
*/
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
const char* comma = strchr(names + 1, ',');
cerr.write(names, comma - names) << ": " << arg1 << " |";
__f(comma + 1, args...);
}
#else
#define trace(...) 42
#endif
ll n;
void fill(ll a, string &aa){
int i = n - 1;
while(a){
if (a&1){
aa[i] = '1';
}
a = a >> 1;
i--;
}
}
void solve()
{
ll a, b;
cin >> a >> b;
n = floor(log2(max(a, b))) + 1;
string aa(n, '0'), bb(n, '0');
fill(a, aa);
fill(b, bb);
trace(aa, bb);
ll mx = a ^ b;
trace(mx);
int rotations = 0;
int ansrt = 0;
for (int i = 1; i <= 65; i++){
rotate(bb.rbegin(), bb.rbegin()+1, bb.rend());
ll x = bitset<64>(bb).to_ullong();
if (x == b) break;
rotations++;
if ((x ^ a) > mx){
ansrt = rotations;
mx = x ^ a;
}
}
cout << ansrt << ' ' << mx << endl;
}
int main(){
IOS;
#ifdef LOCAL
#endif
int t;
cin >> t;
while(t--){
solve();
}
#ifdef LOCAL
cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
return 0;
}
| 21.204301
| 82
| 0.501014
|
vinaysomawat
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.