bool TheGrigorchukGroupAlgorithms::trivial_reduced( const Word& w )
{
  if( w.length( )==0 )
    return true;

  // check that w belongs to ST(1)
  triple< int , int , int > a = abelianImage( w);
  if( a.first || a.second || a.third )
    return false;
  
  pair< Word , Word > sp = split( w );
  return trivial(sp.first) && trivial(sp.second);
}
Esempio n. 2
0
int
main(int argc, char **argv)
{
	int ch, ret;

	ret = 0;

	while ((ch = getopt(argc, argv, "tseES")) != -1) {
		switch (ch) {
		case 't':
			ret |= trivial();
			break;
		case 's':
			ret |= with_signal();
			break;
		case 'e':
			ret |= time_elapsed();
			break;
		case 'E':
			ret |= time_elapsed_with_signal();
			break;
		case 'S':
			ret |= short_time();
		default:
			fprintf(stderr, "Usage: nanosleep [-tse]\n");
			exit(1);
		}
	}

	return (ret);
}
Esempio n. 3
0
 void inout(IHypergraph<A> const& h, IMutableHypergraph<A>* o) const {
   assert(stateRemap);
   if (trivial())
     copyHypergraph(h, o);
   else {
     copyFilter(stateRemap, h, o, keep, kArcs, kStartFinal, kNoClear);
   }
 }
Esempio n. 4
0
File: main.cpp Progetto: CCJY/coliru
int main()
{
    auto n = non_trivial();
    auto t = trivial();
    
    std::cout << t.i << "\n";
    std::cout << n.i << "\n"; // UB
}
int main(void) {
  SSL_library_init();

  if (!trivial() || !fixed_random()) {
    return 1;
  }

  printf("PASS\n");
  return 0;
}
Esempio n. 6
0
int main(int argc, char *argv[])
{
    trivial();
    test_gaps();
    test_exceptions();
    test_rehashing_items_placed_beyond_nitems();
    test_iterating();
    test_fill_with_deleted_items();

    (void)argc;
    (void)argv;
    return 0;
}
Esempio n. 7
0
 void inplace(IMutableHypergraph<A>& m) const {
   assert(stateRemap);
   if (!trivial()) {
     m.restrict(stateRemap, keep);
   }
 }
Esempio n. 8
0
 bool needs(IMutableHypergraph<Arc>& h) const {
   return !trivial();
 }