Changeset 4be499 in git
- Timestamp:
- Nov 17, 2022, 11:35:27 AM (17 months ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 164e0526f677f7a21cec1d5f3d60c633af308f0d
- Parents:
- 5cf36cb1c99d617d81e98b1b6986dc9b03b3883f
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2022-11-17 11:35:27+01:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2022-11-17 11:36:17+01:00
- Location:
- Singular/dyn_modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/cohomo/cohomo.cc
r5cf36cb r4be499 262 262 } 263 263 264 265 266 264 //returns the union of two vectors(as the union of sets) 267 265 std::vector<int> vecUnion(std::vector<int> vec1, std::vector<int> vec2) 268 266 { 269 267 std::vector<int> vec=vec1; 270 inti;268 unsigned i; 271 269 for(i=0;i<vec2.size();i++) 272 270 { … … 277 275 } 278 276 279 280 281 277 std::vector<int> vecMinus(std::vector<int> vec1,std::vector<int> vec2) 282 278 { 283 279 std::vector<int> vec; 284 for( inti=0;i<vec1.size();i++)280 for(unsigned i=0;i<vec1.size();i++) 285 281 { 286 282 if(!IsinL(vec1[i],vec2)) … … 291 287 return vec; 292 288 } 293 294 295 296 297 298 289 299 290 std::vector<std::vector<int> > vsMinusv(std::vector<std::vector<int> > vecs, std::vector<int> vec) … … 1153 1144 ideal h2=id_complement(h); 1154 1145 std::vector<std::vector<int> > hvs=supports(h), h2v=supports(h2), vecs; 1155 for( inti=0;i<h2v.size();i++)1146 for(unsigned i=0;i<h2v.size();i++) 1156 1147 { 1157 1148 pv=h2v[i]; … … 1163 1154 return vecs; 1164 1155 } 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1156 1176 1157 /***************************************************************************/ 1177 1158 //For solving the equations which has form of x_i-x_j.(equations got from T_1) 1178 1159 /***************************************************************************/ 1179 1180 1181 1160 1182 1161 //subroutine for soleli1 … … 1240 1219 std::vector<std::vector<int> > soleli1( std::vector<std::vector<int> > eqs) 1241 1220 { 1242 int i ,j;1221 int i; 1243 1222 std::vector<int> yaya; 1244 1223 std::vector<std::vector<int> > pre=eqs, ppre, re; … … 2252 2231 } 2253 2232 2254 2255 2256 2233 /**************************************************************************/ 2257 2258 2259 2260 2261 2262 2263 2264 2265 2234 2266 2235 //subspace of T2(find all the possible values of alpha) … … 2268 2237 { 2269 2238 std::vector<int> alset; 2270 for( inti=0;i<mv.size();i++)2239 for(unsigned i=0;i<mv.size();i++) 2271 2240 { 2272 2241 if(vsubset(bv,mv[i])) … … 2280 2249 } 2281 2250 2282 2283 2284 2285 2286 2287 2288 2289 2251 std::vector<int> subspacet1(int num, std::vector<std::vector<int> > ntvs) 2290 2252 { … … 2339 2301 std::vector<int> v1,var; 2340 2302 std::vector<std::vector<int> > vars; 2341 for( inti=0;i<Mv.size();i++)2342 { 2343 for( intj=i+1;j<Mv.size();j++)2303 for(unsigned i=0;i<Mv.size();i++) 2304 { 2305 for(unsigned j=i+1;j<Mv.size();j++) 2344 2306 { 2345 2307 var.clear(); … … 2533 2495 std::vector<int> v1,var; 2534 2496 std::vector<std::vector<int> > vars; 2535 for( inti=0;i<Nv.size();i++)2536 { 2537 for( intj=i+1;j<Nv.size();j++)2497 for(unsigned i=0;i<Nv.size();i++) 2498 { 2499 for(unsigned j=i+1;j<Nv.size();j++) 2538 2500 { 2539 2501 var.clear(); … … 2564 2526 std::vector<int> sv; 2565 2527 if(bvs.size()<=1) return false; 2566 for( inti=0;i<bvs.size();i++)2528 for(unsigned i=0;i<bvs.size();i++) 2567 2529 { 2568 2530 sv=vecUnion(pv,bvs[i]); … … 2575 2537 } 2576 2538 2577 2578 2579 2580 2581 2582 2583 2539 std::vector<int> tnab(std::vector<std::vector<int> > hvs,std::vector<std::vector<int> > nvs,std::vector<std::vector<int> > bvs) 2584 2540 { 2585 2541 std::vector<int> pv, vec; 2586 for( intj=0;j<nvs.size();j++)2542 for(unsigned j=0;j<nvs.size();j++) 2587 2543 { 2588 2544 pv=nvs[j]; … … 2619 2575 std::vector<int> pv, base; 2620 2576 std::vector<std::vector<int> > bases; 2621 for( intt=0;t<vecs.size();t++)2622 { 2623 for( inti=0;i<mvs.size();i++)2577 for(unsigned t=0;t<vecs.size();t++) 2578 { 2579 for(unsigned i=0;i<mvs.size();i++) 2624 2580 { 2625 2581 pv=phimage(mvs[i],av,bv); … … 2902 2858 std::vector<std::vector<int> > subspacetn(std::vector<std::vector<int> > N, std::vector<int> tN, std::vector<std::vector<int> > ntvs) 2903 2859 { 2904 int i ,j;2860 int i; 2905 2861 std::vector<int> alset=findalphan(N,tN), subase; 2906 2862 std::vector<std::vector<int> > subases; … … 2932 2888 //listsprint(mts); 2933 2889 //PrintS("mabt ends:\n"); 2934 for( intt=0;t<vecs.size();t++)2935 { 2936 for( inti=0;i<mts.size();i++)2890 for(unsigned t=0;t<vecs.size();t++) 2891 { 2892 for(unsigned i=0;i<mts.size();i++) 2937 2893 { 2938 2894 row=mts[i][0]; … … 3148 3104 std::vector<int> base; 3149 3105 std::vector<std::vector<int> > bases; 3150 for( intt=0;t<vecs.size();t++)3151 { 3152 for( inti=0;i<mvs.size();i++)3106 for(unsigned t=0;t<vecs.size();t++) 3107 { 3108 for(unsigned i=0;i<mvs.size();i++) 3153 3109 { 3154 3110 pv=phimagel(mvs[i], av, bv); … … 3293 3249 3294 3250 } 3295 for( intt=0;t<vecs.size();t++)3296 { 3297 for( inti=0;i<mts.size();i++)3251 for(unsigned t=0;t<vecs.size();t++) 3252 { 3253 for(unsigned i=0;i<mts.size();i++) 3298 3254 { 3299 3255 row=mts[i][0]; … … 3886 3842 std::vector<std::vector<int> > ss=p_new(Sigma, Xo), fvs; 3887 3843 std::vector<int> av=support1(a), intvec, vv; 3888 for( inti=0;i<ss.size();i++)3844 for(unsigned i=0;i<ss.size();i++) 3889 3845 { 3890 3846 intvec=vecIntersection(ss[i], av); … … 4107 4063 std::vector<int> bvs=support1(b), vs; 4108 4064 std::vector<std::vector<int> > bset; 4109 for( inti=0;i<bvs.size();i++)4065 for(unsigned i=0;i<bvs.size();i++) 4110 4066 { 4111 4067 for(int j=0;j!=i; j++) … … 4751 4707 sbv=supports(sub); 4752 4708 std::vector<int> tnv =tnab(vecs,nvs,sbv); 4753 for( inti=0;i<tnv.size();i++)4709 for(unsigned i=0;i<tnv.size();i++) 4754 4710 { 4755 4711 tnbr.push_back(nvs[tnv[i]]); … … 4826 4782 std::vector<std::vector<poly> > pvs=idMakei(nv,ntvs); 4827 4783 ideal gens=idInit(1,1); 4828 for( inti=0;i<pvs.size();i++)4784 for(unsigned i=0;i<pvs.size();i++) 4829 4785 { 4830 4786 idInsertPoly(gens,pvs[i][0]); -
Singular/dyn_modules/systhreads/shared.cc
r5cf36cb r4be499 761 761 memset(&result, 0, sizeof(result)); 762 762 leftv *tail = &procnode->next; 763 for ( inti = 0; i < argv.size(); i++) {763 for (unsigned i = 0; i < argv.size(); i++) { 764 764 *tail = argv[i]; 765 765 tail = &(*tail)->next; … … 1688 1688 int threadpool_size(ThreadPool *pool) { 1689 1689 int n; 1690 for ( inti = 0; i <thread_owners.size(); i++) {1690 for (unsigned i = 0; i <thread_owners.size(); i++) { 1691 1691 if (thread_owners[i] == pool) 1692 1692 n++; … … 1695 1695 } 1696 1696 virtual ~Scheduler() { 1697 for ( inti = 0; i < thread_queues.size(); i++) {1697 for (unsigned i = 0; i < thread_queues.size(); i++) { 1698 1698 JobQueue *q = thread_queues[i]; 1699 1699 while (!q->empty()) { … … 1729 1729 } 1730 1730 lock.unlock(); 1731 for ( inti = 0; i <threads.size(); i++) {1731 for (unsigned i = 0; i <threads.size(); i++) { 1732 1732 joinThread(threads[i]); 1733 1733 } … … 1776 1776 void broadcastJob(ThreadPool *pool, Job *job) { 1777 1777 lock.lock(); 1778 for ( inti = 0; i <thread_queues.size(); i++) {1778 for (unsigned i = 0; i <thread_queues.size(); i++) { 1779 1779 if (thread_owners[i] == pool) { 1780 1780 acquireShared(job); … … 1786 1786 void cancelDeps(Job * job) { 1787 1787 vector<Job *> ¬ify = job->notify; 1788 for ( inti = 0; i <notify.size(); i++) {1788 for (unsigned i = 0; i <notify.size(); i++) { 1789 1789 Job *next = notify[i]; 1790 1790 if (!next->cancelled) { … … 1830 1830 vector<Job *> ¬ify = job->notify; 1831 1831 job->incref(notify.size()); 1832 for ( inti = 0; i <notify.size(); i++) {1832 for (unsigned i = 0; i <notify.size(); i++) { 1833 1833 Job *next = notify[i]; 1834 1834 if (!next->queued && next->ready() && !next->cancelled) { … … 1841 1841 if (triggers.size() > 0 && job->result.size() > 0) 1842 1842 arg = LinTree::from_string(job->result); 1843 for ( inti = 0; i < triggers.size(); i++) {1843 for (unsigned i = 0; i < triggers.size(); i++) { 1844 1844 Trigger *trigger = triggers[i]; 1845 1845 if (trigger->accept(arg)) { … … 2018 2018 lists l = (lists) omAlloc0Bin(slists_bin); 2019 2019 l->Init(args.size()); 2020 for ( inti = 0; i < args.size(); i++) {2020 for (unsigned i = 0; i < args.size(); i++) { 2021 2021 leftv val = LinTree::from_string(args[i]); 2022 2022 memcpy(&l->m[i], val, sizeof(*val)); … … 2103 2103 pool->scheduler->lock.unlock(); 2104 2104 vector<leftv> argv; 2105 for ( inti = 0; i < args.size(); i++) {2105 for (unsigned i = 0; i < args.size(); i++) { 2106 2106 appendArg(argv, args[i]); 2107 2107 } … … 2420 2420 if (argv.size() > 0) { 2421 2421 leftv *tail = &argv[0]->next; 2422 for ( inti = 1; i < argv.size(); i++) {2422 for (unsigned i = 1; i < argv.size(); i++) { 2423 2423 *tail = argv[i]; 2424 2424 tail = &(*tail)->next;
Note: See TracChangeset
for help on using the changeset viewer.