- 博客(43)
- 收藏
- 关注
原创 openlayers入门(31)计算长度
首先是通过动态样式去设置 每一段的样式 ,根据geometry.forEachSegment获取首尾点,在通过ol/sphere的getLength计算长度
2023-10-20 10:14:43
608
原创 openlayers 入门(25)聚合数据
聚合的话 就是对source数据 进行Cluster类加工一下,具体数据的展示是通过动态style展示的
2023-10-20 09:54:42
310
原创 openlayers 入门(10)地图高亮
通过点击事件获取 当前的点 ,再根据当前的点获取当前点击的要素,给地图添加高亮图层,最后将要素和高亮图层匹配
2023-10-16 15:02:13
668
3
原创 读取文件完全
#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){FILE * pFile;long lSize;size_t result;/* 直接使用文本方式打开 /pFile = fopen(“e:\1.txt”, “r”);/ 获取文件大小 /fseek(pFile, 0, SEEK_END);lSize = ftell(pFile);rewind(pFile);ch
2021-07-20 09:59:28
118
原创 回溯法之连续邮票问题
#include <stdio.h>#include <stdlib.h>#include <iostream>using namespace std;int partitions(int a[],int low,int high){ int pivotkey=a[low]; //基准 while(low<high) { while(low<high && a[high]>=pivotkey) --high.
2021-06-07 17:09:51
352
原创 动态规划之背包问题(KNAPSPACK)
#include <iostream>using namespace std; int n,G,ic,jc;void fun (int i,int j,int V[100][100],int r[100][2]){ if(V[i][j]==0) { return; } else { if(V[i-1][j]>r[i][0]+V[i-1][j-r[i][1]]) { fu.
2021-05-31 19:17:19
184
原创 动态规划之最长公共子序列问题(LCS)
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <iostream>using namespace std;void fun(int i,int j,int maxlen[100][100],char s1[100],char s2[100]) { if(i>0&&j>0) { .
2021-05-31 19:15:06
145
原创 动态规划之矩阵相乘的数量乘法最小次数
#include <iostream>#include <stdio.h>#include <stdlib.h>using namespace std;void fun(int i,int j,int c[100][100],int r[100]){ int ki; if(i==j) { cout<<"A"<<i; } else if(i==j-1) cout<.
2021-05-31 19:13:17
330
1
原创 贪心算法之最短路径(KRUSKAL)
#include <iostream>#include <stdio.h>using namespace std;int ic,jc,coun=0,edge=0;int T[100],A[100][100];/*int judice(int x,int t[]){ for(int i=0;i<=coun-1;coun++) { if(t[i]==x) return 1; else .
2021-05-31 19:09:19
491
1
原创 动态规划之最长路径问题
#include <iostream>using namespace std;void fun(int i,int j,int c[100][100],int b[100][100]){ int lk; if(b[i][j]==3) { cout<<i<<j<<endl; } else { for(int k=i+1;k<j;k++) .
2021-05-31 19:07:18
636
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人